Relative Content

Tag Archive for google-cloud-platformterraformterraform-provider-gcp

Service account key file is not handled correctly by terraform in gitlab ci/cd

I am using terraform through Gitlab CI/CD to create resources on Google Cloud. To achieve this I have tried two different approaches. (i) Base64 Encoded service account key file locally on my laptop with passphrase and upload that file to repo and then added decoding steps in my .gitlab-ci.yml file in terraform stage. Also, added a path to this decoded file into providers.tf – This approach works without any issues (ii) Base64 Encoded service account key file and added encoded contents as a value to a gitlab CI/CD variable and tried to decode that variable in .gitlab-ci.yml file which runs into error “Error: the string provided in credentials is neither valid json nor a valid file path”