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

fix(vpc-v2): fixing default scope id #31102

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ class IpamScopeBase implements IIpamScopeBase {
readonly scopeType?: IpamScopeType,
) {
this.scopeType = IpamScopeType.DEFAULT;
if (!props.ipamScopeId) {
throw new Error('ipamScopeId is required');
} else {
this.scopeId = props.ipamScopeId;
}
}

/**
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
"Properties": {
"AddressFamily": "ipv6",
"AwsService": "ec2",
"IpamScopeId": "DefaultPublicScope",
"IpamScopeId": {
"Fn::GetAtt": [
"Ipam50346F82",
"PublicDefaultScopeId"
]
},
"Locale": "eu-west-2",
"PublicIpSource": "amazon"
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-ec2-alpha/test/integ.subnet-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import * as vpc_v2 from '../lib/vpc-v2';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import { AddressFamily, AwsServiceName, IpCidr, Ipam, IpamPoolPublicIpSource, SubnetV2 } from '../lib';
//import { Ipv6Cidr } from '../lib';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import * as cdk from 'aws-cdk-lib';
import { SubnetType } from 'aws-cdk-lib/aws-ec2';
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
"Type": "AWS::EC2::IPAMPool",
"Properties": {
"AddressFamily": "ipv4",
"IpamScopeId": "DefaultPrivateScope",
"IpamScopeId": {
"Fn::GetAtt": [
"IpamTestIpam6C9298EF",
"PrivateDefaultScopeId"
]
},
"Locale": "eu-central-1",
"ProvisionedCidrs": [
{
Expand All @@ -28,7 +33,12 @@
"Properties": {
"AddressFamily": "ipv6",
"AwsService": "ec2",
"IpamScopeId": "DefaultPublicScope",
"IpamScopeId": {
"Fn::GetAtt": [
"IpamTestIpam6C9298EF",
"PublicDefaultScopeId"
]
},
"Locale": "eu-central-1",
"PublicIpSource": "amazon"
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-alpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ new SubnetV2(stack, 'testsubnet', {
subnetType: SubnetType.PRIVATE_ISOLATED,
});

//validate ipv6
//Validate ipv6 IPAM
new SubnetV2(stack, 'validateIpv6', {
vpc,
ipv4CidrBlock: new IpCidr('10.3.0.0/24'),
Expand Down
Loading