Terraform-provider-azurerm: azurerm_application_insight: application_type

Created on 16 Nov 2018  ·  6Comments  ·  Source: terraform-providers/terraform-provider-azurerm

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

Terraform v0.11.10

  • provider.azurerm v1.18.0

Affected Resource(s)

  • azurerm_application_insights

Terraform Configuration Files

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"
}

Debug Output

-/+ azurerm_application_insights.my-appinsights (new resource required)
application_type: "ASP.NET web application" => "Web" (forces new resource)

Expected Behavior

For "Web" to work __or__ to have "ASP.Net web application" as an option.

Actual Behavior

"Web" does not work as terraform finds that the application_type is "ASP.NET web application"

question servicapplication-insights

All 6 comments

@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.

Steps to Reproduce:

  • Create an application insight resource with the "ASP.Net web application" type
  • Import the resource in terraform

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!

Was this page helpful?
0 / 5 - 0 ratings