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
After creating an API and attaching it to a product with Terraform, one should be able to delete the API and, upon recreating it, the API should be attached to the product again.
Actual Behavior
When recreating the API, Terraform creates the API succesfully, but does not see the need to add it to the product, so the API ends up with no product assignment. If one tries assigning it to a different product however, this works successfully.
When performing the plan, terraform does refresh the product_api state, but it thinks the API is still assigned to the product (from its previous assignment) so does not attempt to add it again.
Steps to Reproduce
Declare a new API with azurerm_api_management_api
Add the API to an existing product with azurerm_api_management_product_api
terraform plan & apply, the API is created and added successfully to the product
Manually remove the API from the API Management
Run terraform plan --refresh=true and apply again
Terraform recreates the API but does not assign it to a product
Repeat the above three steps but change the product_id to a different one, TF successfully adds it to the product
Important Factoids
References
#0000
The text was updated successfully, but these errors were encountered:
Pinging @tombuildsstuff since he is the original creator of this resource :)
eugeneromero
changed the title
azurerm_api_management_product_api does not add a new API if it existed previously
azurerm_api_management_product_api does not assign an API to a product if this assignment existed previously
Nov 27, 2019
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Mar 28, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Community Note
Terraform (and AzureRM Provider) Version
1.37.0
Affected Resource(s)
azurerm_api_management_product_api
Terraform Configuration Files
Expected Behavior
After creating an API and attaching it to a product with Terraform, one should be able to delete the API and, upon recreating it, the API should be attached to the product again.
Actual Behavior
When recreating the API, Terraform creates the API succesfully, but does not see the need to add it to the product, so the API ends up with no product assignment. If one tries assigning it to a different product however, this works successfully.
When performing the plan, terraform does refresh the
product_api
state, but it thinks the API is still assigned to the product (from its previous assignment) so does not attempt to add it again.Steps to Reproduce
azurerm_api_management_api
azurerm_api_management_product_api
terraform plan
&apply
, the API is created and added successfully to the productterraform plan --refresh=true
andapply
againproduct_id
to a different one, TF successfully adds it to the productImportant Factoids
References
The text was updated successfully, but these errors were encountered: