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

Update Resource: azurerm_eventgrid_event_subscription #6860

Merged

Conversation

jrauschenbusch
Copy link
Contributor

@jrauschenbusch jrauschenbusch commented May 11, 2020

Updates/extends resource azurerm_eventgrid_event_subscription

Additions to resource azurerm_eventgrid_event_subscription:

  • service_bus_queue_endpoint
  • service_bus_topic_endpoint
  • expiration_time_utc

Fixes #4308
Fixes #4857

@jrauschenbusch jrauschenbusch changed the title r/eventgrid_event_subscription: update resource Update Resource: azurerm_eventgrid_event_subscription May 12, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @jrauschenbusch, overallt his looks good with just a couple comments. My main concern is that making each enpoint a block with a single property, while matching the API, doesn't offer and ideal UX and adds complexity to the code. Do you think it would make sense to flatten that out a bit as describe in my comment?

jrauschenbusch and others added 2 commits May 13, 2020 11:59
…cription_resource_test.go


fix: rename test resource group

Co-authored-by: kt <kt@katbyte.me>
…cription_resource_test.go


refactor: reformatting

Co-authored-by: kt <kt@katbyte.me>
@katbyte katbyte self-assigned this May 13, 2020
@jrauschenbusch
Copy link
Contributor Author

@katbyte Can you please review may latest update (Deprecations / ConflictsWith / Constants / Fixes in ExpirationTime expanding / flattening)?

@ghost ghost removed the waiting-response label May 19, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jrauschenbusch! aside from some minor comments on code style this is looking pretty good now 🙂

@katbyte katbyte added this to the v2.11.0 milestone May 20, 2020
@jrauschenbusch
Copy link
Contributor Author

@katbyte no worries 😄everything should be fixed now. plz check it out.

@ghost ghost removed the waiting-response label May 20, 2020
@katbyte katbyte modified the milestones: v2.11.0, v2.12.0 May 22, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for those changes @jrauschenbusch! Some tests where failing so i hope you don't mind but i pushed some fixes for them. Also it seems functions were not working:

 TestAccAzureRMEventGridEventSubscription_azureFunctionID: testing.go:640: Step 0 error: errors during apply:

        Error: Error creating/updating EventGrid Event Subscription "acctest-eg-200524142001966081" (Scope "/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-eg-200524142001966081"): eventgrid.EventSubscriptionsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidRequest" Message="Invalid ARM Id."

          on /var/folders/bc/2t9ylvbn4lj1_nzj7bxj2kzc0000gn/T/tf-test720774928/main.tf line 35:
          (source code not available)

and it seems like that one should be a block as there are other properties to set:

type AzureFunctionEventSubscriptionDestinationProperties struct {
	// ResourceID - The Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription.
	ResourceID *string `json:"resourceId,omitempty"`
	// MaxEventsPerBatch - Maximum number of events per batch.
	MaxEventsPerBatch *int32 `json:"maxEventsPerBatch,omitempty"`
	// PreferredBatchSizeInKilobytes - Preferred batch size in Kilobytes.
	PreferredBatchSizeInKilobytes *int32 `json:"preferredBatchSizeInKilobytes,omitempty"`
}

So i've removed it from this PR so we can get this merged and in for 2.12 - it can be added back in as a new PR.

@katbyte katbyte merged commit 8d11a86 into hashicorp:master May 24, 2020
katbyte added a commit that referenced this pull request May 24, 2020
@ghost
Copy link

ghost commented May 28, 2020

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

pbrit pushed a commit to pbrit/terraform-provider-azurerm that referenced this pull request May 31, 2020
Updates/extends resource azurerm_eventgrid_event_subscription

Additions to resource azurerm_eventgrid_event_subscription:

service_bus_queue_endpoint
service_bus_topic_endpoint
expiration_time_utc
Fixes hashicorp#4308
Fixes hashicorp#4857
pbrit pushed a commit to pbrit/terraform-provider-azurerm that referenced this pull request May 31, 2020
@ghost
Copy link

ghost commented Jun 24, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 24, 2020
@jrauschenbusch jrauschenbusch deleted the r-eventgrid-event-subscription-update branch July 18, 2020 09:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants