azurerm_container_app - Set resource id right after resource is created#28513
azurerm_container_app - Set resource id right after resource is created#28513magodo wants to merge 1 commit intohashicorp:mainfrom
azurerm_container_app - Set resource id right after resource is created#28513Conversation
|
Any chance this can be reviewed soon? This is blocking us from using AzureRM to provision container apps and forcing us to use AzAPI instead. |
There was a problem hiding this comment.
Hey @magodo, I don't believe we want to take this approach. Our view is that polling must succeed before we set a resource into state otherwise, we don't know what the state of the resource is or how to get out of a bad situation.
We are looking at adding a way to skip import checking to allow for people to get out of this type of situation but that's still a ways out. Until then, this isn't something we want to accept into the provider.
|
@mbfrahry For most (tracked) resources in ARM, if not 100%, they are guaranteed to be recorded in ARM (meaning you can Regarding skip import checking, if I understand correct, it means we'll skip the existance check. I think that will bring even more severe issues? |
|
We have an internal issue to investigate this issue further this quarter and decide whether we adjust our stance on setting the ID after polling completes or whether we take the approach of exposing a feature flag that allows users to skip the import check as @mbfrahry mentioned above. For now, I'm going to close this PR as this is not something we want to do merge at this point. |
Community Note
Description
Creating the
azurerm_container_appis an async operation, especially that the LRO part includes pulling container images, which can fail if configured incorrectly.This PR is to move up the resource set in TF right after the "sync" part of the creation succeeded and the resource record created in Azure. The benefit is that even if the LRO part later failed, users won't have to manually import and delete the resource themselves.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_container_app- Set resource id right after resource is created [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #28511
Note
If this PR changes meaningfully during the course of review please update the title and description as required.