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.66k stars 3.92k forks source link

cloudfront: l2 support for continuous deployment #23064

Open jeromevdl opened 1 year ago

jeromevdl commented 1 year ago

Describe the feature

Add support for AWS::CloudFront::ContinuousDeploymentPolicy to enable continuous deployment in CloudFront :

Use Case

Using CFN is fine but CDK is better. So that we can automate continuous deployment of our distribution using code.

Proposed Solution

No response

Other Information

No response

Acknowledgements

CDK version used

2.51.1

Environment details (OS name and version, etc.)

Mac OS Monterey 12.6.1

peterwoodworth commented 1 year ago

The Cfn support should be in shortly, there's not a long delay between when new CloudFormation resources become available and when we add support for them.

As for the higher level constructs, thanks for sharing your interest in contributing those! I suggest reading this page for more information on that topic. You'll need an approved RFC for any new construct

salvadoriume commented 1 year ago

Is there any progress in implementing this L2? Or... are there any examples how to create Continous Deployment in cloudfronts - event with L1 constructs? I am looking forward to @jeromevdl idea about lambda :)

jeromevdl commented 1 year ago

@salvadoriume, L1 construct is already there: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnContinuousDeploymentPolicy.html, but I'm not aware of any RFC for the L2.

salvadoriume commented 1 year ago

@jeromevdl what is the best way to push it forward from my side?

L1 can do a job but there is much more effort. I will need to rewrite current L2 CF Distribution (implemented in my stack) to L1 (as "staging" parameter is not supported) and write rest resources (trafficPolicy) and put together, I guess? I would prefer to invest my time to help in public contribution, but I have no CDK knowledge, started using it a week ago.