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

Refactor org to hide AWS account IDs #27

Open
chris3ware opened this issue Sep 7, 2024 · 2 comments
Open

Refactor org to hide AWS account IDs #27

chris3ware opened this issue Sep 7, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request terraform Pull requests that update Terraform code

Comments

@chris3ware
Copy link
Member

chris3ware commented Sep 7, 2024

While working on the pipeline, the plan output contains a number of policy documents that contain the full arn, which includes the AWS account ID. Try and mask these if possible.

@chris3ware chris3ware added enhancement New feature or request terraform Pull requests that update Terraform code labels Sep 7, 2024
@chris3ware chris3ware self-assigned this Sep 7, 2024
@chris3ware
Copy link
Member Author

chris3ware commented Sep 8, 2024

Using the sensitive function on the aws_caller_id data source has masked the value on parts of the plan, when the policy is "known after apply" - for example in an iam policy.

But on a bucket policy, using the same sensitive function doesn't work because the policy document has already been read so is "known before apply"

I've tried using the global condition key: aws:PrincipalAccount in the bucket policy, but this fails to apply.

Next is to replace the data source with an input variable marked as sensitive.

@chris3ware
Copy link
Member Author

Using a variable with sensitive = true in place of the caller id data source produced the same results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terraform Pull requests that update Terraform code
Development

No branches or pull requests

1 participant