Open mrinalirao opened 7 months ago
Can you inject these vars into your config version post checkout but pre-upload something like the example below.
- name: set-tfvars #auto tf vars
run: |
echo 'organization="${{ vars.TF_CLOUD_ORGANIZATION }}"' >> pipeline-generated.auto.tfvars
echo 'workspace-yaml-filepath="${{needs.tfe-ws-parent.outputs.admin_fileset}}"' >> pipeline-generated.auto.tfvars
cat pipeline-generated.auto.tfvars
Our team is using the tfc-workflows-github create-run to overwrite a workspace variable and to kick a run. We need a way/workflow to update the workspace variable via the github action workflow.
The terraform config files are in a different repository than from where the github actions are triggered. We are using a TFVAR* env var at the moment, but that only overwrites the variable for that run, but our requirement is that it is persisted in the workspace variables as well.