terraform-provider-vgs

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

VGS Terraform Provider

CircleCI

Custom Terraform provider that allows provisioning VGS Proxy Routes.

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}

Terraform Registry

NOTE: The current version of the provider has not been published to Terraform Registry yet.

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL