skip to Main Content

Terraform tasks to deploy on azure cloud

i am trying to deploy azure resources through terraform and configured below task to run terraform init. - task: TerraformTaskV4@4 inputs: provider: 'azurerm' command: 'init' workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' commandOptions: '-migrate-state' backendAzureRmUseEnvironmentVariablesForAuthentication: true backendAzureRmUseEntraIdForAuthentication: true backendServiceArm: 'xxxxxxxxxx' backendAzureRmResourceGroupName: 'rg-terrstore-dev' backendAzureRmStorageAccountName: 'saterrstordev' backendAzureRmContainerName:…

VIEW QUESTION

Azure – how to variablize the resource attribute as input value in terraform

I am trying to use below code data "azurerm_resource_group" "rg_tst_na" { name = "test1" } data "azurerm_resource_group" "rg_dev_na" { name = "test2" } resource "azurerm_role_assignment" "test_role_assign" { for_each = var.test_role_assignment principal_id = azurerm_user_assigned_identity.test_setup["${each.key}_${each.value}"].principal_id # this is created as separate resource…

VIEW QUESTION
Back To Top
Search