mirror of
https://github.com/Sea-Haven-Industries/forgejo.git
synced 2026-09-30 05:23:11 +00:00
Fix subnet import to include availability zone
CDK requires availabilityZone when using fromSubnetAttributes for EC2 instance placement.
This commit is contained in:
parent
a500d69716
commit
83c381b1da
1 changed files with 5 additions and 2 deletions
|
|
@ -15,8 +15,11 @@ export class ForgejoStack extends cdk.Stack {
|
|||
vpcId: "vpc-0d3d4b67bd0cf8a68",
|
||||
});
|
||||
|
||||
const privateSubnet1 = ec2.Subnet.fromSubnetId(
|
||||
this, "PrivateSubnet1", "subnet-04e38c507e96f1926"
|
||||
const privateSubnet1 = ec2.Subnet.fromSubnetAttributes(
|
||||
this, "PrivateSubnet1", {
|
||||
subnetId: "subnet-04e38c507e96f1926",
|
||||
availabilityZone: "us-east-1a",
|
||||
}
|
||||
);
|
||||
|
||||
const sg = new ec2.SecurityGroup(this, "SecurityGroup", {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue