-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup context environments using cdk.json so that we can deploy to different environments (dev/stage/prod)
- Loading branch information
Showing
6 changed files
with
31 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import aws_cdk as core | ||
import aws_cdk.assertions as assertions | ||
|
||
from openchallenges.network_stack import NetworkStack | ||
|
||
|
||
def test_vpc_created(): | ||
context = { | ||
"dev": {"VPC_CIDR": "10.255.92.0/24", "DNS_NAMESPACE": "openchallenges.io"} | ||
} | ||
|
||
app = core.App(context=context) | ||
env_context = app.node.try_get_context("dev") | ||
vpc_cidr = env_context["VPC_CIDR"] | ||
network = NetworkStack(app, "NetworkStack", vpc_cidr) | ||
template = assertions.Template.from_stack(network) | ||
template.has_resource_properties("AWS::EC2::VPC", {"CidrBlock": vpc_cidr}) |
This file was deleted.
Oops, something went wrong.