Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags on EventHubNamespace do not work properly #12003

Closed
chdalski opened this issue May 28, 2021 · 7 comments
Closed

Tags on EventHubNamespace do not work properly #12003

chdalski opened this issue May 28, 2021 · 7 comments

Comments

@chdalski
Copy link

Hi there,

azurerm doesn't fetch the tags from an eventhub_namespace as expected.

Please see below for details.

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

Verifying Terraform installation...
/opt/hostedtoolcache/terraform/0.15.4/x64/terraform version
Terraform v0.15.4
on linux_amd64

Initializing provider plugins...

  • Finding latest version of hashicorp/azurerm...
  • Installing hashicorp/azurerm v2.61.0...
  • Installed hashicorp/azurerm v2.61.0 (signed by HashiCorp)

Affected Resource(s)

  • azurerm_eventhub_namespace

Terraform Configuration Files

resource "azurerm_eventhub_namespace" "event_hub_namespace" {
  name                     = "example"
  resource_group_name      = var.resource_group_name
  location                 = var.location
  sku                      = "Standard"
  capacity                 = 1
  auto_inflate_enabled     = true
  maximum_throughput_units = 4

  tags = {
     Environment       = "test"
     ResourceGroupName = "TEST-RG"
  }
}

Expected Behaviour

"terraform apply" applies the tags correctly

after applying the next "terraform plan" should show no changes

Actual Behaviour

"terraform apply" applies the tags correctly

after applying the next "terraform plan shows:

  # azurerm_eventhub_namespace.event_hub_namespace will be updated in-place
  ~ resource "azurerm_eventhub_namespace" "example" {
        id                                  = "/subscriptions/XYZ/resourceGroups/TEST-RG/providers/Microsoft.EventHub/namespaces/example"
        name                                = "example"
      ~ tags                                = {
          ~ "Environment"       = "TEST-RG" -> "test"
            # (1 unchanged element hidden)
        }
        # (12 unchanged attributes hidden)
    }

Somehow the tags are incorrectly read by azurerm from the eventhub_namespace.
The tags are correctly displayed in Azure Portal.

@alex-3sr
Copy link

Hi,

I can confirm the whole point. it detect now drift with all tags since we updated last version 2.61

Thanks
Alexandre

@ces16
Copy link

ces16 commented Jun 2, 2021

The problem isn't present in version 2.60.

@drdamour
Copy link
Contributor

drdamour commented Jun 3, 2021

i thought maybe this was our blueprint doing something bad..but guess it's terraform. No plan comes back as clean now :(

@jfcroteau
Copy link

I'm having the same issue. I tried with terraform 0.14.0 and 0.14.11, azurerm provider 2.22.0 and 2.62.0. I tried a couple of combination without success.

Looks like it takes one of the tags value randomly, and applies its value to all other tags.

@tombuildsstuff
Copy link
Contributor

Fixed via #12062

@tombuildsstuff tombuildsstuff removed their assignment Jun 7, 2021
@ghost
Copy link

ghost commented Jun 11, 2021

This has been released in version 2.63.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.63.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants