Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stopthatastronaut/d0cf0be0e0cf14bcd585c8601b4b5f54 to your computer and use it in GitHub Desktop.
Save stopthatastronaut/d0cf0be0e0cf14bcd585c8601b4b5f54 to your computer and use it in GitHub Desktop.
(Truncated) gist for terraform azurerm_monitor_alert issue
azurerm_monitor_activity_log_alert.main: Creating...
2021/02/01 11:38:15 [DEBUG] EvalApply: ProviderMeta config value set
2021/02/01 11:38:15 [DEBUG] azurerm_monitor_activity_log_alert.main: applying the planned Create change
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: [DEBUG] AzureRM Request:
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: GET /subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/microsoft.insights/activityLogAlerts/example-activitylogalert?api-version=2017-04-01 HTTP/1.1
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Host: management.azure.com
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: User-Agent: Go/go1.12.6 (amd64-darwin) go-autorest/v13.3.0 Azure-SDK-For-Go/v38.1.0 insights/2019-06-01 HashiCorp Terraform/0.14.5 (+https://www.terraform.io) Terraform Plugin SDK/1.6.0 terraform-provider-azurerm/2.0.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Correlation-Request-Id: 5504bb1e-02c4-2f60-8289-7253b90f5651
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Accept-Encoding: gzip
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5:
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5:
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/microsoft.insights/activityLogAlerts/example-activitylogalert?api-version=2017-04-01:
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: HTTP/2.0 404 Not Found
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Length: 250
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Cache-Control: no-cache
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Type: application/json; charset=utf-8
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Date: Mon, 01 Feb 2021 00:38:17 GMT
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Expires: -1
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Pragma: no-cache
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Strict-Transport-Security: max-age=31536000; includeSubDomains
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Content-Type-Options: nosniff
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Correlation-Request-Id: 5504bb1e-02c4-2f60-8289-7253b90f5651
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Failure-Cause: gateway
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Request-Id: d7b7c546-7f7c-4d57-8fb0-9904b4f6f184
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Routing-Request-Id: AUSTRALIASOUTHEAST:20210201T003817Z:d7b7c546-7f7c-4d57-8fb0-9904b4f6f184
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5:
2021-02-01T11:38:17.223+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: {"error":{"code":"ResourceNotFound","message":"The Resource 'microsoft.insights/activityLogAlerts/example-activitylogalert' under resource group 'example-resources' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: [DEBUG] AzureRM Request:
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: PUT /subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/microsoft.insights/activityLogAlerts/example-activitylogalert?api-version=2017-04-01 HTTP/1.1
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Host: management.azure.com
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: User-Agent: Go/go1.12.6 (amd64-darwin) go-autorest/v13.3.0 Azure-SDK-For-Go/v38.1.0 insights/2019-06-01 HashiCorp Terraform/0.14.5 (+https://www.terraform.io) Terraform Plugin SDK/1.6.0 terraform-provider-azurerm/2.0.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Length: 630
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Type: application/json; charset=utf-8
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Correlation-Request-Id: 5504bb1e-02c4-2f60-8289-7253b90f5651
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Accept-Encoding: gzip
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5:
2021-02-01T11:38:17.224+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: {"location":"global","properties":{"scopes":["/subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources"],"enabled":true,"condition":{"allOf":[{"field":"category","equals":"Recommendation"},{"field":"operationName","equals":"Microsoft.Storage/storageAccounts/write"},{"field":"level","equals":"Critical"},{"field":"resourceId","equals":"/subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/Microsoft.Storage/storageAccounts/sizzleexamplesa"}]},"actions":{"actionGroups":[]},"description":"This alert will monitor a specific storage account updates."},"tags":{}}
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/microsoft.insights/activityLogAlerts/example-activitylogalert?api-version=2017-04-01:
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: HTTP/2.0 400 Bad Request
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Length: 87
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Cache-Control: no-cache
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Content-Type: application/json; charset=utf-8
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Date: Mon, 01 Feb 2021 00:38:23 GMT
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Expires: -1
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Pragma: no-cache
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Server: Microsoft-IIS/10.0
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Strict-Transport-Security: max-age=31536000; includeSubDomains
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Content-Type-Options: nosniff
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Correlation-Request-Id: 5504bb1e-02c4-2f60-8289-7253b90f5651
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Request-Id: southeastasia_76d4a530bdaa4bceab1f4873ac43f04b_637477367024253159
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: X-Ms-Routing-Request-Id: AUSTRALIASOUTHEAST:20210201T003824Z:4f32d922-1a8d-44a5-bff4-c7d2caa63277
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5:
2021-02-01T11:38:24.128+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: {"code":"ConditionValueInvalid","message":"Invalid value Critical for condition level"}
2021/02/01 11:38:24 [DEBUG] azurerm_monitor_activity_log_alert.main: apply errored, but we're indicating that via the Error pointer rather than returning it: Error creating or updating activity log alert "example-activitylogalert" (resource group "example-resources"): insights.ActivityLogAlertsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ConditionValueInvalid" Message="Invalid value Critical for condition level"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment