-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Make bucket encryption optional for bootstrap #8724
Comments
@ConradMearns There was a bug in disabling the just wanted to confirm whether the fix shipped in #8755 would work for your use case or whether the entire property needs to be omitted. From the sounds of it, it seems like it might, but I haven't quite tested that yet myself. |
I got around the issue by cloning aws-cdk and removing aws-cdk/packages/aws-cdk/lib/api/bootstrap/legacy-template.ts Lines 19 to 26 in d2ae4bc
It doesn't look like this has a toggle available yet, and nothing in #8755 :( After more research within my org, it turns out that our admins have SCP's that force encryption everywhere, and they have banned all of us sub-admins from making any changes to those policies, so it's definitely worth having a flag to skip this config. |
@ConradMearns thanks for the quick response. seems like this is certainly a feature request as there's currently no path forward for you without having to muck around with the template so the entire BucketEncryption key is problematic and not just properties within it. |
There are many requests for customization of the built-in bootstrapping template. Rather than implementing each and every request, it's more productive to allow users to help themselves. This change introduces two new flags to `cdk bootstrap`: * `cdk bootstrap --show-template`: prints the current template to stdout, which people can pipe to a file. * `cdk bootstrap --template FILE`: reads the template from a file instead of using the built-in template. This can be used to arbitrarily customize the bootstrapping template for use in any organization. I know that the documentation changes in this PR are pretty light, but really a Developer Guide topic should be written on bootstrapping, which is next on my TODO list. Resolves #9256, resolves #8724, resolves #3684, resolves #1528, necessary for #9681. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
As a developer operating in a federated AWS space, I need to be able to bootstrap the CDK without it attempting to set
s3:SetBucketEncryption
properties.Use Case
When attempting to run
cdk bootstrap
,cdk bootstrap --without-public-access-block-configuration
,cdk bootstrap --public-access-block-configuration true
orcdk bootstrap --public-access-block-configuration false
, the creation of the StagingBucket fails with the errorAPI: s3:SetBucketEncryption Access Denied
- I am using credentials with CDK admin privileges, but I suspect it fails because my organization has revoked the ability to modify this property on all buckets.Proposed Solution
Similarly to #5028 , we need a way to defer encryption to the defaults set by the organization.
cdk bootstrap --skip "s3:SetBucketEncryption"
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: