-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Describe the bug
The S3 deploy action supports a KMS encryption key that the action uses to encrypt objects uploaded to a bucket. The CloudFormation resource Action inside a Stage inside a AWS::CodePipeline::Pipeline carries a configuration property "KMSEncryptionKeyARN" that indicates the KMS key to use (https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-S3Deploy.html). This property is missing in aws-cdk-lib » aws_codepipeline_actions » S3DeployActionProps (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.S3DeployActionProps.html).
Expected Behavior
I expected the S3DeployActionProps interface to have a KMSEncryptionKeyARN and the S3DeployAction class to emit this property to the CloudFormation template.
Current Behavior
Neither S3DeployActionProps nor S3DeployActionProps support KMSEncryptionKeyARN
Reproduction Steps
const deployAction = new S3DeployAction({ actionName: 'SomeActionName', input: codePipelineArtifact, bucket: s3BucketWithEncryption, role: deploymentRole }
Possible Solution
In S3DeployActionProps:
readonly kmsEncryptionKeyArn?: string;
In S3DeployAction
return { configuration: { BucketName: this.props.bucket.bucketName, Extract: this.props.extract === false ? 'false' : 'true', ObjectKey: this.props.objectKey, CannedACL: acl ? toKebabCase(acl.toString()) : undefined, CacheControl: this.props.cacheControl && this.props.cacheControl.map(ac => ac.value).join(', '), KMSEncryptionKeyARN: this.props.kmsEncryptionKeyArn },
Additional Information/Context
No response
CDK CLI Version
2.24.1
Framework Version
No response
Node.js Version
18.7.0
OS
macOS Monterey 12.6
Language
Typescript
Language Version
4.4.4
Other information
No response