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

azurerm_security_center_contact return error with status code 201 #8317

Closed
csemio opened this issue Sep 1, 2020 · 5 comments · Fixed by #8774
Closed

azurerm_security_center_contact return error with status code 201 #8317

csemio opened this issue Sep 1, 2020 · 5 comments · Fixed by #8774
Labels
service/security-center upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Milestone

Comments

@csemio
Copy link

csemio commented Sep 1, 2020

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.13.0
azurerm v2.24.0

Affected Resource(s)

  • azurerm_security_center_contact

Terraform Configuration Files

resource "azurerm_security_center_contact" "contact" {
  email                = var.security_settings.security_center.contact.email
  phone                = var.security_settings.security_center.contact.phone 
  alert_notifications  = var.security_settings.security_center.alert_notifications
  alerts_to_admins     = var.security_settings.security_center.alerts_to_admins
}

Debug Output

Error creating Security Center Contact: security.ContactsClient#Create: Failure responding to request: StatusCode=201 
-- Original Error: autorest/azure: Service returned an error. Status=201 Code="Unknown" Message="Unknown service error"
Details=[
  {
    "etag":"\"11111111-1111-1111-1111-111111111111\"",
    "id":"/subscriptions/XXXXXXXX-XXXX-XXXX-XXXXXXXXXX/providers/Microsoft.Security/securityContact/default1",
    "location":"West Europe","name":"default1","properties": 
    {
        "alertNotifications":"On",
        "alertsToAdmins":"On",
        "email":"[email protected]",
        "phone":"+33628345678"
    },
    "type":"Microsoft.Security/securityContact"
}]

Panic Output

No panic

Expected Behavior

Contact is created

Actual Behavior

Contact is created but apply failed

Steps to Reproduce

  1. terraform apply
@matthorgan
Copy link

Can confirm that I'm getting the same issue with terraform v.12.26 and azurerm v2.25.0. I've tried multiple providers with the same results.

@SXiQTest

This comment has been minimized.

1 similar comment
@lflint

This comment has been minimized.

beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 6, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 7, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 7, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 7, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 7, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 7, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error (see issue hashicorp#8317).
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 8, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 8, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 8, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 9, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 9, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 9, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 9, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
@manicminer manicminer added this to the v2.32.0 milestone Oct 12, 2020
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 13, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
beandrad added a commit to beandrad/terraform-provider-azurerm that referenced this issue Oct 13, 2020
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
katbyte added a commit that referenced this issue Oct 15, 2020
This allows to create a new security center contact.

The current issue is that the Azure Rest API may return a 201 upon resource
creation, however, the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes #8317
@ghost
Copy link

ghost commented Oct 15, 2020

This has been released in version 2.32.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.32.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Nov 14, 2020

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!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/security-center upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
6 participants