Skip to content

Commit

Permalink
Remove all IPv6 related changes
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Nov 19, 2024
1 parent 0f03330 commit c9f9cbb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ export class MigrationAssistanceStack extends Stack {

const streamingSecurityGroup = new SecurityGroup(this, 'trafficStreamSourceSG', {
vpc: props.vpc,
allowAllOutbound: false,
allowAllIpv6Outbound: false,
allowAllOutbound: false
});
streamingSecurityGroup.addIngressRule(streamingSecurityGroup, Port.allTraffic())
createMigrationStringParameter(this, streamingSecurityGroup.securityGroupId, {
Expand All @@ -181,7 +180,6 @@ export class MigrationAssistanceStack extends Stack {
const sharedLogsSG = new SecurityGroup(this, 'sharedLogsSG', {
vpc: props.vpc,
allowAllOutbound: false,
allowAllIpv6Outbound: false,
});
sharedLogsSG.addIngressRule(sharedLogsSG, Port.allTraffic());

Expand All @@ -207,7 +205,6 @@ export class MigrationAssistanceStack extends Stack {
vpc: props.vpc,
// Required for retrieving ECR image at service startup
allowAllOutbound: true,
allowAllIpv6Outbound: true,
})
serviceSecurityGroup.addIngressRule(serviceSecurityGroup, Port.allTraffic());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ export class NetworkStack extends Stack {
const defaultSecurityGroup = new SecurityGroup(this, 'osClusterAccessSG', {
vpc: this.vpc,
allowAllOutbound: false,
allowAllIpv6Outbound: false,
});
defaultSecurityGroup.addIngressRule(defaultSecurityGroup, Port.allTraffic());

Expand Down
12 changes: 1 addition & 11 deletions deployment/migration-assistant-solution/lib/solutions-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import {
InstanceType,
InterfaceVpcEndpoint,
InterfaceVpcEndpointAwsService,
IpProtocol,
MachineImage,
SecurityGroup,
Vpc
} from "aws-cdk-lib/aws-ec2";
import {InstanceProfile, ManagedPolicy, Role, ServicePrincipal} from "aws-cdk-lib/aws-iam";
Expand Down Expand Up @@ -179,9 +177,7 @@ export class SolutionsInfrastructureStack extends Stack {

let vpc: IVpc;
if (props.createVPC) {
vpc = new Vpc(this, 'Vpc', {
ipProtocol: IpProtocol.DUAL_STACK
});
vpc = new Vpc(this, 'Vpc', {});
// S3 used for storage and retrieval of snapshot data for backfills
new GatewayVpcEndpoint(this, 'S3VpcEndpoint', {
service: GatewayVpcEndpointAwsService.S3,
Expand Down Expand Up @@ -240,11 +236,6 @@ export class SolutionsInfrastructureStack extends Stack {
}),
]

const securityGroup = new SecurityGroup(this, 'BootstrapSecurityGroup', {
vpc: vpc,
allowAllOutbound: true,
allowAllIpv6Outbound: true,
});
new Instance(this, 'BootstrapEC2Instance', {
vpc: vpc,
vpcSubnets: {
Expand All @@ -264,7 +255,6 @@ export class SolutionsInfrastructureStack extends Stack {
initOptions: {
printLog: true,
},
securityGroup
});

const dynamicEc2ImageParameter = this.node.findAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ describe('Solutions stack', () => {
},
});
const template = Template.fromStack(stack);
verifyResources(template, {
vpcCount: 1,
vpcEndpointCount: 5
template.resourceCountIs('AWS::EC2::VPC', 1)
template.resourceCountIs('AWS::ServiceCatalogAppRegistry::Application', 1)
template.hasResourceProperties('AWS::EC2::Instance', {
InstanceType: "t3.large"
});
});

Expand Down

0 comments on commit c9f9cbb

Please sign in to comment.