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

Venkata Kolla 41 Reputation points
2021-02-17T13:10:13.737+00:00

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.
37,798 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,686 Reputation points
    2021-02-17T13:49:02.943+00:00

    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:

    https://developercommunity.visualstudio.com/spaces/21/index.html


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


0 additional answers

Sort by: Most helpful