-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
terraform always wants to recreate azurerm_api_management_api_tag #24705
Comments
Looks like this, and a few other issues, were introduced by #23031 |
This fixes hashicorp#24705 by removing the code that updates the API ID to no longer have the `;rev=XYZ` revision segment in the ID. This was causing the API tag to be recreated on each run, even if the tag did not change.
Hello @sven5 @alexwiese i am still facing this issue . in my case with each plan 45 tags get replaced so its a big issue for me . |
I haven't been working on our terraform scripts for a while, but I assume this still exists. |
We're still waiting for the merge... 😢 |
* Don't update the api_id of the API tag This fixes #24705 by removing the code that updates the API ID to no longer have the `;rev=XYZ` revision segment in the ID. This was causing the API tag to be recreated on each run, even if the tag did not change. * Update api_management_api_tag_resource.go * Update api_management_api_tag_resource.go * Only include changes in v4.0 * Format
@sven5 @stephybun |
@J0F3 there is a detailed discussion within the PR on the issue as well the fix. TL;DR we can't roll the fix out until we release the next major version 4.0 of the provider since all of the tags need to be recreated. This has been implemented behind a feature flag so the functionality is in the provider, but won't be switched on until 4.0. |
@stephybun Ah ok, got you. Thanks for the update. |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.7.1
AzureRM Provider Version
3.89.0
Affected Resource(s)/Data Source(s)
azurerm_api_management_api_tag
Terraform Configuration Files
Hi,
When dealing with
azurerm_api_management_api_tag
terraform always wants to recreate the same item because the suffix;rev=10
is being ignored.Example:
Debug Output/Panic Output
Output from
tf plan
module.api_management_2[0].azurerm_api_management_api_tag.apim_api_tag[11] must be replaced
After applying, the same change is still present when issuing a new plan.
Output from
tf state
for this resource:module.api_management_2[0].azurerm_api_management_api_tag.apim_api_tag[11]:
We can see that the suffix
;rev=10
is missing in the state.Expected Behaviour
The API tag should not be identified as a change because it's already present.
Actual Behaviour
The API tag is always recreated.
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: