An open API service indexing awesome lists of open source software.

https://github.com/ytsaurus/ytsaurus-terraform-provider


https://github.com/ytsaurus/ytsaurus-terraform-provider

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# terraform-provider-ytsaurus

## Installation from Terraform mirror
### Example layout
- **\$HOME/.terraformrc** - Terraform configuration file.
- **$HOME/tf** - a folder with Terraform files with your infrastructure configuration.
- **$HOME/tf/providers.tf** - .tf file required providers configuration

### How to download YTsaurus terraform-provider
Run from your Terraform configuration
```
$ cd $HOME/tf
$ cat providers.tf
terraform {
required_providers {
ytsaurus = {
source = "terraform-provider.ytsaurus.tech/ytsaurus/ytsaurus"
}
}
}

$ terraform init

```
## Installation from source code
### Prerequirements

Below is a list of things you should have or configure:

* golang
* GOPATH environment variable
* Terraform binary
* YTsaurus main repo
* YTsaurus cluster for acceptance tests

### Example layout

- **\$HOME/.terraformrc** - Terraform configuration file.
- **\$HOME/go** - golang home, and GOPATH value.
- **\$HOME/go/src/terraform-provider-ytsaurus** - a folder with the provider's source code from github.com:ytsaurus/terraform-provider-ytsaurus.git.
- **$HOME/ytsaurus** - a folder with terraform-provider-ytsaurus checked out from github.com:ytsaurus/terraform-provider-ytsaurus.git.
- **$HOME/tf** - a folder with Terraform files with your infrastructure configuration.

### How to run tests

```
~/ytsaurus/yt/docker/local/run_local_cluster.sh
cd ~/go/src/terraform-provider-ytsaurus
make test
```

### How to install

```
cd ~/go/src/terraform-provider-ytsaurus
make install
```

### How to configure ~/.terraformrc for development and tests
Run ```make install```.

Add ```dev_overrides``` to ~/.terraformrc,
and do not run ```terraform init``` inside a directory with your .tf files.

```
$ cat ~/.terraformrc
provider_installation {
dev_overrides {
"registry.terraform.io/ytsaurus/ytsaurus" = "/go/bin"
}
direct {
exclude = ["registry.terraform.io/ytsaurus/*"]
}
}
```

## Examples

Please see \$HOME/go/src/terraform-provider-ytsaurus/examples