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

(cloudfront): allow setting autoPublish to false for CloudFront functions #30028

Closed
1 of 2 tasks
mazyu36 opened this issue May 1, 2024 · 4 comments · Fixed by #30030 · 4 remaining pull requests
Closed
1 of 2 tasks

(cloudfront): allow setting autoPublish to false for CloudFront functions #30028

mazyu36 opened this issue May 1, 2024 · 4 comments · Fixed by #30030 · 4 remaining pull requests
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@mazyu36
Copy link
Contributor

mazyu36 commented May 1, 2024

Describe the feature

Enable setting of autoPublish in the L2 construct for CloudFront Function.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-autopublish

Use Case

In the current L2 Construct, autoPublish can only be set to true.
It would be helpful to have the ability to set autoPublish to false when deploying L2 Constructs, in order to facilitate testing on the management console before publishing.

Proposed Solution

new cloudfront.Function(this, 'Function', {
  code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'),
  runtime: cloudfront.FunctionRuntime.JS_2_0,
  autoPublish: false // Add
});

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.137.0

Environment details (OS name and version, etc.)

irrelevant

@mazyu36 mazyu36 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 1, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label May 1, 2024
@pahud
Copy link
Contributor

pahud commented May 1, 2024

Yes we should expose that option to the surface. Thank you for your PR!

@pahud pahud added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 1, 2024
@mergify mergify bot closed this as completed in #30030 May 1, 2024
@mergify mergify bot closed this as completed in 5dd72b8 May 1, 2024
Copy link

github-actions bot commented May 1, 2024

⚠️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.

1 similar comment
Copy link

github-actions bot commented May 1, 2024

⚠️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.

@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.