forked from hashicorp/terraform-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·26 lines (19 loc) · 748 Bytes
/
Copy pathmain.py
File metadata and controls
executable file
·26 lines (19 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
from constructs import Construct
from cdktf import App, TerraformStack
from imports.aws import SnsTopic, AwsProvider
from imports.terraform_aws_modules.vpc.aws import TerraformAwsModulesVpcAws
class MyStack(TerraformStack):
def __init__(self, scope: Construct, ns: str):
super().__init__(scope, ns)
AwsProvider(self, 'Aws', region='eu-central-1')
TerraformAwsModulesVpcAws(self, 'CustomVpc',
name='custom-vpc',
cidr='10.0.0.0/16',
azs=["us-east-1a", "us-east-1b"],
public_subnets=["10.0.1.0/24", "10.0.2.0/24"]
)
SnsTopic(self, 'Topic', display_name='my-first-sns-topic')
app = App()
MyStack(app, "python-aws")
app.synth()