Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autorest/azure: error response cannot be parsed when using azurerm_monitor_metric_alertrule #3777

Closed
avnes opened this issue Jul 3, 2019 · 2 comments

Comments

@avnes
Copy link

avnes commented Jul 3, 2019

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

  • provider.azurerm v1.31.0

Affected Resource(s)

  • azurerm_monitor_metric_alertrule

Terraform Configuration Files

resource "azurerm_monitor_metric_alertrule" "alertrule" {
  resource_group_name = "REDACTED_RESOURCE_GROUP"
  location            = "eastus"
  name                = "myalert"
  description         = "alert for reproduce a bug"
  enabled             = false
  resource_id         = "/subscriptions/REDACTED_SUBSCRIPTION_ID/resourceGroups/REDACTED_RESOURCE_GROUP/providers/Microsoft.Web/sites/REDACTED_APP_SERVICE"
  metric_name         = "Requests"
  operator            = "GreaterThan"
  threshold           = 5000
  aggregation         = "Maximum"
  period              = "PT5M"

  email_action {
    custom_emails = ["REDACTED_EMAIL_ADDRESS"]
  }
}

Debug Output

EDIT: Other issues found when trying to create a debug output. WIll supply new gist when that is sorted out.

Panic Output

N/A

Expected Behavior

Alert should have been created without any error. Please note that this worked yesterday. This issue seems awfull similar to issue #3739

Actual Behavior

Error: insights.AlertRulesClient#CreateOrUpdate: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: error response cannot be parsed: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>404 - File or directory not found.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-si" error: invalid character '<' looking for beginning of value



  on ../modules/monitor_metric_alertrule/main.tf line 1, in resource "azurerm_monitor_metric_alertrule" "alertrule":

   1: resource "azurerm_monitor_metric_alertrule" "alertrule" {

Steps to Reproduce

  1. terraform init && terraform apply

Important Factoids

No

References

Similar to an Cosmos DB issue that was solved a few days ago:

@avnes
Copy link
Author

avnes commented Jul 3, 2019

Issue has been resolved already. So probably a glitch at the Azure side.

@avnes avnes closed this as completed Jul 3, 2019
@ghost
Copy link

ghost commented Aug 2, 2019

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants