From 4bc180c5ff804551d3703ba662c00db14cdab534 Mon Sep 17 00:00:00 2001 From: Brad Sickles Date: Wed, 25 Nov 2020 10:00:02 -0500 Subject: [PATCH] Relying on TFE_TOKEN, TFE_ADDRESS env vars --- ns/tfe_config.go | 4 ---- website/docs/index.html.markdown | 11 ++++++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ns/tfe_config.go b/ns/tfe_config.go index a44a5d9..10a723c 100644 --- a/ns/tfe_config.go +++ b/ns/tfe_config.go @@ -1,8 +1,6 @@ package ns import ( - "os" - "github.com/hashicorp/go-tfe" ) @@ -12,8 +10,6 @@ var ( func NewTfeConfig() *tfe.Config { cfg := tfe.DefaultConfig() - cfg.Token = os.Getenv("NULLSTONE_API_KEY") - cfg.Address = os.Getenv("NULLSTONE_ADDR") if cfg.Address == "" { cfg.Address = DefaultAddress } diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index b9529a8..9ba087b 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -20,10 +20,19 @@ provider "ns" { # Example resource configuration resource "ns_workspace" "example" { - # ... } ``` +## Server Authentication + +This provider communicates with nullstone servers that implement Terraform Cloud compliant protocol for state backends. + +Currently, the provider will default the address to `https://api.nullstone.io`. +To override, set the environment variable `TFE_ADDRESS`. + +A nullstone API key is necessary to communicate as well. +Set `TFE_TOKEN` to your nullstone API key. + ## Plan Config When running inside a Nullstone runner, Nullstone will automatically configure the plan configuration all resources in this provider.