Terraform v0.11.10
resource "azurerm_application_insights" "my-appinsights" {
name = "myrg"
location = "${data.azurerm_resource_group.myrg.location}"
resource_group_name = "${data.azurerm_resource_group.myrg.name}"
application_type = "Web"
}
-/+ azurerm_application_insights.my-appinsights (new resource required)
application_type: "ASP.NET web application" => "Web" (forces new resource)
For "Web" to work __or__ to have "ASP.Net web application" as an option.
"Web" does not work as terraform finds that the application_type is "ASP.NET web application"
@Midacts thanks for raising this issue. I did a local test with below configuration, could not see the same issue as you.
resource "azurerm_resource_group" "test" {
name = "k8s-log-analytics-test"
location = "westeurope"
}
resource "random_id" "workspace" {
keepers = {
# Generate a new id each time we switch to a new resource group
group_name = "${azurerm_resource_group.test.name}"
}
byte_length = 8
}
resource "azurerm_application_insights" "my-appinsights" {
name = "myrg"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
application_type = "Web"
}
Can you double confirm if you still have this issue with above configuration ?
I can confirm I run into this issue.
terraform plan will say it is going to destroy the resource since the application type does not match:
application_type: "ASP.NET web application" => "Web"
@Midacts thanks for providing the reproduce step here. I will do a reproduce on my side and share more information then. Please stay tuned for my further updates.
@Midacts ASP.NET web application is the representation string on Azure portal. From the ARM API perspective, the value of application_type is always web.
You can find a full list of supported application_type at:
https://www.terraform.io/docs/providers/azurerm/r/application_insights.html#application_type
Thanks for looking into this and verifying.
I think that answers the questions so I will close the issue.
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!