Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.
azurerm_application_insights_api_key.example: Still creating... [20s elapsed]
azurerm_application_insights_api_key.example: Still creating... [30s elapsed]
azurerm_application_insights_api_key.example: Still creating... [40s elapsed]
azurerm_application_insights_api_key.example: Still creating... [50s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m0s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m10s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m20s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m30s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m40s elapsed]
azurerm_application_insights_api_key.example: Still creating... [1m50s elapsed]
azurerm_application_insights_api_key.example: Still creating... [2m0s elapsed]
azurerm_application_insights_api_key.example: Still creating... [2m10s elapsed]
azurerm_application_insights_api_key.example: Still creating... [2m20s elapsed]
Expected Behaviour
If the appinsights resourceazurerm_application_insights.example already has an api-key configured which is not meant to be managed by the current terraform state the resource azurerm_application_insights_api_key.read_telemetry should just ignore that existing key and manage the key described in the tf resource without issues.
Actual Behaviour
If there is already a key present which is not meant to be managed by the current terraform state the resource provider azurerm_application_insights_api_key ends up in an infinite loop unable to exit until the terraform timeout of that resource is reached. It is not possible to add another key as long the unmanaged one is existing.
Steps to Reproduce
Create an API Key in appinsights manually (name it differently than the one in the attached configuration)
Is there an existing issue for this?
Community Note
Terraform Version
v1.9.6
AzureRM Provider Version
4.9.0
Affected Resource(s)/Data Source(s)
application_insights_api_key
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
If the appinsights resource
azurerm_application_insights.example
already has an api-key configured which is not meant to be managed by the current terraform state the resourceazurerm_application_insights_api_key.read_telemetry
should just ignore that existing key and manage the key described in the tf resource without issues.Actual Behaviour
If there is already a key present which is not meant to be managed by the current terraform state the resource provider
azurerm_application_insights_api_key
ends up in an infinite loop unable to exit until the terraform timeout of that resource is reached. It is not possible to add another key as long the unmanaged one is existing.Steps to Reproduce
Important Factoids
no
References
I already created a PR for a potential fix: https://github.com/hashicorp/terraform-provider-azurerm/pull/28037