You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
When you define a azurerm_function_app with a fixed function artifact using app_settings.WEBSITE_RUN_FROM_PACKAGE, sometimes the apply fails. Since the azurerm_function_app creation finished before the artifact is deployed successfully, subsequent resources like azurerm_eventgrid_event_subscription fail.
Error: Error waiting for EventGrid Event Subscription "example" (Scope "/subscriptions/ae79848e-00d9-4ec8-bf5a-0f9768bb3d3a/resourceGroups/07245d2fhir/providers/Microsoft.EventGrid/topics/example") to become available: Code="Endpoint validation" Message="Destination azure endpoint not found. Resource details: resourceId: /subscriptions/.../resourceGroups/example/providers/Microsoft.Web/sites/example/functions/example. Resource should pre-exist before attempting this operation. Activity id:09a829bc-a0dc-4545-8085-6b3f69cac2aa, timestamp: 7/24/2020 1:24:11 PM (UTC)."
on ../../infrastructure/functions.tf line 48, in resource "azurerm_eventgrid_event_subscription" "example":
48: resource "azurerm_eventgrid_event_subscription" "example" {
Therefore the azurerm_function_app should check for a deployment and wait until it has finished.
New or Affected Resource(s)
azurerm_function_app
References
#0000
The text was updated successfully, but these errors were encountered:
sschmeck
changed the title
azurerm_function_app should wait for function deployment when provided
azurerm_function_app should wait for function deployment
Sep 10, 2020
We have the same problem. Need to create multiple event subscriptions in different Azure subscriptions utilising the same Azure function in a function app in it's own subscription. They get created simultaneously, some are successfully deployed by terraform and some fail with the same error above.
To workaround it for now we use a time_sleep resource for a couple of mins to give sufficient time for the functions in the function app to become available after being deployed from blob storage via the WEBSITE_RUN_FROM_PACKAGE app setting.
Not ideal, but it's OK until this issue gets resolved.
Community Note
Description
When you define a
azurerm_function_app
with a fixed function artifact usingapp_settings
.WEBSITE_RUN_FROM_PACKAGE
, sometimes theapply
fails. Since theazurerm_function_app
creation finished before the artifact is deployed successfully, subsequent resources likeazurerm_eventgrid_event_subscription
fail.Therefore the
azurerm_function_app
should check for a deployment and wait until it has finished.New or Affected Resource(s)
References
The text was updated successfully, but these errors were encountered: