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

Unable to set state of EventGrid Event Subscription with hybrid connection #7197

Closed
DSakura207 opened this issue Jun 3, 2020 · 2 comments · Fixed by #7203
Closed

Unable to set state of EventGrid Event Subscription with hybrid connection #7197

DSakura207 opened this issue Jun 3, 2020 · 2 comments · Fixed by #7203
Milestone

Comments

@DSakura207
Copy link
Contributor

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.26
provider.azurerm v2.12.0

Affected Resource(s)

  • azurerm_eventgrid_event_subscription

Terraform Configuration Files

terraform {
  required_version = ">= 0.12, < 0.13, < 1.0"
}

provider "azurerm" {
  version = "=2.12.0"
  features {}
}

resource azurerm_resource_group "main" {
  name = "rg-eventsub-repo"
  location = "westus"
}

resource "azurerm_relay_namespace" "main" {
  name                = "rly-eventsub-repo"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name

  sku_name = "Standard"
}

resource "azurerm_relay_hybrid_connection" "main" {
  name                          = "rhc-eventsub-repo"
  resource_group_name           = azurerm_resource_group.main.name
  relay_namespace_name          = azurerm_relay_namespace.main.name
  requires_client_authorization = false
}

resource "azurerm_eventgrid_topic" "main" {
  name                = "evg-eventsub-repo"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name
}

resource "azurerm_eventgrid_event_subscription" "main" {
  name = "mediatransform-subscription"
  scope = azurerm_eventgrid_topic.main.id
  hybrid_connection_endpoint_id = azurerm_relay_hybrid_connection.main.id
}

Debug Output

https://gist.github.com/DSakura207/a895852c0c64b487b76c46a617cbe853

Panic Output

Expected Behavior

Resources are created and state is set.

Actual Behavior

Resources are created, but terraform is unable to set state of Event Grid Event Subscription.

Error: Error setting "hybrid_connection_endpoint" for EventGrid Event Subscription "mediatransform-subscription" (Scope "/subscriptions/c07f2cac-27a0-4416-938a-4f20c3097161/resourceGroups/rg-eventsub-repo/providers/Microsoft.EventGrid/topics/evg-eventsub-repo"): Invalid address to set: []string{"hybrid_connection_endpoint", "0", "eventhub_id"}

on main.tf line 36, in resource "azurerm_eventgrid_event_subscription" "main":
36: resource "azurerm_eventgrid_event_subscription" "main" {

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@ghost
Copy link

ghost commented Jun 4, 2020

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

@ghost
Copy link

ghost commented Jul 4, 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 Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants