https://github.com/ytsaurus/ytsaurus-terraform-provider
https://github.com/ytsaurus/ytsaurus-terraform-provider
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ytsaurus/ytsaurus-terraform-provider
- Owner: ytsaurus
- License: mpl-2.0
- Created: 2023-05-29T16:15:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T12:02:08.000Z (almost 2 years ago)
- Last Synced: 2024-08-21T13:29:37.389Z (almost 2 years ago)
- Language: Go
- Size: 101 KB
- Stars: 7
- Watchers: 9
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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