Skip to content

Commit

Permalink
[Logs forwarder] update CFT template to pass cfn-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0Aja committed Sep 19, 2024
1 parent d020817 commit 9d5333e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
run: |
pip install cfn-lint==1.11.1
cfn-lint --version
cfn-lint -t aws/logs_monitoring/template.yaml -i W1030
cfn-lint -t aws/logs_monitoring/template.yaml
cfn-lint -t aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml
14 changes: 12 additions & 2 deletions aws/logs_monitoring/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ Conditions:
- !Condition CreateS3Bucket
- !Not
- !Equals [!Ref DdForwarderExistingBucketName, ""]
SetVpcSecurityGroupIds: !Not
- !Equals [!Join ["", !Ref VPCSecurityGroupIds], ""]
SetVpcSubnetIds: !Not
- !Equals [!Join ["", !Ref VPCSubnetIds], ""]
Rules:
MustSetDdApiKey:
Assertions:
Expand Down Expand Up @@ -526,8 +530,14 @@ Resources:
- !Ref AWS::NoValue
VpcConfig: !If
- UseVPC
- SecurityGroupIds: !Ref VPCSecurityGroupIds
SubnetIds: !Ref VPCSubnetIds
- SecurityGroupIds: !If
- SetVpcSecurityGroupIds
- !Ref VPCSecurityGroupIds
- !Ref AWS::NoValue
SubnetIds: !If
- SetVpcSubnetIds
- !Ref VPCSubnetIds
- !Ref AWS::NoValue
- !Ref AWS::NoValue
ForwarderRole:
Type: AWS::IAM::Role
Expand Down

0 comments on commit 9d5333e

Please sign in to comment.