Add organizational support for cloud-bench #24
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now that hashicorp/terraform-provider-aws#21193 has been merged, this PR adds support for organizational cloud-bench onboarding. This PR was tested against out test org, and successfully onboarded & ran benchmarks in all member accounts.
Changes:
account_id
variable from the cloud_bench module. It is not needed, as we can use theaws_caller_identity
inside the module to figure this out. This simplifies the examples.is_organizational
(usingcount
andfor_each
):a)
is_organizational = false
- Pre-existing single-account implementation: Provisions a role/policy directlyb)
is_organizational = true
- Fetches the list of member accounts, onboards each in our BE, creates benchmark task spanning all accounts, and uses a CFT StackSet in the management account to provision the required role/policies in each member account.Notable features/behaviour:
is_organizational
is set to true, but the user is not authenticated into an organizational management account, the stack fails with: