Skip to content

Commit

Permalink
Relying on TFE_TOKEN, TFE_ADDRESS env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
BSick7 committed Nov 25, 2020
1 parent 42a901b commit 4bc180c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 0 additions & 4 deletions ns/tfe_config.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ns

import (
"os"

"github.com/hashicorp/go-tfe"
)

Expand All @@ -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
}
Expand Down
11 changes: 10 additions & 1 deletion website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4bc180c

Please sign in to comment.