1= In this case we already have a virtual network with RG in azure portal and a anothe rRG with state file so we are fetching those using data block 2= We are creating a RG and a NIc and a VM here
**ADded these things **
1= Azure portal service principal create in auzre CLI
az account show az account set --subscription="nameofsubscription"
az ad sp ado --name MyServicePrincipalName --role Contributor --scopes /subscriptions/1b996d81-8d39-47ee-bc3c-436b7f6214fe
az ad sp create-for-rbac --name AdoSP --role Contributor --scopes /subscriptions/1b996d81-8d39-47ee-bc3c-436b7f6214fe { "appId": "**********", / Client ID (Application ID) "displayName": "AdoSP", "password": "-", // Client Secret "tenant": "” // Tenant ID }
3= Service principal authenticate to ADO give ADO contibutor access
4= Pipelines -> library -> variable group create and added SP values
5=
Added 2 values in both and save
2= error while running terraform plan and apply az feature register --namespace Microsoft.Compute --name EncryptionAtHost --subscription 1b996d81-8d39-47ee-bc3c-436b7f6214fe
az provider register --namespace Microsoft.Compute --subscription 1b996d81-8d39-47ee-bc3c-436b7f6214fe