-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(ec2): deploying an isolated subnet fails when ipv6AssignAddressOnCreation
is set to true
#28902
Conversation
6ec6ff7
to
89e41cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Yeah I think this looks good to me. The added dependency shouldn't be a breaking change in this case I think as well. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…nCreation` is set to true (#28902) This PR resolves the issue where deploying an isolated subnet with `ipv6AssignAddressOnCreation` enabled fails. ### example ```ts new Vpc(stack, 'TheVPC', { ipProtocol: IpProtocol.DUAL_STACK, subnetConfiguration: [ { subnetType: testData.subnetType, name: 'subnetName', ipv6AssignAddressOnCreation: true, }, ], }); ``` ### error ```sh 6:39:48 PM | CREATE_FAILED | AWS::EC2::Subnet | vpcisolatedSubnet1Subnet06BBE51F Template error: Fn::Select cannot select nonexistent value at index 0 ``` ### solution A dependency on the CidrBlock has been added [as discussed in issue](#28843 (comment)). ```ts (this.isolatedSubnets as PrivateSubnet[]).forEach((isolatedSubnet) => { if (this.ipv6CidrBlock !== undefined) { isolatedSubnet.node.addDependency(this.ipv6CidrBlock); } }); ``` ## Question This modification results in the failure of existing integration tests. I don't consider this change to be a breaking one, so I went ahead and updated the snapshot. Is that okay? ```sh CHANGED aws-ec2/test/integ.vpc-dual-stack-ec2 0.776s Resources [~] AWS::EC2::Subnet Ip6VpcDualStackPrivateSubnet1Subnet842B7F4C └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::RouteTable Ip6VpcDualStackPrivateSubnet1RouteTable5326D239 └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::SubnetRouteTableAssociation Ip6VpcDualStackPrivateSubnet1RouteTableAssociationF1C10B6A └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::Subnet Ip6VpcDualStackPrivateSubnet2SubnetEB493489 └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::RouteTable Ip6VpcDualStackPrivateSubnet2RouteTable56BF517C └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::SubnetRouteTableAssociation Ip6VpcDualStackPrivateSubnet2RouteTableAssociationD37A3D3D └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] ``` Closes #28843 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…nCreation` is set to true (#28902) This PR resolves the issue where deploying an isolated subnet with `ipv6AssignAddressOnCreation` enabled fails. ### example ```ts new Vpc(stack, 'TheVPC', { ipProtocol: IpProtocol.DUAL_STACK, subnetConfiguration: [ { subnetType: testData.subnetType, name: 'subnetName', ipv6AssignAddressOnCreation: true, }, ], }); ``` ### error ```sh 6:39:48 PM | CREATE_FAILED | AWS::EC2::Subnet | vpcisolatedSubnet1Subnet06BBE51F Template error: Fn::Select cannot select nonexistent value at index 0 ``` ### solution A dependency on the CidrBlock has been added [as discussed in issue](#28843 (comment)). ```ts (this.isolatedSubnets as PrivateSubnet[]).forEach((isolatedSubnet) => { if (this.ipv6CidrBlock !== undefined) { isolatedSubnet.node.addDependency(this.ipv6CidrBlock); } }); ``` ## Question This modification results in the failure of existing integration tests. I don't consider this change to be a breaking one, so I went ahead and updated the snapshot. Is that okay? ```sh CHANGED aws-ec2/test/integ.vpc-dual-stack-ec2 0.776s Resources [~] AWS::EC2::Subnet Ip6VpcDualStackPrivateSubnet1Subnet842B7F4C └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::RouteTable Ip6VpcDualStackPrivateSubnet1RouteTable5326D239 └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::SubnetRouteTableAssociation Ip6VpcDualStackPrivateSubnet1RouteTableAssociationF1C10B6A └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::Subnet Ip6VpcDualStackPrivateSubnet2SubnetEB493489 └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::RouteTable Ip6VpcDualStackPrivateSubnet2RouteTable56BF517C └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] [~] AWS::EC2::SubnetRouteTableAssociation Ip6VpcDualStackPrivateSubnet2RouteTableAssociationD37A3D3D └─ [+] DependsOn └─ ["Ip6VpcDualStackipv6cidr40BE830A"] ``` Closes #28843 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR resolves the issue where deploying an isolated subnet with
ipv6AssignAddressOnCreation
enabled fails.example
error
solution
A dependency on the CidrBlock has been added as discussed in issue.
Question
This modification results in the failure of existing integration tests.
I don't consider this change to be a breaking one, so I went ahead and updated the snapshot. Is that okay?
Closes #28843
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license