- Newest
- Most votes
- Most comments
In CDK, there is no construct for stacksets. I did find documentation on cloudformation stack sets which may be helpful: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudformation.CfnStackSet.html
answered 2 years ago
Yes, there is a construct for StackSets in AWS CDK, but it's important to note that it's not a fully-featured, high-level construct like those available for regular stacks or nested stacks.
The construct available for StackSets in CDK is called CfnStackSet. This is a low-level (L1) construct that provides a direct mapping to the CloudFormation StackSet resource. It allows you to create and manage CloudFormation stack sets, which enable you to deploy CloudFormation stacks into multiple AWS accounts and regions using a single CloudFormation template.
The CfnStackSet construct includes properties such as permissionModel, stackSetName, administrationRoleArn, autoDeployment, capabilities, description, executionRoleName, managedExecution, operationPreferences, parameters, stackInstancesGroup, tags, templateBody, and templateUrl. These properties allow you to configure various aspects of your stack set.
However, it's worth noting that while this construct exists, it doesn't provide the same level of abstraction and ease of use as some other CDK constructs. As of now, there isn't a higher-level (L2 or L3) construct for StackSets in the main CDK library.
For those looking for more advanced StackSet functionality in CDK, there is an experimental construct in CDK Labs. However, as it's in an experimental phase, it's advisable to use it cautiously in production environments and be prepared for potential changes in its implementation.
If you need to work with StackSets extensively in your CDK projects, you might need to build additional abstractions on top of the CfnStackSet construct to suit your specific use cases.
Sources
class CfnStackSet (construct) · AWS CDK
class CfnStackSet (construct) · AWS CDK
Community | Multi-region Deployments with CDK
Relevant content
asked 3 years ago
asked a year ago
asked 3 years ago
