Skip to content

Commit 2a4b3a0

Browse files
add DeployStackSet condition
1 parent b537a22 commit 2a4b3a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/log_ingestion.s3.cft.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ Parameters:
111111
Conditions:
112112
CreateSNSTopic: !Equals [ !Ref CreateTopic, "true" ]
113113
HasKMSKey: !Not [ !Equals [ !Ref KMSKeyARN, "" ] ]
114-
BucketCrossAccount: !And [
115-
!Not [ !Equals [ !Ref BucketAccountId, "" ] ],
116-
!Not [ !Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ] ]
114+
DeployStackSet: !Or [
115+
!Not [ !Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ] ],
116+
!Not [ !Equals [ !Ref TopicAccountId, !Ref "AWS::AccountId" ] ]
117117
]
118118
BucketInTargetAccount: !Equals [ !Ref BucketAccountId, !Ref "AWS::AccountId" ]
119-
# Check if KMS key is in a different account from bucket
119+
120120
NeedKMSPolicy: !And [
121121
!Not [ !Equals [ !Ref KMSKeyARN, "" ] ],
122122
!Not [ !Equals [ !Ref KMSAccountId, !Ref BucketAccountId ] ]
@@ -203,7 +203,7 @@ Resources:
203203
# StackSet for cross-account bucket access
204204
BucketAccessStackSet:
205205
Type: AWS::CloudFormation::StackSet
206-
Condition: BucketCrossAccount
206+
Condition: DeployStackSet
207207
Properties:
208208
StackSetName: !Sub sysdig-secure-cloudlogs-bucket-access-${NameSuffix}
209209
Description: StackSet to configure S3 bucket and KMS permissions for Sysdig Cloud Logs integration

0 commit comments

Comments
 (0)