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

AISERVICES_OPT_OUT_POLICY not yet supported by aws_organizations enabled_policy_types attribute #14142

Closed
dehuszar opened this issue Jul 10, 2020 · 8 comments · Fixed by #14528 or #14650
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

@dehuszar
Copy link

dehuszar commented Jul 10, 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 other comments that do not add relevant new information or questions, 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

I see now that BACKUP_POLICY is hot off the presses in v2.70.0. Unfortunately, aws_organizations resource still does not support the enabled_policy_types value of AISERVICES_OPT_OUT_POLICY.

Attempts to run a plan utilizing this policy type produces the following errors:

Error: expected enabled_policy_types.0 to be one of [BACKUP_POLICY SERVICE_CONTROL_POLICY TAG_POLICY], got AISERVICES_OPT_OUT_POLICY

  on organizations.tf line 1, in resource "aws_organizations_organization" "org":
   1: resource "aws_organizations_organization" "org" {



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

  on organizations.tf line 44, in resource "aws_organizations_policy" "ai_opt_out_policies":
  44: resource "aws_organizations_policy" "ai_opt_out_policies" {

New or Affected Resource(s)

  • aws_organizations

Potential Terraform Configuration

resource "aws_organizations_organization" "org" {
  feature_set = "ALL"
  enabled_policy_types = ["AISERVICES_OPT_OUT_POLICY"]
}

resource "aws_organizations_policy" "ai_opt_out_policies" {
  description = "Claims to Prevent AWS from getting nosey with our AI data to 'improve their services'"
  name = "ai-opt-out-policies"
  type = "AISERVICES_OPT_OUT_POLICY"

  content = <<CONTENT
{
  "services": {
    "default": {
      "opt_out_policy": {
        "@@operators_allowed_for_child_policies": ["@@none"],
        "@@assign": "optOut"
      }
    }
  }
}
CONTENT
}

References

@dehuszar dehuszar added the enhancement Requests to existing resources that expand the functionality or scope. label Jul 10, 2020
@ghost ghost added the service/organizations Issues and PRs that pertain to the organizations service. label Jul 10, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 10, 2020
@dehuszar dehuszar changed the title enabled_policy_types "AISERVICES_OPT_OUT_POLICY" and "BACKUP_POLICY" not yet supported by aws_organizations AISERVICES_OPT_OUT_POLICY not yet supported by aws_organizations enabled_policy_types attribute Jul 10, 2020
@ewbankkit
Copy link
Contributor

@shuheiktgw
Copy link
Collaborator

I've added support for AISERVICES_OPT_OUT_POLICY #14528

@bflad bflad added this to the v3.2.0 milestone Aug 12, 2020
@bflad
Copy link
Contributor

bflad commented Aug 12, 2020

Support for managing these policies in the aws_organizations_policy resource has been merged and will release with version 3.2.0 of the Terraform AWS Provider, likely tomorrow. Thank you to @shuheiktgw for the implementation. 👍

Since this also requires an adjustment to the aws_organizations_organization resource enabled_policy_types validation, I'm going to keep this issue open.

@shuheiktgw
Copy link
Collaborator

@bflad Thank you for pointing it out! I've created a PR to support AISERVICES_OPT_OUT_POLICY for aws_organizations_organization, so would you mind reviewing it, please? 🙏

#14650

@bflad bflad added this to the v3.2.0 milestone Aug 14, 2020
@bflad
Copy link
Contributor

bflad commented Aug 14, 2020

Thanks so much, @shuheiktgw! Merged that one in as well so this support will all release with version 3.2.0, likely very shortly. 😄

@shuheiktgw
Copy link
Collaborator

@bflad Thank you for your fast review! 👍

@ghost
Copy link

ghost commented Aug 14, 2020

This has been released in version 3.2.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 Sep 13, 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 Sep 13, 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
4 participants