Skip to content
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

Azurerm_application_insights_web_test always forces replacement after resource is changed in Portal #8356

Closed
lyubomirr opened this issue Sep 4, 2020 · 3 comments · Fixed by #8372

Comments

@lyubomirr
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, 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

Terraform (and AzureRM Provider) Version

Both 2.24.0 and 2.23.0

Affected Resource(s)

azurerm_application_insights_web_test

Terraform Configuration Files

resource "azurerm_application_insights_web_test" "availability_test" {
...
  kind = "ping"
...

Expected Behavior

There shoudn't be change detected in "kind" property after changing some setting in Azure Portal.

Actual Behavior

terraform plan says that the argument "kind" is added with value of "ping" and needs replacement:

+ kind = "ping" # forces replacement

Steps to Reproduce

  1. Create new azurerm_application_insights_web_test with kind "ping"
  2. Run terraform apply
  3. Go to portal and change something - e.g add another region and then remove it (thats what I did)
  4. Run terraform plan
@magodo
Copy link
Collaborator

magodo commented Sep 7, 2020

@lyubomirr Thank you for submitting this!

The problem derives from the fact that Portal will not keep the .kind property in the API request when you editing the webtest, while it should do. #8372 will workaround this errornous behavior of Portal.

Besides, after you editing on Portal, the timeout will be changed into another default value picked by Portal, 120sec, and you will ends up seeing diff. Also, the test config will also be changed since Portal will change it. But those are in-place update fields, so you will not see terraform mark the resource to be replaced in that case.

Ultimately, we suggest Terraform users to manage Azure resource using Terraform only. A mix use of Terraform and Portal will cause problems like what you already encounted.

@lyubomirr
Copy link
Author

@magodo Thank you very much for the quick answer and the pending fix!

@ghost
Copy link

ghost commented Oct 7, 2020

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 ghost locked as resolved and limited conversation to collaborators Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants