Skip to content
Merged
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
10 changes: 9 additions & 1 deletion deploy/stacks/pipeline.py
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the resource include {self.region}:{self.account}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it but people might have their repo in a different region and not necessarily in the same that data.all is deployed to.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, looks good to me, thanks for the code change

Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ def set_codebuild_iam_roles(self):
'codeartifact:GetAuthorizationToken',
'codeartifact:GetRepositoryEndpoint',
'codeartifact:ReadFromRepository',
'codecommit:GitPull',
'ecr:GetDownloadUrlForLayer',
'ecr:BatchGetImage',
'ecr:BatchCheckLayerAvailability',
Expand Down Expand Up @@ -398,6 +397,15 @@ def set_codebuild_iam_roles(self):
resources=[self.repo_connection_arn],
),
)
else:
baseline_policy_statements.append(
iam.PolicyStatement(
actions=[
'codecommit:GitPull',
],
resources=[f'arn:aws:codecommit:*:{self.account}:dataall'],
)
)

self.baseline_codebuild_policy = iam.ManagedPolicy(
self,
Expand Down
Loading