Skip to content

Latest commit

 

History

History
71 lines (58 loc) · 3.19 KB

README.md

File metadata and controls

71 lines (58 loc) · 3.19 KB

VGS Terraform Provider

CircleCI

Custom Terraform provider that allows provisioning VGS Proxy Routes.

Provider Status

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.

How to Install

Requirements: terraform ver 0.12 or later

Manual (in-house provider)

  1. Navigate to the latest release of the provider.
  2. Download archive for appropriate OS and Architecture. You can run terraform --version on your environment to see which variant from the list to use.
  3. 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}

How to Use

  1. Create a Vault through VGS dashboard and get your Vault ID.
  2. Prepare terraform configuration for vgs provider in separate folder (e.g. /vgs). See /examples for more information on how to write the configuration.
  3. Install and use vgs-cli to create a ServiceAccount.
  4. Set the VGS_CLIENT_ID and VGS_CLIENT_SECRET environment variables from ServiceAccount and run.
~ cd /vgs
~ terraform init
~ VGS_CLIENT_ID=xxx VGS_CLIENT_SECRET=yyy terraform apply

How to build from source

Requirements: Go

For your system

To compile binaries:

~ make build
~ ls ./bin
terraform-provider-vgs_v<ver>

Develop

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

Test

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