-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New Resource: aws_organizations_organization #903
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggested style fixes
|
||
The following arguments are supported: | ||
|
||
* `feature_set` - (Optional) Specify "ALL" (default) or "CONSOLIDATED_BILLING. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing trailing-"
} | ||
|
||
return nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm extra NL
@tamsky Thanks for the review. Submitted a fix for the issues you pointed out. |
Thanks again @MrGossett! |
Hi any idea this PR will be merged ? Thanks ! |
Hey @asedge, everyone, This looks good to me. I am going to add some fixes and the missing upgrade from CONSOLIDATED_BILLING to ALL (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAllFeatures.html). Will keep you informed when everything sounds ok. Thanks! |
@Ninir, fine by me. Thanks! |
@Ninir, do you think anything else is needed? I'm willing to make changes if necessary. |
Hey @asedge Sorry for keeping you not up-to-date on this. As you know, an AWS Organization can be created in 2 modes: CONSOLIDATED_BILLING or ALL. There are 2 cases right now:
EnableAllFeatures for AWS Organizations needs unanimity from its members, thus everyone receives an email to either accept or decline the change. There are 2 ways to proceed there:
In case 1, the template configuration could then be updated, the API Call (EnableAllFeatures) would be made, but Terraform would ask still for the change until you finalize the process manually in the console We are currently discussing the UX perspective with @catsby on this. |
@Ninir Is it possible to store some information about the There's a complication with case 2 as well. If any of the Organization member accounts have been created from Organization master account they cannot be removed from the Organization without completing some manual steps: Removing a Member Account From Your Organization. I have another PR for creating There don't seem to be many good options. |
Cases requiring a validation are always tough to handle. We try to avoid these complex stuff by either not allowing, either finding a way to do so. Thanks for being patient on this topic :) |
any update? would really like to see this functionality ;) |
Can someone resolve this conflict so we can get this into GA. |
just started to play for the first time with aws and terraform and would love to start the whole account setup with terraform. so when i understand it right its not yet merged and currently not possible to do the overall:
yet, right? cheers maik |
@ellerbrock You are correct, it's not yet possible. I have |
any news if stuff get merged? |
+1. |
+1 Seems like there's a lot of us that would love to have this merged. |
Hi folks, We'll get to this PR 🔜 . Thanks. |
@bflad we certainly need to address #903 (comment) in some way as it is sure that people will encounter this issue a day or the other. As discussed, going no-op with warnings or just ignoring... |
aws/provider.go
Outdated
@@ -454,6 +454,7 @@ func Provider() terraform.ResourceProvider { | |||
"aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), | |||
"aws_opsworks_permission": resourceAwsOpsworksPermission(), | |||
"aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), | |||
"aws_organization": resourceAwsOrganization(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its going to look ugly at first and Naming is Hard, but we should probably also rename this aws_organizations_organization
for a few reasons:
- The AWS Organizations service supports multiple resources we'll want to manage, e.g.
aws_organizations_account
,aws_organizations_organization_unit
,aws_organizations_policy
, this will keep everything bundled together nicely naming-wise - To prevent confusion with other AWS services that might use the terminology "organization"
- If AWS ever creates a separate account organization management service/method
Ideally the resource function names will be updated to long form as well: resourceAwsOrganizationsOrganization
, resourceAwsOrganizationsOrganizationRead
, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I handled all the other feedback you provided. I'm not against doing this but it seemed like more work than I was willing to put in tonight.
…on and update all the other function names so they match.
@bflad I believe I've taken care of everything you've given me feedback on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome! Thanks for all the hard work here @asedge!
make testacc TEST=./aws TESTARGS='-run=TestAccAWSOrganizations'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSOrganizations -timeout 120m
=== RUN TestAccAWSOrganizations
=== RUN TestAccAWSOrganizations/Organization
=== RUN TestAccAWSOrganizations/Organization/basic
=== RUN TestAccAWSOrganizations/Organization/importBasic
=== RUN TestAccAWSOrganizations/Organization/consolidatedBilling
--- PASS: TestAccAWSOrganizations (56.39s)
--- PASS: TestAccAWSOrganizations/Organization (56.39s)
--- PASS: TestAccAWSOrganizations/Organization/basic (18.38s)
--- PASS: TestAccAWSOrganizations/Organization/importBasic (21.86s)
--- PASS: TestAccAWSOrganizations/Organization/consolidatedBilling (16.15s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 56.435s
@Ninir I think we are okay for now with #903 (comment) since we are no longer allowing updates in the resource ( |
This has been released in version 1.11.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
@bflad It looks like I screwed up the documentation page: https://www.terraform.io/docs/providers/aws/r/organizations_organization.html |
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! |
A resource to help implement
AWS Organizations
: #571.Originally attempted a PR at: hashicorp/terraform#13831. Noticed the providers had been split so I'm trying again to get this merged.