Skip to content

Commit 6cf6dc8

Browse files
authored
feat(cloudfront-origins): add ipAddressType property to Lambda Function URL origins (#35458)
### Issue # (if applicable) #35450 ### Reason for this change Lambda Function URLs natively support dual-stack IPv4/IPv6 connectivity, but CDK's FunctionUrlOrigin class did not expose the `ipAddressType` property to configure IP protocol preferences. ### Description of changes - Added `OriginIpAddressType` enum with `IPV4`, `IPV6`, and `DUALSTACK` options - Added optional `ipAddressType` property to `FunctionUrlOriginProps` interface using the enum type - Default behavior follows CloudFormation default (IPv4 only) to avoid breaking changes - Updated both `FunctionUrlOrigin` and `FunctionUrlOriginWithOAC` classes to pass through the property - Added test coverage for default behavior, explicit value setting, and OAC integration - Updated README with usage examples and enum documentation ### Describe any new or updated permissions being added N/A ### Description of how you validated changes - Added unit tests covering default behavior when `ipAddressType` is not specified - Added unit tests for explicit enum value setting (`OriginIpAddressType.IPV4`, `OriginIpAddressType.IPV6`, `OriginIpAddressType.DUALSTACK`) - Added test with Origin Access Control (OAC) ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent d9085cc commit 6cf6dc8

File tree

13 files changed

+32863
-0
lines changed

13 files changed

+32863
-0
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront-origins/test/integ.function-url-origin-ip-address-type.js.snapshot/FunctionUrlOriginIpAddressTypeStack.assets.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)