hi everyone,
We are storing our Google Cloud service account private key in a variable within Terraform Cloud (just copying from the json file to the terraform cloud variable field). We declare that variable as the following within our variables.tf file:
variable "gcp_credentials" {}
Yet, when we plan this within Terraform Cloud we receive the following error:
Warning: Value for undeclared variable
The root module does not declare a variable named "gcp_credentials" but a
value was found in file "/terraform/terraform.tfvars". To use this value, add
a "variable" block to the configuration.
Using a variables file to set an undeclared variable is deprecated and will
become an error in a future release. If you wish to provide certain "global"
settings to all configurations in your organization, use TF_VAR_...
environment variables to set these instead.
Is a large private key like a GCP service account key supposed to be stored or setup differently? Are we missing something with the setup? Is there something that we are missing. Our terraform file is very simple as it’s a proof of concept for terraform cloud.
thank you,