Azure application Insights

azurerm version “~> 2.3.0”
terraform version = v0.12.24
azurerm = “>=1.40”

resource “azurerm_resource_group” “test” {
name = “rg-test”
location = “westus”

resource “azurerm_application_insights” “main” {
application_type = “web”
location = “westus”
name = format("%s-%s-%s-%s ", “appins”, “cl”, “dr”, “001”)
resource_group_name =
retention_in_days = 30
daily_data_cap_in_gb = 100
sampling_percentage = 100

The above resource creation fails with below error

Error: Error read Application Insights Billing Features "appins-cl-dr-001 " (Resource Group “rg-test”): insights.ComponentCurrentBillingFeaturesClient#Get: Failure responding to request: StatusCode=404 – Original Error: autorest/azure: Service returned an error. Status=404 Code=“ResourceNotFound” Message=“The Resource 'Microsoft.Insights/components/appins-cl-dr-001 ’ under resource group ‘rg-test’ was not found.”

However, if I hard code the name below it works perfectly fine.

name = “appins-cl-dr-001”

Can someone please help here. Not sure if this is a bug or expected behaviour.

Me too. I have just got the same error for the first time out of the blue. No idea what it is all about.


Guys, has anyone else seen this? We now experience it consistently. Feels like a bug in azurerm provider, but before opening it I am curious if other folks have faced it already.

Hi, I have just encountered this error while trying to import an Application Insights Ping Test… Any ideas of how to fix it?

I have got the same issue as well. Any idea how to fix this?

What region are you using? I hit this issue only when building against UKWest.

I am getting this in East US. I dont think it is region specific