Skip to content

Commit

Permalink
Update cdk lib version to latest
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <sngri@amazon.com>
  • Loading branch information
rishabh6788 committed May 16, 2024
1 parent c7de4b4 commit fc9bd88
Show file tree
Hide file tree
Showing 4 changed files with 2,519 additions and 1,377 deletions.
24 changes: 10 additions & 14 deletions lib/infra/infra-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,11 @@ export class InfraStack extends Stack {
singleNodeInstance = new Instance(this, 'single-node-instance', {
vpc: props.vpc,
instanceType: singleNodeInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
cpuType: instanceCpuType,
}),
machineImage: MachineImage.latestAmazonLinux2023(
{
cpuType: instanceCpuType,
},
),
role: this.instanceRole,
vpcSubnets: {
subnetType: SubnetType.PRIVATE_WITH_EGRESS,
Expand Down Expand Up @@ -512,8 +513,7 @@ export class InfraStack extends Stack {
const managerNodeAsg = new AutoScalingGroup(this, 'managerNodeAsg', {
vpc: props.vpc,
instanceType: defaultInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
machineImage: MachineImage.latestAmazonLinux2023({
cpuType: instanceCpuType,
}),
role: this.instanceRole,
Expand Down Expand Up @@ -545,8 +545,7 @@ export class InfraStack extends Stack {
const seedNodeAsg = new AutoScalingGroup(this, 'seedNodeAsg', {
vpc: props.vpc,
instanceType: (seedConfig === 'seed-manager') ? defaultInstanceType : this.dataInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
machineImage: MachineImage.latestAmazonLinux2023({
cpuType: instanceCpuType,
}),
role: this.instanceRole,
Expand Down Expand Up @@ -574,8 +573,7 @@ export class InfraStack extends Stack {
const dataNodeAsg = new AutoScalingGroup(this, 'dataNodeAsg', {
vpc: props.vpc,
instanceType: this.dataInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
machineImage: MachineImage.latestAmazonLinux2023({
cpuType: instanceCpuType,
}),
role: this.instanceRole,
Expand Down Expand Up @@ -605,8 +603,7 @@ export class InfraStack extends Stack {
clientNodeAsg = new AutoScalingGroup(this, 'clientNodeAsg', {
vpc: props.vpc,
instanceType: defaultInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
machineImage: MachineImage.latestAmazonLinux2023({
cpuType: instanceCpuType,
}),
role: this.instanceRole,
Expand Down Expand Up @@ -637,8 +634,7 @@ export class InfraStack extends Stack {
const mlNodeAsg = new AutoScalingGroup(this, 'mlNodeAsg', {
vpc: props.vpc,
instanceType: this.mlInstanceType,
machineImage: MachineImage.latestAmazonLinux({
generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
machineImage: MachineImage.latestAmazonLinux2023({
cpuType: instanceCpuType,
}),
role: this.instanceRole,
Expand Down
3 changes: 2 additions & 1 deletion lib/networking/vpc-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ compatible open source license. */

import { Stack, StackProps } from 'aws-cdk-lib';
import {
IpAddresses,
IPeer,
ISecurityGroup,
IVpc,
Expand Down Expand Up @@ -56,7 +57,7 @@ export class NetworkStack extends Stack {
if (vpcId === 'undefined') {
console.log('No VPC-Id Provided, a new VPC will be created');

Check warning on line 58 in lib/networking/vpc-stack.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
this.vpc = new Vpc(this, 'opensearchClusterVpc', {
cidr: cidrRange,
ipAddresses: IpAddresses.cidr(cidrRange),
maxAzs: 3,
subnetConfiguration: [
{
Expand Down
Loading

0 comments on commit fc9bd88

Please sign in to comment.