StackSet/Conformance Packs support - make stacks available as an asset
See original GitHub issueA stack should be made available as an asset. At the moment it’s not possible to add the generated template file as asset in another stack, as the file does not exist at this point in time.
Use Case
If you want to deploy a StackSet or ServiceCatalog Product (in a pipeline) two stacks are used. One stack contains the StackSet construct and the other stack (let’s call it template stack) is the one which should be deployed in target accounts via StackSet. This template stack will never deployed directly but just synthesized. The StackSet stack needs an s3 url of the template stack.
This could be also related to an integration with Proton where it’s also the synthesized stack template needs to be available as asset as well.
Proposed Solution
The usage could look like this:
export interface StackSetStackProps extends cdk.StackProps {
stack: cdk.Stack
...
}
export class StackSetStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props: StackSetStackProps) {
super(scope, id, props);
new cfn.CfnStackSet(this, 'StackSet', {
...
templateUrl: new s3assets.Asset(props.stack),
});
}
}
Not sure how the implementation could look like.
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:26 (16 by maintainers)
Top GitHub Comments
@pgarbe I am curious if you can use
addFileAsset()
to achieve this?I’d be interested in adding official support for
StackSets
so let’s figure the right model and add it.Making the stack available as an asset use cases is also needed for AWS Config conformance packs.
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-config.CfnOrganizationConformancePack.html