Skip to content

Commit

Permalink
fix: self managed stackset dependencies
Browse files Browse the repository at this point in the history
adds an explicit dependency between MgmtAccEBRuleStackSet and associated self managed roles
Even though there is an implicit dependency because of the use of Fn::GetAtt, we also need
an explicit dependency to handle stack teardown gracefully. Adds cfn-lint exclusion
  • Loading branch information
cgeers committed Apr 17, 2023
1 parent 099e26e commit 7ac91fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion templates_cspm_eventbridge/OrgFullInstall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,14 @@ Resources:
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${EventBridgeRoleName}"
MgmtAccEBRuleStackSet:
Type: AWS::CloudFormation::StackSet
DependsOn: ExecutionRole
Metadata:
cfn-lint:
config:
ignore_checks:
- W3005
DependsOn:
- ExecutionRole
- AdministrationRole
Properties:
StackSetName: MgmtAccEBRuleStackSet
AdministrationRoleARN: !GetAtt AdministrationRole.Arn
Expand Down
9 changes: 8 additions & 1 deletion templates_eventbridge/OrgEventBridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ Resources:
Resource: !Sub ${EventBusARN}
MgmtAccEBRuleStackSet:
Type: AWS::CloudFormation::StackSet
DependsOn: ExecutionRole
Metadata:
cfn-lint:
config:
ignore_checks:
- W3005
DependsOn:
- ExecutionRole
- AdministrationRole
Properties:
StackSetName: MgmtAccEBRuleStackSet
AdministrationRoleARN: !GetAtt AdministrationRole.Arn
Expand Down

0 comments on commit 7ac91fe

Please sign in to comment.