-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/provider: add SCYLLADB_CLOUD_TOKEN env (#157)
This PR adds support for reading the SCYLLADB_CLOUD_TOKEN env var. This makes it possible to pass authentication token via env, and not require to always embed it in the terraform file. This makes it possible to just define scylladb_cloud provider as just: provider "scylladbcloud" { } and pass the token with terraform execution or store it in .envrc file. Even-though the token is marked as optional now, the behavior of failing the provider init is preserved via the ValidateDiagFunc: ╷ │ Error: token is required │ │ with provider["registry.terraform.io/scylladb/scylladbcloud"], │ on main.tf line 9, in provider "scylladbcloud": │ 9: provider "scylladbcloud" { } │ │ A token must be provided to authenticate with the Scylla Cloud API.
- Loading branch information
Showing
2 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters