Hi,
I’m just trying tu use terraform .tf files to code infrastructure.
I’m using protected branches.
I’ve tried succesfully to protect and share variables (GCP for me) to an environment, used in a python script like this:
deploy-cloud-function:
stage: deploy
environment: 0_DEV
image: google/cloud-sdk
script:
- echo $GCP_ACCOUNT_KEY > gcloud-service-key.json
- gcloud auth activate-service-account --key-file gcloud-service-key.json
- gcloud config set project $GCP_PROJECT_ID
- gcloud functions deploy hello-world
--runtime=python39
--entry-point=hello_world
--region=europe-west1
--source=.
--trigger-http
Now I m trying to do the same with terraform, but i don’t know how I can when running terraform script use the protected variables dedicated to the environment…
Any help is welcome,
Thomas