Skip to content

Instantly share code, notes, and snippets.

@josjaf
Created September 3, 2019 00:41
Show Gist options
  • Save josjaf/0f11835c5bd498fc9e87e52395a4769a to your computer and use it in GitHub Desktop.
Save josjaf/0f11835c5bd498fc9e87e52395a4769a to your computer and use it in GitHub Desktop.
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