Access Terraform variables in Azure DevOps pipeline "Azure CLI" task

Venkata Kolla 41 Reputation points

I am building a Linux VM using Azure DevOps and Terraform scripts. I have the necessity to add an IP configuration of type static & secondary using Azure CLI task after Terraform APPLY(Currently, we do not have the provision to add IP configuration using Terraform script as they're controlled by a governing body).

I'm using the below AZ CLI command, need inputs as to how I can pass VM name, Computer name, and private ip address as variables that are already defined in Terraform files(.tfvars). Any suggestions are appreciated.

az network nic ip-config create -g MyRG --nic-name $VMName-nic-1 --private-ip-address $sec-ip-address --name $computerName-traffic-config

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,975 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,666 Reputation points

    Hi Venkat,

    Question seems more related to setting up Azure pipelines.

    Azure DevOps related questions are not supported on this forum. It's better to reach out to dedicated forum over here:

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

0 additional answers

Sort by: Most helpful