terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

azurerm_firewall_policy requires tag keys to be lowercase

Open anderius opened this issue 4 years ago • 11 comments
trafficstars

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.13.5

  • provider registry.terraform.io/hashicorp/azurerm v2.38.0

Affected Resource(s)

  • azurerm_firewall_policy

Terraform Configuration Files

resource "azurerm_firewall_policy" "xxxxxx" {
  [...]
  tags =   { Xxxxxxxx = "xxx" }
  )
}

Debug Output

Error: a tag key "Xxxxxxxx" expected to be all in lowercase

  on xxxxxxxx.tf line xx, in resource "azurerm_firewall_policy" "xxxxxxx":
  xx: resource "azurerm_firewall_policy" "xxxxxxx" {

Expected behaviour

Do not require tag keys to be lowercase.

anderius avatar Dec 02 '20 10:12 anderius

Awaiting fix from Azure team: Azure/azure-rest-api-specs#11899

anderius avatar Dec 02 '20 11:12 anderius

I am also seeing this for azurerm_data_share_account, not sure if it is related or I need to open a separate issue.

YbK5730 avatar Aug 19 '21 11:08 YbK5730

Awaiting fix from Azure team: Azure/azure-rest-api-specs#11899

Is there an ETA on this fix?

anhlqn avatar Aug 26 '21 18:08 anhlqn

bump .. just hit this on latest version = v1.0.11

andyjballgit avatar Dec 04 '21 14:12 andyjballgit

bump .... experienced this on terraform version 1.1.5, any update on this?

dan-dimitrov avatar Feb 03 '22 14:02 dan-dimitrov

Experiencing this with v1.1.5 & azurerm v2.94.0

lotaezhao avatar Feb 03 '22 20:02 lotaezhao

Any hope to release a fix for this bug? Terraform v1.1.5 - azurerm v2.98.0

robsoncloud avatar Mar 14 '22 10:03 robsoncloud

Is there any update on this? This issue has been raised long time ago...

jakubigla avatar Mar 24 '22 15:03 jakubigla

I encountered the same problem and I was able to fix it using below. tags = tomap({for key, val in var.tags: lower(key)=>lower(val)}) I hope this helps you

falowomi avatar Jul 22 '22 22:07 falowomi

Thank you @falowomi.

We could remove lower from the value: tags = tomap({for key, val in var.tags: lower(key)=>val})

asosso avatar Jul 28 '22 14:07 asosso

Annoying because Terraform wants to remove the existing tags and replace them with lowercase, even using the workaround above. I added a lifecycle to ignore changes to the tags, and all is good.

wylie-ucb avatar Oct 26 '22 01:10 wylie-ucb