Skip to content

Commit

Permalink
Fix exisiting VPC usage issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Sep 28, 2023
1 parent f1180e7 commit 59552c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions metadata-index/backend/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def __init__(self, scope: Construct, construct_id: str, config: dict, **kwargs)
if (config.VPC["USE_VPC"] == True):
if (config.VPC["EXISTING_VPC_ID"] != ""):
vpc = ec2.Vpc.from_lookup(self, "VPC", vpc_id=config.VPC["EXISTING_VPC_ID"])
vpc_cidr = config.VPC["NEW_VPC_CIDR"]
vpc_construct = Vpc(self, "Network", vpc_cidr)
vpc = vpc_construct.getVpc()
else:
vpc_cidr = config.VPC["NEW_VPC_CIDR"]
vpc_construct = Vpc(self, "Network", vpc_cidr)
vpc = vpc_construct.getVpc()
else:
vpc=None
# Create Security groups
Expand Down

0 comments on commit 59552c4

Please sign in to comment.