@@ -15,25 +15,28 @@ Metadata:
1515 - RuleEventPattern
1616 - IsOrganizational
1717 - OrganizationalUnitIDs
18+ - Partition
1819 ParameterLabels :
1920 NameSuffix :
2021 default : Name Suffix
2122 ExternalID :
22- default : " External ID"
23+ default : External ID
2324 TrustedIdentity :
24- default : " Trusted Identity"
25+ default : Trusted Identity
2526 TargetEventBusARN :
26- default : " Target Event Bus"
27+ default : Target Event Bus
2728 Regions :
28- default : " Instrumented Regions"
29+ default : Instrumented Regions
2930 RuleState :
30- default : " EventBridge Rule state"
31+ default : EventBridge Rule state
3132 RuleEventPattern :
32- default : " EventBridge Rule event pattern"
33+ default : EventBridge Rule event pattern
3334 IsOrganizational :
3435 default : Is Organizational
3536 OrganizationalUnitIDs :
36- default : " Organizational Unit IDs"
37+ default : Organizational Unit IDs
38+ Partition :
39+ default : AWS Partition
3740Parameters :
3841 NameSuffix :
3942 Type : String
@@ -93,6 +96,10 @@ Parameters:
9396 AllowedValues :
9497 - ' true'
9598 - ' false'
99+ Partition :
100+ Type : String
101+ Description : AWS Partition of your account or organization to create resources in
102+ Default : ' aws'
96103Conditions :
97104 IsOrganizational :
98105 Fn::Equals :
@@ -120,7 +127,7 @@ Resources:
120127 Action :
121128 - sts:AssumeRole
122129 Resource :
123- - !Sub arn:aws :iam:::role/sysdig-secure-events-stackset-execution-${NameSuffix}
130+ - !Sub arn:${Partition} :iam:::role/sysdig-secure-events-stackset-execution-${NameSuffix}
124131 ExecutionRole :
125132 Type : AWS::IAM::Role
126133 Properties :
@@ -135,8 +142,8 @@ Resources:
135142 Action :
136143 - sts:AssumeRole
137144 ManagedPolicyArns :
138- - arn:aws :iam::aws:policy/AmazonEventBridgeFullAccess
139- - arn:aws :iam::aws:policy/AWSCloudFormationFullAccess
145+ - !Sub arn:${Partition} :iam::aws:policy/AmazonEventBridgeFullAccess
146+ - !Sub arn:${Partition} :iam::aws:policy/AWSCloudFormationFullAccess
140147 EventBridgeRole :
141148 Type : AWS::IAM::Role
142149 Properties :
@@ -168,7 +175,7 @@ Resources:
168175 - " events:DescribeRule"
169176 - " events:ListTargetsByRule"
170177 Resource :
171- - !Sub arn:aws :events:*:*:rule/sysdig-secure-events-${NameSuffix}
178+ - !Sub arn:${Partition} :events:*:*:rule/sysdig-secure-events-${NameSuffix}
172179 EventBridgeRuleStackSet :
173180 Type : AWS::CloudFormation::StackSet
174181 Metadata :
@@ -203,7 +210,9 @@ Resources:
203210 - ParameterKey : RuleState
204211 ParameterValue : !Ref RuleState
205212 - ParameterKey : RuleEventPattern
206- ParameterValue : !Ref RuleEventPattern
213+ ParameterValue : !Ref RuleEventPattern
214+ - ParameterKey : Partition
215+ ParameterValue : !Ref Partition
207216 StackInstancesGroup :
208217 - DeploymentTargets :
209218 Accounts :
@@ -230,6 +239,9 @@ Resources:
230239 RuleEventPattern:
231240 Type: String
232241 Description: JSON pattern for the EventBridge rule's event pattern
242+ Partition:
243+ Type: String
244+ Description: AWS Partition of your account or organization to create resources in
233245 Resources:
234246 EventBridgeRule:
235247 Type: "AWS::Events::Rule"
@@ -241,7 +253,7 @@ Resources:
241253 Targets:
242254 - Id: !Ref Name
243255 Arn: !Sub ${TargetEventBusARN}
244- RoleArn: !Sub arn:aws :iam::${AWS::AccountId}:role/${Name}
256+ RoleArn: !Sub arn:${Partition} :iam::${AWS::AccountId}:role/${Name}
245257 OrganizationRoleStackSet :
246258 Type : AWS::CloudFormation::StackSet
247259 Condition : IsOrganizational
@@ -269,6 +281,8 @@ Resources:
269281 ParameterValue : !Ref ExternalID
270282 - ParameterKey : TargetEventBusARN
271283 ParameterValue : !Ref TargetEventBusARN
284+ - ParameterKey : Partition
285+ ParameterValue : !Ref Partition
272286 StackInstancesGroup :
273287 - DeploymentTargets :
274288 OrganizationalUnitIds : !Ref OrganizationalUnitIDs
@@ -288,7 +302,10 @@ Resources:
288302 Description: A unique identifier used to create and reference resources
289303 TargetEventBusARN:
290304 Type: String
291- Description: The destination in Sysdig's AWS account where your events are sent
305+ Description: The destination in Sysdig's AWS account where your events are sent
306+ Partition:
307+ Type: String
308+ Description: AWS Partition of your account or organization to create resources in
292309 Resources:
293310 EventBridgeRole:
294311 Type: AWS::IAM::Role
@@ -321,7 +338,7 @@ Resources:
321338 - "events:DescribeRule"
322339 - "events:ListTargetsByRule"
323340 Resource:
324- - !Sub arn:aws :events:*:*:rule/${Name}
341+ - !Sub arn:${Partition} :events:*:*:rule/${Name}
325342 OrganizationRuleStackSet :
326343 Type : AWS::CloudFormation::StackSet
327344 Condition : IsOrganizational
@@ -352,6 +369,8 @@ Resources:
352369 ParameterValue : !Ref RuleState
353370 - ParameterKey : RuleEventPattern
354371 ParameterValue : !Ref RuleEventPattern
372+ - ParameterKey : Partition
373+ ParameterValue : !Ref Partition
355374 StackInstancesGroup :
356375 - DeploymentTargets :
357376 OrganizationalUnitIds : !Ref OrganizationalUnitIDs
@@ -377,6 +396,9 @@ Resources:
377396 RuleEventPattern:
378397 Type: String
379398 Description: JSON pattern for the EventBridge rule's event pattern
399+ Partition:
400+ Type: String
401+ Description: AWS Partition of your account or organization to create resources in
380402 Resources:
381403 EventBridgeRule:
382404 Type: "AWS::Events::Rule"
@@ -388,7 +410,7 @@ Resources:
388410 Targets:
389411 - Id: !Ref Name
390412 Arn: !Ref TargetEventBusARN
391- RoleArn: !Sub "arn:aws :iam::${AWS::AccountId}:role/${Name}"
413+ RoleArn: !Sub "arn:${Partition} :iam::${AWS::AccountId}:role/${Name}"
392414Outputs :
393415 EventBridgeRoleARN :
394416 Description : Sysdig Secure EventBridge Role ARN
0 commit comments