Skip to content

Commit

Permalink
Merge pull request #133 from adtennant/patch-1
Browse files Browse the repository at this point in the history
Allow the API token to be read from an env var.

#133
  • Loading branch information
Steve Kemp authored Jan 17, 2020
2 parents c7cad03 + 1c3ac57 commit c6d30ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ provider "aiven" {
}
```

The Aiven provider currently only supports a single configuration option, `api_token`.
The Aiven provider currently only supports a single configuration option, `api_token`. This can also be specified with the AIVEN_TOKEN shell environment variable.
The Aiven web console can be used to create named, never expiring API tokens that should
be used for this kind of purposes. If Terraform is used for managing existing project(s),
the API token must belong to a user with admin privileges for those project(s). For new
Expand Down
1 change: 1 addition & 0 deletions aiven/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func Provider() terraform.ResourceProvider {
Type: schema.TypeString,
Required: true,
Sensitive: true,
DefaultFunc: schema.EnvDefaultFunc("AIVEN_TOKEN", nil),
Description: "Aiven Authentication Token",
},
},
Expand Down

0 comments on commit c6d30ab

Please sign in to comment.