This is the tag for the azurerm terraform provider. This tag should be used alongside the terraform tag for help with the Azure provider in terraform scripts and provisioning azure resources using terraform scripts.
Questions tagged [azure-rm]
336 questions
10
votes
4 answers
Get Azure resource group creation time
Intent: Know when a resource group was created for the first time. The client organization wants to report and act on resource group creation timestamps. This will be used in automation scripts.
Unfortunately there is no creation timestamp property…

rcabr
- 1,298
- 10
- 20
9
votes
1 answer
How to check the value is present in list or not using terraform 0.13.5?
I need to check the value that exists in a variable or not and based on that I need to create resources.
If value_list doesn't have these values('abc','def','ghi') it should not create the resource.
What I'm trying here is:
Converting the string…

bluebud
- 183
- 1
- 1
- 10
8
votes
2 answers
How can I use Terraform to create a service principal and use that principal in a provider?
I have read the write-ups online but they dont seem to cover this topic completely and was hoping someone who has done it may have some direction for me.
We are setting up a complicated Terraform template to satisfy our IaC requirements relating to…

CoreyZ
- 189
- 2
- 3
- 11
7
votes
5 answers
terraform azurerm : Error waiting for the Azure CLI: exit status 1
When trying to run terraform locally with azurerm provider on my machine, I receive this error :
Error: Error building account: Error getting authenticated object ID: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI:…

Karol Deland
- 331
- 1
- 2
- 8
5
votes
1 answer
How to conditionally skip a part of terraform resource from being created/implemented using terrraform
How to conditionally skip a part of terraform resource from being created/implemented using terraform?
# main.tf file
locals {
vnet_type = (var.vnet_type != "" ? var.vnet_type : "None")
}
data "azurerm_virtual_network" vnet {
name = "testvnet"
…

devops-admin
- 1,447
- 1
- 15
- 26
5
votes
2 answers
Terraform flatten tuple to set of string
I have the following terraform allowed_ips tuple which contains a json of ip address and metadata about each ip. I am trying to flatten the tuple, to get a list of ip addresses in the format ["2.2.2.2", "3.3.3.3"] will then be passed to ip_rules…

Michele
- 148
- 1
- 2
- 11
5
votes
0 answers
Attempting to debug the terraform-provider-azurerm so that I can contribute to the community. But terraform plan crashes
Introduction
Hi guys, I am trying to get started with contributing to the terraform-provider-azurerm. I have noticed a problem with the azurerm_firewall_network_rule_collection I have reported it here. I thought I should take this as an opportunity…

miniGweek
- 380
- 4
- 15
5
votes
2 answers
How to create a multi-tenant Service Principal in Azure using Terraform
I have a service principal in one tenant that needs access to an Azure Container Registry in another tenant. However, I am not sure as to how to create the azurerm_role_assignment for the same. Is there a way to configure the service principal as…

Akash Masand
- 1,441
- 14
- 30
5
votes
2 answers
Terraform: Code="LinkedInvalidPropertyId" Message="Property id '' at path 'properties.hostingEnvironmentProfile.id' is invalid
Ever since last night I get an error when deploying my web app to azure using Terraform:
Error creating/updating App Service Plan "test-euw-asp" (Resource Group "test-middle-euw-rg"): web.AppServicePlansClient#CreateOrUpdate: Failure sending…

Enrico
- 2,734
- 1
- 27
- 40
4
votes
2 answers
Terraform azurerm schedule start_time always resets on new deploys
I am trying to get the resource azurerm_automation_schedule to deploy at a specific time (ex: 18:00) occurring monthly.
I'm using the following code:
locals {
update_time = "18:00"
update_date = formatdate("YYYY-MM-DD", timeadd(timestamp(),…

Eric Longstreet
- 783
- 1
- 9
- 23
4
votes
1 answer
Az / AzureRM / Legacy Azure Powershell Conflicts
I'm trying to upgrade from AzureRM to the new Az module for powershell. We still have multiple usages of "legacy" service management API resources, such as classic Azure Cloud Services, and these (as far as I know) still require the use of the old…

RMD
- 3,421
- 7
- 39
- 85
4
votes
2 answers
azure-arm winrm timed out error using packer
I used my existing VNET, Resource group, Subnet to be used by packer for creating a VM and take an image from it. I have taken the Windows image from the market place. The packer launches a Vm but times out while connecting to it.
I have included my…

Anbu Kugan
- 61
- 1
- 5
3
votes
1 answer
terraform - azurerm. Difference between Standard_LRS and StandardSSD_LRS
What is the difference between terraform Standard_LRS and StandardSSD_LRS?
Terraform documentation points only, that you can chose one of those 2 but doesn't precise what is the difference.
Is Standard_LRS an HHD disk? Or can it be SSD disk also?

Irina
- 33
- 1
- 3
3
votes
3 answers
Terraform Azure AKS - how to set UAMI as kubelet_identity for AKS cluster
Looking at terraform documentation I have trouble determining how to assign UAMI as kubelet_identity for aks cluster.
The identity { ... } block which sets controlPlane UAMI as described here is not what I am looking for.
The question is - is there…

PMuz
- 55
- 8
3
votes
1 answer
Extend disk SQL Server virtual machine by using Terraform
I'm trying to extend the SQL Server "data"/ "log" disk by using Terraform.
We currently use Terraform to deploy the following (some snippets for a test deployment) which is working perfect and deploys the machine perfectly:
resource…

BassievanAdriaan
- 31
- 2