Custom Terraform provider that allows provisioning VGS Proxy Routes.
Deprecation Notice: We do not currently provide support for this provider. VGS is committed to providing developer tooling and recommends using the VGS CLI and its related tools and patterns for managing your vaults. Look forward to future updates at our blog.
Requirements: terraform
ver 0.12 or later
- Navigate to the latest release of the provider.
- Download archive for appropriate OS and Architecture. You can run
terraform --version
on your environment to see which variant from the list to use. - Unzip the archive and copy the provider's binary into
~/.terraform.d/plugin/...
according to official documentation.
Example for terraform
0.13 and later:
~ mkdir -p ~/.terraform.d/plugins/local.terraform.com/user/vgs/{ver}/darwin_amd64
~ cp ./bin/terraform-provider-vgs_{ver} ~/.terraform.d/plugins/local.terraform.com/user/vgs/{ver}/darwin_amd64/terraform-provider-vgs_{ver}
For terraform
0.12:
~ mkdir -p ~/.terraform.d/plugins
~ cp ./bin/terraform-provider-vgs_{ver} ~/.terraform.d/plugins/terraform-provider-vgs_{ver}
- Create a Vault through VGS dashboard and get your Vault ID.
- Prepare terraform configuration for
vgs
provider in separate folder (e.g./vgs
). See /examples for more information on how to write the configuration. - Install and use vgs-cli to create a ServiceAccount.
- Set the
VGS_CLIENT_ID
andVGS_CLIENT_SECRET
environment variables from ServiceAccount and run.
~ cd /vgs
~ terraform init
~ VGS_CLIENT_ID=xxx VGS_CLIENT_SECRET=yyy terraform apply
Requirements: Go
To compile binaries:
~ make build
~ ls ./bin
terraform-provider-vgs_v<ver>
Useful overrides for development:
~ VGS_VAULT_MANAGEMENT_API_BASE_URL=https://api.verygoodsecurity.io \
VGS_ACCOUNT_MANAGEMENT_API_BASE_URL=https://accounts.verygoodsecurity.io \
VGS_KEYCLOAK_URL=https://auth.verygoodsecurity.io \
VGS_CLIENT_ID=XXX \
VGS_CLIENT_SECRET=YYY \
terraform apply
API client located under https://github.com/verygoodsecurity/vgs-api-client-go
To run tests locally:
~ TF_ACC=true VGS_CLIENT_ID=xxx VGS_CLIENT_SECRET=yyy go test ./...
? github.com/verygoodsecurity/terraform-provider-vgs [no test files]
ok github.com/verygoodsecurity/terraform-provider-vgs/provider 66.337s