Skip to content

Commit

Permalink
Merge pull request aws-samples#41 from aws-samples/awsjpleger
Browse files Browse the repository at this point in the history
Fix existing VPC usage issue
  • Loading branch information
awsjpleger authored Sep 28, 2023
2 parents e70dc84 + 59552c4 commit 9091eee
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 9091eee

Please sign in to comment.