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

Support for Azure Function endpoints on EventGrid Subscriptions #7176

Closed
CodingAnarchy opened this issue Jun 2, 2020 · 3 comments · Fixed by #7182
Closed

Support for Azure Function endpoints on EventGrid Subscriptions #7176

CodingAnarchy opened this issue Jun 2, 2020 · 3 comments · Fixed by #7182

Comments

@CodingAnarchy
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

Description

Azure Functions are a supported endpoint for EventGrid subscription handling, as described in the documentation here.

Currently, azurerm_eventgrid_event_subscription does not support adding such a function as the endpoint.

New or Affected Resource(s)

  • azurerm_function_app
  • azurerm_eventgrid_event_subscription

Potential Terraform Configuration

resource "azurerm_resource_group" "example" {
  name     = "exampleResourceGroup"
  location = "West US 2"
}

resource "azurerm_eventgrid_event_subscription" "example" {
    name = "example"
    scope = azurerm_resource_group.example.id

   function_endpoint {
       function_app_id = azurerm_function_app.example.id
       function_name = "ExampleFunction"
  }

References

  • #0000
@jrauschenbusch
Copy link
Contributor

I already started with an implementation of this. But one has to reference the function endpoint itself (by id) residing inside a function app. Hence one needs to have an already existing function with input binding type eventGridTrigger. As there is currently no way to create a function resource (important: function, not function app) out of the terraform-azurerm-provide, it's nearly impossible to create an acceptance test for it. Hence this would be an only manual tested feature.

One bright spot: there is also a way to deploy Azure functions via the azure-sdk-for-go lib. I've tested a bit using the AppsClient, but it feels like it's not a CRUD-like API. Hence it will not be that easy to write a clean resource type for it.

@tombuildsstuff tombuildsstuff added this to the v2.14.0 milestone 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
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.

4 participants