aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.51k stars 3.86k forks source link

aws-cdk-lib/aws-codepipeline-actions: S3DeployActionProps is missing KMSEncryptionKeyARN #22266

Closed KSSLR closed 1 year ago

KSSLR commented 1 year ago

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

peterwoodworth commented 1 year ago

Thanks for submitting this request @KSSLR, I believe we'd want to eventually render this under the Configuration property

I am marking this issue as p2, which means that we are unable to work on this immediately.

We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

Check out our contributing guide if you're interested in contributing yourself - there's a low chance the team will be able to address this soon but we'd be happy to review a PR 🙂

tam0ri commented 1 year ago

This feature was already released by #24536. I think we can close this issue now.

peterwoodworth commented 1 year ago

Thanks @tam0ri!

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.