1 Answer
- Newest
- Most votes
- Most comments
0
Yes, it's possible to create nested-nested stacks (also known as multi-level nested stacks) in CloudFormation. This is essentially a nested stack that contains another nested stack, creating a hierarchy of stacks.
Here's a practical example to illustrate the concept:
## Root Stack (parent-stack.yaml)
AWSTemplateFormatVersion: '2010-09-09'
Resources:
FirstLevelNestedStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://s3.amazonaws.com/bucket-name/first-level.yaml'
Parameters:
EnvironmentType: 'Production'
## First Level Nested Stack (first-level.yaml)
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
EnvironmentType:
Type: String
Resources:
SecondLevelNestedStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://s3.amazonaws.com/bucket-name/second-level.yaml'
Parameters:
Environment: !Ref EnvironmentType
Relevant content
asked 2 years ago
asked 3 years ago
