Skip to content

Commit f8db529

Browse files
Fix condition for deploying the role directly
1 parent 9540100 commit f8db529

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/log_ingestion.s3.cft.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ Conditions:
114114
!Not [ !Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ] ],
115115
!Not [ !Equals [ !Ref TopicAccountId, !Ref "AWS::AccountId" ] ]
116116
]
117-
BucketInTargetAccount: !Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ]
117+
118+
DeployRole: !And [
119+
!Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ] ,
120+
!Equals [ DeployStackSet, "false" ]
121+
]
118122

119123
NeedKMSPolicy: !And [
120124
!Not [ !Equals [ !Ref KMSKeyARN, "" ] ],
@@ -126,7 +130,7 @@ Resources:
126130
# Role and resources for same-account deployments
127131
CloudLogsRole:
128132
Type: "AWS::IAM::Role"
129-
Condition: BucketInTargetAccount
133+
Condition: DeployRole
130134
Properties:
131135
RoleName: !Sub sysdig-secure-cloudlogs-${NameSuffix}
132136
AssumeRolePolicyDocument:

0 commit comments

Comments
 (0)