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

azurerm_iothub does not remove endpoints and routes #5065

Closed
ukphillips opened this issue Dec 4, 2019 · 3 comments · Fixed by #8028
Closed

azurerm_iothub does not remove endpoints and routes #5065

ukphillips opened this issue Dec 4, 2019 · 3 comments · Fixed by #8028

Comments

@ukphillips
Copy link

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.12.9

  • provider.azurerm v1.37.0

Affected Resource(s)

  • azurerm_iothub

Terraform Configuration Files

resource "azurerm_iothub" "module" {
  name                = "testiothubxyz"
  resource_group_name = "test-fixture-sandbox"
  location            = "eastus2"

  sku {
    name     = "S1"
    tier     = "Standard"
    capacity = "1"
  }

endpoint {
    type              = "AzureIotHub.EventHub"
    connection_string = "XXXXXXXXXXXXXXXX"
    name              = "telemetry"
  }

  route {
    name           = "telemetry-eventhub"
    source         = "DeviceMessages"
    condition      = "true"
    endpoint_names = ["telemetry"]
    enabled        = true
  } 

}

followed by:

resource "azurerm_iothub" "module" {
  name                = "testiothubxyz"
  resource_group_name = "test-fixture-sandbox"
  location            = "eastus2"

  sku {
    name     = "S1"
    tier     = "Standard"
    capacity = "1"
  }
}

Debug Output

N/A

Panic Output

Expected Behavior

Expected IoT hub created with endpoint and route. Followed by the next run removing the endpoint and route

Actual Behavior

Terraform did not detect any changes on the second run, and left existing route/endpoint in place

Steps to Reproduce

  1. terraform apply first block
  2. terraform apply second block

Important Factoids

This appears to be the case across all endpoint and route types event hub, service bus, etc.

References

  • #0000
@neil-yechenwei
Copy link
Contributor

Thanks for opening this issue. Seems terraform doesn't detect the change since there is computed attribute on properties "endpoint" and "route". So I made a fix for it.

@ghost
Copy link

ghost commented Aug 13, 2020

This has been released in version 2.23.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.23.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 10, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants