Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed umccrise cdk jsii cross-stack resource references #72

Merged
merged 1 commit into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cdk/apps/umccrise/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
common_dev_props,
env=aws_env
)
CICDStack(
cicd = CICDStack(
app,
cicd_dev_props['namespace'],
cicd_dev_props,
Expand All @@ -112,6 +112,7 @@
env=aws_env
)
slack_dev_props['ecr_name'] = common.ecr_name
slack_dev_props['cb_project'] = cicd.cb_project
CodeBuildLambdaStack(
app,
slack_dev_props['namespace'],
Expand Down
5 changes: 5 additions & 0 deletions cdk/apps/umccrise/stacks/cicd.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ def __init__(self, scope: core.Construct, id: str, props, **kwargs) -> None:
iam.ManagedPolicy.from_aws_managed_policy_name('AmazonEC2ContainerRegistryPowerUser')
)
refdata.grant_read(cb_project)
self._cb_project = cb_project

@property
def cb_project(self):
return self._cb_project
7 changes: 1 addition & 6 deletions cdk/apps/umccrise/stacks/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ def __init__(self, scope: core.Construct, id: str, props, **kwargs) -> None:

################################################################################
# Create a reference to the UMCCRise CodeBuild project
# TODO: should probably use cross-stack resource references
cb_project = cb.Project.from_project_name(
self,
id='UmccriseCodeBuildProject',
project_name=props['codebuild_project_name']
)
cb_project = props['cb_project']

################################################################################
# Create an SNS topic to receive CodeBuild state change events
Expand Down