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

fix(constructs): service linked role missing permissions #631

Closed
wants to merge 4 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ exports[`AccountsStack us-east-1 Construct(AccountsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -1196,6 +1197,7 @@ exports[`AccountsStack us-east-1 Construct(AccountsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -1466,6 +1468,7 @@ exports[`AccountsStack us-east-1 Construct(AccountsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -2727,6 +2730,7 @@ exports[`AccountsStack us-east-1 Construct(AccountsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ exports[`LoggingStack Construct(LoggingStack): Snapshot Test 1`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -1667,6 +1668,7 @@ exports[`LoggingStack Construct(LoggingStack): Snapshot Test 1`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -4773,6 +4775,7 @@ exports[`LoggingStack Construct(LoggingStack): Snapshot Test 2`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -5305,6 +5308,7 @@ exports[`LoggingStack Construct(LoggingStack): Snapshot Test 2`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -9491,6 +9495,7 @@ exports[`LoggingStackOuTargets Construct(LoggingStackOuTargets): Snapshot Test
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -10765,6 +10770,7 @@ exports[`LoggingStackOuTargets Construct(LoggingStackOuTargets): Snapshot Test
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,7 @@ exports[`NetworkAssociationsGwlbStack Construct(NetworkAssociationsGwlbStack):
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,7 @@ exports[`MultiOuOrganizationsStack Construct(OrganizationsStack): Snapshot Test
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -5752,6 +5753,7 @@ exports[`OrganizationsStack Construct(OrganizationsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down Expand Up @@ -9069,6 +9071,7 @@ exports[`delegatedAdminStack Construct(OrganizationsStack): Snapshot Test 1`] =
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,7 @@ exports[`PipelineStack Construct(PipelineStack): Snapshot Test 1`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class ServiceLinkedRole extends Construct {
initialPolicy: [
new cdk.aws_iam.PolicyStatement({
effect: cdk.aws_iam.Effect.ALLOW,
actions: ['iam:CreateServiceLinkedRole', 'iam:GetRole'],
actions: ['iam:CreateServiceLinkedRole', 'iam:GetRole', 'lambda:GetFunction'],
resources: ['*'],
}),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ exports[`AutoscalingGroup Construct(AutoscalingGroup): Snapshot Test 1`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ exports[`LaunchTemplate Construct(FirewallAutoScalingGroup): Snapshot Test 1`]
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ exports[`ServiceLinkedRole Construct(ServiceLinkedRole): Snapshot Test 1`] = `
"Action": [
"iam:CreateServiceLinkedRole",
"iam:GetRole",
"lambda:GetFunction",
],
"Effect": "Allow",
"Resource": "*",
Expand Down
Loading