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

Azure Function support for Event Grid event subscription #7182

Conversation

jrauschenbusch
Copy link
Contributor

Fixes #7176

Adds Azure Function support to azurerm_eventgrid_event_subscription resource.

@jrauschenbusch jrauschenbusch changed the title R eventgrid event subscription azure function support Azure Function support for Event Grid event subscription Jun 3, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @jrauschenbusch

Thanks for this PR :)

Taking a look through this is looking good - if we can can fix up the comments (and add an acceptance test) then we should be able to kick off the tests and get this merged 👍

Thanks!

website/docs/r/eventgrid_event_subscription.html.markdown Outdated Show resolved Hide resolved
@@ -91,6 +92,30 @@ func resourceArmEventGridEventSubscription() *schema.Resource {
Computed: true,
},

"azure_function_endpoint": {
Copy link
Contributor

Choose a reason for hiding this comment

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

could we add an acceptance test covering this new block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would really like to do an acceptance test for it. Unfortunately, it's pretty much the same as the webhook endpoint, which is also hard to test. You would first have to be able to deploy a function with an input binding of type eventGridBinding out of Terraform. But that is currently not possible as there is no terraform resource for it. It is only possible to deploy a function app, which hosts multiple functions inside.

I started with an implementation of an azurerm_function resource to also be able to write acceptance tests for the function and webhook endpoints of the eventgrid_event_subscription, but it's not that easy to find a good schema design for it.

@jrauschenbusch
Copy link
Contributor Author

@tombuildsstuff Changed everything except the missing acc test. Maybe i can add it by introducing another resource azurerm_function which would allow us to create acceptance tests for the webhook and azure function endpoint setups.

@ghost ghost removed the waiting-response label Jun 4, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @jrauschenbusch

Thanks for pushing those changes - taking a look through this now LGTM 👍

Thanks!

@tombuildsstuff tombuildsstuff added this to the v2.14.0 milestone Jun 5, 2020
@tombuildsstuff
Copy link
Contributor

Tests pass:

Screenshot 2020-06-05 at 12 43 35

@tombuildsstuff tombuildsstuff merged commit e63745a into hashicorp:master Jun 5, 2020
tombuildsstuff added a commit that referenced this pull request Jun 5, 2020
@ghost
Copy link

ghost commented Jun 11, 2020

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

@ghost
Copy link

ghost commented Jul 5, 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 5, 2020
@jrauschenbusch jrauschenbusch deleted the r-eventgrid-event-subscription-azure-function-support branch July 9, 2020 05:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Azure Function endpoints on EventGrid Subscriptions
2 participants