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

provider/aws: Add resource "aws_organization_account". #14147

Closed
wants to merge 5 commits into from
Closed

provider/aws: Add resource "aws_organization_account". #14147

wants to merge 5 commits into from

Conversation

asedge
Copy link

@asedge asedge commented May 2, 2017

Another resource to help satisfy #12337.

As for the acceptance tests, I chose to skip this test by default because it's not an easily reversible action. To run the test you would need to set an environment variable specifying the email address to be used when creating the account. This creates a member account in the organization (requires an organization) and that account can only be closed manually. This puts the account into a "Suspended" state and the email address cannot be re-used to create a new account. In speaking with the AWS support team they did mention that you can change the email address on the account before closing it in order to free the original email address.

@asedge
Copy link
Author

asedge commented May 3, 2017

This is ready for review. Looking forward to getting some feedback!

@asedge asedge changed the title [WIP] provider/aws: Add resource "aws_organization_account". provider/aws: Add resource "aws_organization_account". May 3, 2017
@willejs
Copy link

willejs commented May 18, 2017

@asedge maybe add some maintainers as reviewers to request a review.

@asedge
Copy link
Author

asedge commented May 18, 2017

@willejs A good suggestion, thanks! I don't seem to be able edit the list of reviewers on the right side of the PR though.

@asedge
Copy link
Author

asedge commented May 18, 2017

@mbfrahry Do you think someone will be able to review this? I have another PR #13831 which is also ready for review. Thanks!

@JoeyG1973
Copy link

@mbfrahry Any ideas when this will be merged? We really need this functionality.

Target: []string{"SUCCEEDED"},
Refresh: resourceAwsOrganizationAccountStateRefreshFunc(conn, requestId),
PollInterval: 10 * time.Second,
Timeout: 5 * time.Minute,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we arrive at this value as the right timeout duration?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for the account creation we can poll based on the status using CreateAccountStatus. However if you chose to also create an IAM role that takes some time and honestly I had no idea how long. This was a guess. During my testing I chose to create an IAM role when creating an account, then assume that role and create some resources in the new account, but it failed because the IAM role didn't yet exist. I wasn't sure how to check if the new role was created in the new account without being able to assume that role.
Also, creating an account consumes your email address and you cannot register another account with that same email address. At one point in my testing I actually ran out of email addresses to use. I learned later, via emails with AWS support, that you can change your email address associated with the account and then reuse that email address.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense :)

@apparentlymart
Copy link
Contributor

Hello @asedge, and thanks for working on this!

As part of the the Terraform 0.10 release earlier this year, all of the Terraform providers were moved to their own repositories in the terraform-providers GitHub organization, and removed from the Terraform Core repository.

Unfortunately due to the fact that new issues and pull requests are being opened constantly, it was not possible for the various provider maintainers to merge all outstanding pull requests before this split, and there is no automatic way to migrate a pull request to a new repository.

As a result, this pull request can sadly no longer be applied as-is, and so I'm going to close it.

If you or someone else has the time and motivation to apply the same changes to the aws provider repository and open a new PR there, the maintainers of that provider should be able to review and merge it. The issue corresponding to this PR was already migrated to hashicorp/terraform-provider-aws#571 and I see you've already got some other organizations-related PRs pending in that repository.

Thanks again for working on this, and sorry it was not able to be merged before the provider repository changes.

@asedge
Copy link
Author

asedge commented Nov 1, 2017

@apparentlymart Thanks. I have a branch with this resource but am waiting for hashicorp/terraform-provider-aws#903 which vendors in the organizations part of the aws-sdk-go. It's been pretty frustrating though, that original PR was filed back in April.

@ghost
Copy link

ghost commented Apr 6, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants