We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to have multiple TF_VAR_<var.name> env Variables. For this i've update my tf template
- task: TerraformTaskV4@4 inputs: provider: 'azurerm' command: 'init' backendServiceArm: ${{ parameters.SERVICE_CONNECTION }} backendAzureRmResourceGroupName: ${{ parameters.TF_STATE_BLOB_ACCOUNT_RESOURCE_GROUP_NAME }} backendAzureRmStorageAccountName: ${{ parameters.TF_STATE_BLOB_ACCOUNT_NAME }} backendAzureRmContainerName: ${{ parameters.TF_STATE_BLOB_CONTAINER_NAME }} backendAzureRmKey: ${{ parameters.TF_STATE_BLOB_FILE }} workingDirectory: '${{ parameters.RELATIVE_WORKING_DIR }}' backendAzureRmUseEnvironmentVariablesForAuthentication: true backendAzureRmUseEntraIdForAuthentication: true displayName: 'Terraform Init' # ${{ each item in parameters.envVars }}: # ${{ item.name }}: ${{ item.value }} # ${{ each item in parameters.tfVars }}: # TF_VAR_${{ item.name }}: ${{ item.value }}
And this is how I call the template
- template: terraform/tf-plan.yml@pipeline-templates parameters: SERVICE_CONNECTION: ${{ variables.service_connection }} TF_VERSION: $(TF_VERSION) TF_STATE_BLOB_ACCOUNT_NAME: $(tf_state_blob_account_name) TF_STATE_BLOB_CONTAINER_NAME: $(tf_state_blob_container_name) TF_STATE_BLOB_FILE: $(tf_state_blob_file) TF_STATE_BLOB_ACCOUNT_RESOURCE_GROUP_NAME: $(tf_state_blob_account_resource_group_name) RELATIVE_WORKING_DIR: $(tf_working_dir) tfVars: var1: $(va1) var2: $(var2) tfvarsFile: "../tf/vars/$(environment)/$(environment).tfvars"
and i got
(Line: 61, Col: 7): 'TF_VAR_' is already defined
Any assistance is appreciated Thanks!
The text was updated successfully, but these errors were encountered:
Hi, this is not related to the Terraform extension. I would suggest you check MS Learn site for YAML syntax and how Azure Pipelines work.
more on templates: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops&pivots=templates-includes
Br Manuel
Sorry, something went wrong.
No branches or pull requests
I want to have multiple TF_VAR_<var.name> env Variables.
For this i've update my tf template
And this is how I call the template
and i got
Any assistance is appreciated
Thanks!
The text was updated successfully, but these errors were encountered: