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
When deleting a parent resources outside of TF and TF declares also child resources under this parent, a newly run tf plan causes 404 errors for each child resources.
Top level resources are handled fine in that scenario, TF handles the external deletion and would rectify it by recreation of said resources. The same should, in general, hold true for child resources. Currently it does not.
This also affects key vault secrets and probably some other types, but those are the two i encounter regularly.
I know that in some cases, it cannot be distinguished between the resource being gone or firewall/permissions keep TF from refreshing. This should be influenced by provider feature flags.
Expected Behaviour
E.g. Azure App Config: I delete the whole Config Resource manually. I run TF plan and tf plan recognizes it as an external change and would recreate the App Config and all declared App Config Keys within.
Actual Behaviour
tf plan fails:
with azurerm_app_configuration_key.example,
│ on example.tf line xy, in resource "azurerm_app_configuration_key" "example":
│ xz: resource "azurerm_app_configuration_key" "example" {
│
│ configurationstores.ConfigurationStoresClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound"
│ Message="The Resource 'Microsoft.AppConfiguration/configurationStores/example' under resource group 'example' was not found. For more details please go to
│ https://aka.ms/ARMResourceNotFoundFix"
Workaround
tf state rm for the child resources
The text was updated successfully, but these errors were encountered:
tombuildsstuff
changed the title
Deleting parent resources outside of tf causes plan to fail with 404 for child resources
app_configuration_key should detect the parent app_configuration has been deleted
Dec 20, 2021
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Terraform v1.1.1
on linux_amd64
Affected Resource(s)
azurerm_app_configuration_key
azurerm_key_vault_secret
)Description
When deleting a parent resources outside of TF and TF declares also child resources under this parent, a newly run
tf plan
causes 404 errors for each child resources.Top level resources are handled fine in that scenario, TF handles the external deletion and would rectify it by recreation of said resources. The same should, in general, hold true for child resources. Currently it does not.
This also affects key vault secrets and probably some other types, but those are the two i encounter regularly.
I know that in some cases, it cannot be distinguished between the resource being gone or firewall/permissions keep TF from refreshing. This should be influenced by provider feature flags.
Expected Behaviour
E.g. Azure App Config: I delete the whole Config Resource manually. I run TF plan and tf plan recognizes it as an external change and would recreate the App Config and all declared App Config Keys within.
Actual Behaviour
tf plan fails:
Workaround
tf state rm
for the child resourcesThe text was updated successfully, but these errors were encountered: