Created
September 3, 2019 00:41
-
-
Save josjaf/0f11835c5bd498fc9e87e52395a4769a to your computer and use it in GitHub Desktop.
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
from aws_cdk import ( | |
aws_iam as aws_iam, | |
aws_s3 as aws_s3, | |
core, | |
) | |
from RoleA import Compute | |
from RoleB import Compute as RoleB | |
class Props(): | |
def __init__(self): | |
self.namespace = 'cdk-examples' | |
self.region = 'us-east-1' | |
self.dev = core.Environment(account='123', region='us-east-1') | |
self.prod = core.Environment(account='456', region='us-east-1') | |
self.subnet_id = 'subnet-abc' | |
props = Props() | |
app = core.App() | |
roles = Compute(app, f"{props.namespace}-role", props=props, env=props.dev) | |
props = roles.outputs | |
# roles = RoleB(app, f"{props.namespace}-roleB", props=props, env=props.dev) | |
roles = RoleB(app, f"{props.namespace}-roleB", props=props, env=props.prod) | |
app.synth() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment