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(vm-workload-scanning): Fixing CFT for Managament Account for Workload Scanning [SSPROD-52797] #142

Merged
merged 5 commits into from
Feb 6, 2025
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
18 changes: 4 additions & 14 deletions modules/vm_workload_scanning.cft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,14 @@ Conditions:
Fn::Equals:
- Ref: IsOrganizational
- 'true'
IsNotOrganizational:
IsLambdaEnabled:
Fn::Equals:
- Ref: IsOrganizational
- 'false'
IsNotOrganizationalAndLambdaEnabled:
Fn::And:
- Fn::Equals:
- Ref: IsOrganizational
- 'false'
- Fn::Equals:
- Ref: LambdaScanningEnabled
- 'true'
- Ref: LambdaScanningEnabled
- 'true'

Resources:
ScanningRole:
Type: AWS::IAM::Role
Condition: IsNotOrganizational
Properties:
RoleName: !Sub sysdig-vm-workload-scanning-${NameSuffix}
AssumeRolePolicyDocument:
Expand All @@ -94,7 +85,6 @@ Resources:
Ref: ExternalID
ECRPolicy:
Type: AWS::IAM::Policy
Condition: IsNotOrganizational
Properties:
PolicyName: !Sub sysdig-vm-workload-scanning-${NameSuffix}-ecr
Roles:
Expand All @@ -112,7 +102,7 @@ Resources:
Resource: '*'
LambdaPolicy:
Type: AWS::IAM::Policy
Condition: IsNotOrganizationalAndLambdaEnabled
Condition: IsLambdaEnabled
Properties:
PolicyName: !Sub sysdig-vm-workload-scanning-${NameSuffix}-lambda
Roles:
Expand Down
Loading