Skip to content

Instantly share code, notes, and snippets.

@josjaf
Created August 20, 2019 19:26
Show Gist options
  • Save josjaf/a41c14f18a85364ff2a3c9f29504172f to your computer and use it in GitHub Desktop.
Save josjaf/a41c14f18a85364ff2a3c9f29504172f to your computer and use it in GitHub Desktop.
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_ec2,
core,
)
class Compute(core.Stack):
def __init__(self, app: core.App, id: str, props, env, **kwargs) -> None:
super().__init__(app, id, **kwargs)
self.output_props = props
# bucket.grant_read_write(codepipeline_role)
sg = aws_ec2.SecurityGroup(
self, 'SG',
vpc=aws_ec2.Vpc.from_lookup(self, 'vpc', vpc_name='NAT'),
allow_all_outbound=True,
security_group_name=props.namespace
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment