Skip to content

Commit

Permalink
feat: lookup the vpc by it's name
Browse files Browse the repository at this point in the history
  • Loading branch information
Unerty committed Nov 5, 2021
1 parent aec050d commit cf93b6b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
46 changes: 45 additions & 1 deletion cdk.context.json
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
{}
{
"vpc-provider:account=277361172576:filter.tag:Name=AWSBootstrapKit-LandingZone-PipelineStack/Vpc/pepperizeVpcStack/PepperizeVpc-Prod:region=us-east-1:returnAsymmetricSubnets=true": {
"vpcId": "vpc-0c8e4fbcc7f6b524a",
"vpcCidrBlock": "10.0.0.0/16",
"availabilityZones": [],
"subnetGroups": [
{
"name": "Public",
"type": "Public",
"subnets": [
{
"subnetId": "subnet-0e1641df06f6fd0f5",
"cidr": "10.0.0.0/18",
"availabilityZone": "us-east-1a",
"routeTableId": "rtb-0d126a18817670e92"
},
{
"subnetId": "subnet-094fca8f43234fd0e",
"cidr": "10.0.64.0/18",
"availabilityZone": "us-east-1b",
"routeTableId": "rtb-048a246424d19a755"
}
]
},
{
"name": "Private",
"type": "Private",
"subnets": [
{
"subnetId": "subnet-0e9bd278a3fa77e39",
"cidr": "10.0.128.0/18",
"availabilityZone": "us-east-1a",
"routeTableId": "rtb-0aaffad6b845189a7"
},
{
"subnetId": "subnet-0d583cd54d2e33614",
"cidr": "10.0.192.0/18",
"availabilityZone": "us-east-1b",
"routeTableId": "rtb-095e194bc243597b9"
}
]
}
]
}
}
4 changes: 3 additions & 1 deletion src/cdk-gitlab-runner-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export class GitlabRunnerStack extends Stack {
* #############################
*/

const vpc = Vpc.fromLookup(this, "PepperizeVpc", {})
const vpc = Vpc.fromLookup(this, "PepperizeVpc", {
vpcName: "AWSBootstrapKit-LandingZone-PipelineStack/Vpc/pepperizeVpcStack/PepperizeVpc-Prod", // TODO: find a better way to find a vpc
})

/*
* ManagerSecurityGroup:
Expand Down

0 comments on commit cf93b6b

Please sign in to comment.