Skip to content

Commit

Permalink
add bastion server
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Mar 11, 2024
1 parent ad2147d commit 295bcb1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _integration/cdk.context.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"ap-northeast-1a",
"ap-northeast-1c",
"ap-northeast-1d"
]
],
"ssm:account=339712736426:parameterName=/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64:region=ap-northeast-1": "ami-039e8f15ccb15368a",
"ssm:account=339712736426:parameterName=/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64:region=ap-northeast-1": "ami-0f5c39b95599ade7f"
}
12 changes: 12 additions & 0 deletions _integration/lib/integration-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@ export class IntegrationStack extends cdk.Stack {

// VPC
const vpc = new ec2.Vpc(this, "MyVpc", {});

// Bastion EC2 Instance
const bastion = new ec2.Instance(this, "Bastion", {
vpc,
instanceType: ec2.InstanceType.of(
ec2.InstanceClass.T4G,
ec2.InstanceSize.MICRO
),
machineImage: new ec2.AmazonLinux2023ImageSsmParameter({
cpuType: ec2.AmazonLinuxCpuType.ARM_64,
}),
});
}
}

0 comments on commit 295bcb1

Please sign in to comment.