Error: Invalid provider configuration (terraform plan locally with TerraformCloud)

Problem

You are trying to run locally the terraform plan, while using the Terraform’s Cloud remote backend, before commiting your changes to your repo and running it through Terraform’s Cloud UI, and you are getting the previous error message:

Error: Invalid provider configuration

Solution

Remember to add the environment variables needed for your provider (AWS, Google, Exoscale etc) in the Variables section of your Terraform Cloud setup.

Even you have added them before, using a new Workspace means you will need to add them to each new workspace.

Decode access secret key from Terraform IAM user creation

Problem

You want to use the pgp encryption when using Terraform to create an AWS IAM user, and you have the secret access token returned as an output but encoded.

Solution

Use the following to get the actual secret key decoded (after copying your encoded key to a file encrypted_key.txt:

$ cat encrypted_key.txt | base64 --decode | gpg -d

Terraform Cloud – ‘operations’ attribute is deprecate, and cannot be used in conjuction with ‘execution’. Use the latter only

Problem

You are trying to add a new workspace in your organization in Terraform Cloud, using the same connected VCS (Gitlab) as the one you already have setup, but you get the above error when trying to add it in Firefox (Linux – Ubuntu – 79).

Solution

Use Chromi(um) to create the workspace as it works there. You can then use it in Firefox as normal.