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

Add Tag Policies to Organizations Support #11032

Closed
curator opened this issue Nov 26, 2019 · 10 comments · Fixed by #11612
Closed

Add Tag Policies to Organizations Support #11032

curator opened this issue Nov 26, 2019 · 10 comments · Fixed by #11612
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/organizations Issues and PRs that pertain to the organizations service.
Milestone

Comments

@curator
Copy link
Contributor

curator commented Nov 26, 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

Description

Amazon announced support for Tag Policies to manage intra-organization tagging standards and support should be added for this construct.

New or Affected Resource(s)

  • aws_organizations_policy

Potential Terraform Configuration

resource "aws_organizations_policy" "tags_example" {
  name = "tags_example"
  type = ?? # Currently unknown
  content = <<CONTENT
{
    "tags": {
        "CostCenter": {
            "tag_key": {
                "@@assign": "CostCenter"
            },
            "tag_value": {
                "@@assign": [
                    "100",
                    "200"
                ]
            },
            "enforced_for": {
                "@@assign": [
                    "secretsmanager:*"
                ]
            }
        }
    }
}
CONTENT
}

References

@curator curator added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 26, 2019
@ghost ghost added the service/organizations Issues and PRs that pertain to the organizations service. label Nov 26, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 26, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Nov 27, 2019
@ewbankkit
Copy link
Contributor

Announcement.
Blog post.

@DavidFluck
Copy link
Contributor

I'm happy to submit a PR for this soon. I have a work in progress branch, and I can already create/update/destroy tag policies. I want to verify that functionality is solid, and then I would just have to update the tests and documentation.

@bflad
Copy link
Contributor

bflad commented Dec 9, 2019

Related feature request to track aws_organizations_organization resource support for TAG_POLICY as valid enabled_policy_types value: #11202

@khurdz
Copy link

khurdz commented Jan 23, 2020

Hi,
Any update on this ?
We are looking forward to testing and using it soon :)

@alangford
Copy link

alangford commented Jan 24, 2020

testing out 2.46.0 and getting this error when changing the type to TAG_POLICY

Error: expected type to be one of [SERVICE_CONTROL_POLICY], got TAG_POLICY

@ericksoen
Copy link
Contributor

@alangford There's a few different places the TAG_POLICY needs to be enabled to be fully functional. In v2.46.0, a change was merged to allow enabling it at the organization level, but did not include any changes to permit is as a TAG_POLICY type for the aws_organizations_policy resource. The PR for that change is referenced above #11612 (I've resolved the WIP items, but don't have any ETA on when it will be reviewed, merged, or released)

@alangford
Copy link

Thank you @ericksoen I will close #11754 for being invalid

@bflad bflad added this to the v2.48.0 milestone Feb 6, 2020
@bflad
Copy link
Contributor

bflad commented Feb 6, 2020

Support for tag policies has been merged into the aws_organizations_policy and aws_organizations_policy_attachment resources, which will release with version 2.48.0 of the Terraform AWS Provider, tomorrow. Thanks to @ericksoen for the implementation. 👍

Please note that if you use restrictive IAM policies for the Terraform execution, that the underlying API call for the aws_organizations_policy_attachment resource has switched from ListPoliciesForTarget to ListTargetsForPolicy.

@ghost
Copy link

ghost commented Feb 7, 2020

This has been released in version 2.48.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Mar 27, 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. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/organizations Issues and PRs that pertain to the organizations service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants