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

Bucket.tf code is dependent on aws_organization #99

Closed
Prophecy67 opened this issue May 8, 2020 · 9 comments
Closed

Bucket.tf code is dependent on aws_organization #99

Prophecy67 opened this issue May 8, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@Prophecy67
Copy link
Contributor

The creation of an audit log bucket is currently dependent on an AWS organization.

Right now, if an account is not the start of the OU, it is impossible to create a master account and adding members to them, since said master account needs access to the aws_organization, which is impossible, if it's not at the top of the OU.

This is an issue for accounts already created, and in an already established OU. In addition, the master account would be the one that collects the logs instead of a dedicated 'logs' account, separating it with other access restrictions and permissions such as how AWS Landing Zone does things.

A better set-up would be that the bucket module doesn't make use of the aws_organization_organizations datasource, and using the member_accounts input, leaving free choice as to what accounts to grant access.

Or optionalizing this, since this is the only part of the code that makes use of reading out all the account-IDs related to the organization.

@nozaq
Copy link
Owner

nozaq commented May 18, 2020

@Prophecy67 Thank you for the suggestion!
It's originally designed to rely on AWS Organization to use the organization trail feature, but AWS seems to recommend having a separated account for log aggregation then enabling CloudTrail in each account which send events to the log aggregation account. I agree to let users to choose which account to aggregate logs rather than forcing to use the master account for this.

It seems you're working on the PR already, I'd be happy to review when it becomes ready 👍

@nozaq nozaq added the enhancement New feature or request label May 18, 2020
@omerfsen
Copy link

I think @Prophecy67 has made a contribution on #100 for this already.

@nozaq
Copy link
Owner

nozaq commented May 18, 2020

@omerfsen yes #100 is already open, but still in draft status 👀

@Prophecy67
Copy link
Contributor Author

Hey @nozaq , I've been mucking around with the code and eventually ran in to issues that still led to the organization being necessary. Because of that, I didn't really want to press this matter yet and moved the PR in to a draft.

All the more however, is it nicer to iterate over a list of accounts rather than read out the AWS Organization specs altogether! It is ready to be merged, but might require more work!

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Jun 17, 2020
@nozaq nozaq reopened this Aug 10, 2020
@nozaq nozaq reopened this Aug 19, 2020
@nozaq nozaq removed the Stale label Aug 19, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Sep 18, 2020
@nozaq nozaq removed the Stale label Sep 22, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Oct 22, 2020
@nozaq nozaq reopened this Nov 14, 2020
@nozaq nozaq removed the Stale label Nov 23, 2020
@MaksimKlepikov
Copy link

Can it be reopened?
This is a really useful feature when using AWS Control Tower with a dedicated OU for shared accounts and the log archive account in it.

@nozaq
Copy link
Owner

nozaq commented Dec 3, 2022

@kevrat Thanks, I've created #309 to think how this module can support the organization which is managed by AWS Control Tower.

Please add your comment there if you have any suggestion or proposal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants