Closed feraudet closed 9 months ago
@feraudet thanks for the contribution, but I believe this is possible via the source_policy_documents
variable. Please check that out, try it out within your own project, and then report back and reopen if needed. If there is a need here, we're happy to look into it, but I believe this is already accounted for. Thanks!
Hello, As far as I understand source_policy_documents only allow to override existing policies, not to add policies.
If you have a look on https://github.com/cloudposse/terraform-aws-tfstate-backend/blob/main/main.tf#L60 it use override_policy_documents from data.aws_iam_policy_document.aggregated_policy than only allow to override existing statements
I think your'e right, according to the documentation, using blank Sid allow to add policies
@feraudet yeah and it is confusing due to the terminology, so it makes sense to not get it at first. Try it out and let me know how it goes!
what
Add the ability to include custom bucket policy statements
why
Sometime we need to allow someone else to access to tfstates. Ex: Allow the entire orgs to access to some states