Terraform-provider-azurerm: azurerm_application_insights - failure on create or update actions

Created on 14 Aug 2018  ·  4Comments  ·  Source: terraform-providers/terraform-provider-azurerm

It seems that the App insights Terraform resource is failing to create the corresponding Azure resource, possibly due to an uncontrolled change introduced in the Azure APIs.

The same resource using the ARM format can be created successfully:

...
        {
            "type": "microsoft.insights/components",
            "name": "myappinsights",
            "apiVersion": "2015-05-01",
            "location": "Southeast Asia",
            "kind": "web",
            "properties": {
              "Application_Type": "web"
            }
        }
...

Terraform Version

Terraform v0.11.7
Terraform Azure provider 1.12.0

Affected Resource(s)

azurerm_application_insights

Terraform Configuration Files

resource "azurerm_application_insights" "test" {
  name                = "myappinsights"
  resource_group_name = "mygroup"
  location            = "Southeast Asia"
  application_type    = "Web"
}

Output

* azurerm_application_insights.test: insights.ComponentsClient#CreateOrUpdate: Failure responding to request: StatusCode=201 -- Original Error: autorest/azure: Service returned an error. Status=201 Code="Unknown" Message="Unknown service error" Details=...
bug servicapplication-insights

Most helpful comment

hey @willgarcia

Just to give an update here - I've opened #1769 which includes a fix for this which will go out in the next release of the Provider.

Thanks!

All 4 comments

hey @willgarcia

Thanks for opening this issue :)

Taking a quick look into this I can confirm there's a breaking change here which has been made to the API which doesn't match what the SDK supports (either in the version of the SDK that we're using, or the latest version) - but I'll look into what we can do about fixing this today.

Thanks!

hey @willgarcia

Just to give an update here - I've opened #1769 which includes a fix for this which will go out in the next release of the Provider.

Thanks!

Hi @tombuildsstuff, thanks a lot for the fix and new release 1.13.0!

Good to know that we can track this type of issues on the Azure sdk github repo as well, by checking the Swagger spec :) I initially came across the HTTP 201 response code (with TF_LOG=debug) but could not confirm if it was an Azure API change or not.

Thanks

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