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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple emails when setting azurerm_security_center_contact #9462

Open
sponte opened this issue Nov 25, 2020 · 2 comments
Open

Comments

@sponte
Copy link
Contributor

sponte commented Nov 25, 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

Description

Terraform resource azurerm_security_center_contact does not support multiple emails to be set currently, whereas Azure Portal does. Terraform provider uses old, 2017-08-01-preview API version which only has access to set single email, but newer 2020-01-01-preview API allows for multiple, semicolon separated emails to be provided.

New or Affected Resource(s)

  • azurerm_security_center_contact

Potential Terraform Configuration

resource "azurerm_security_center_contact" "security_center_contacts" {
  emails = [
    "email1@test.com",
    "email2@test.com"
  ]
}

The 2020-01-01-preview API supports following payload:

PUT https://management.azure.com/subscriptions//providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview

{
  "properties": {
    "emails": "email1@test.com;email2@test.com",
    "notificationsByRole": {
      "state": "Off",
      "roles": null
    },
    "alertNotifications": {
      "state": "Off",
      "minimalSeverity": "High"
    },
    "phone": ""
  }
}

References

@rchauvetclara
Copy link

Hello, it is possible to add email addresses via the Azure portal options. Why is this not possible via the terraform resource?

@SWolfeCAI
Copy link

It sounds like the Azure API was revised in ~2020 to support semi-colon delimeted lists of email addresses. Presumably this is now possible and the provider needs to be updated to match the API abilities.

Azure/azure-rest-api-specs#9772 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants