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.
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:
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: