Skip to content

Commit 9791f50

Browse files
committed
Fixing CFT for Managament Account for Workload Scanning
1 parent d4d3233 commit 9791f50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/vm_workload_scanning.cft.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,15 @@ Conditions:
7373
- Fn::Equals:
7474
- Ref: LambdaScanningEnabled
7575
- 'true'
76+
IsLambdaEnabled:
77+
Fn::And:
78+
- Fn::Equals:
79+
- Ref: LambdaScanningEnabled
80+
- 'true'
7681

7782
Resources:
7883
ScanningRole:
7984
Type: AWS::IAM::Role
80-
Condition: IsNotOrganizational
8185
Properties:
8286
RoleName: !Sub sysdig-vm-workload-scanning-${NameSuffix}
8387
AssumeRolePolicyDocument:
@@ -94,7 +98,6 @@ Resources:
9498
Ref: ExternalID
9599
ECRPolicy:
96100
Type: AWS::IAM::Policy
97-
Condition: IsNotOrganizational
98101
Properties:
99102
PolicyName: !Sub sysdig-vm-workload-scanning-${NameSuffix}-ecr
100103
Roles:
@@ -112,7 +115,7 @@ Resources:
112115
Resource: '*'
113116
LambdaPolicy:
114117
Type: AWS::IAM::Policy
115-
Condition: IsNotOrganizationalAndLambdaEnabled
118+
Condition: IsLambdaEnabled
116119
Properties:
117120
PolicyName: !Sub sysdig-vm-workload-scanning-${NameSuffix}-lambda
118121
Roles:

0 commit comments

Comments
 (0)