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

Support for Policy Assignment metadata #7724

Closed
tyconsulting opened this issue Jul 13, 2020 · 3 comments · Fixed by #7725
Closed

Support for Policy Assignment metadata #7724

tyconsulting opened this issue Jul 13, 2020 · 3 comments · Fixed by #7725

Comments

@tyconsulting
Copy link
Contributor

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

Add support for specifying meta data for Azure Policy Assignments. Same as Azure Policy Definitions, metadata is also supported by Policy Assignment in ARM. Currently, the azure_policy_assignment in azurerm provider (v2.18.0) does not support metadata as an input.

New or Affected Resource(s)

  • azurerm_policy_assignment

Potential Terraform Configuration

resource "azurerm_policy_assignment" "this" {
    name         = substr(replace(uuidv5("url", "${var.policy_definition_id}-at-${var.scope}"), "-", ""), 0, 24)
    display_name = var.display_name
    description  = var.description
    metadata     = <<METADATA
    {
        "category": "General"
    }
METADATA
    policy_definition_id  = var.policy_definition_id
    parameters   = var.parameters
    scope        = var.scope
    dynamic identity {
        for_each = var.identity_type == "" ? [] : [1]
        content {
            type = var.identity_type
        }
    }
    location     = var.location
    not_scopes     = var.not_scopes
    enforcement_mode = var.enforcement_mode

}

References

@tyconsulting
Copy link
Contributor Author

PR Created: #7725, however, it doesn't look like I can link this issue to the PR?

@ArcturusZhang
Copy link
Contributor

Hi @tyconsulting thanks for the issue and the PR!

I am reviewing the PR, and if you want to link the PR to this issue, you could try edit your PR description by adding one line of Fixes #7724 or Resolves #7724 that starts with a github keyword

@ghost
Copy link

ghost commented Aug 15, 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 and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants