class StackSetTemplate
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodePipeline.Actions.StackSetTemplate |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#StackSetTemplate |
![]() | software.amazon.awscdk.services.codepipeline.actions.StackSetTemplate |
![]() | aws_cdk.aws_codepipeline_actions.StackSetTemplate |
![]() | aws-cdk-lib » aws_codepipeline_actions » StackSetTemplate |
The source of a StackSet template.
Example
declare const pipeline: codepipeline.Pipeline;
declare const sourceOutput: codepipeline.Artifact;
pipeline.addStage({
stageName: 'DeployStackSets',
actions: [
// First, update the StackSet itself with the newest template
new codepipeline_actions.CloudFormationDeployStackSetAction({
actionName: 'UpdateStackSet',
runOrder: 1,
stackSetName: 'MyStackSet',
template: codepipeline_actions.StackSetTemplate.fromArtifactPath(sourceOutput.atPath('template.yaml')),
// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
deploymentModel: codepipeline_actions.StackSetDeploymentModel.selfManaged(),
// This deploys to a set of accounts
stackInstances: codepipeline_actions.StackInstances.inAccounts(['111111111111'], ['us-east-1', 'eu-west-1']),
}),
// Afterwards, update/create additional instances in other accounts
new codepipeline_actions.CloudFormationDeployStackInstancesAction({
actionName: 'AddMoreInstances',
runOrder: 2,
stackSetName: 'MyStackSet',
stackInstances: codepipeline_actions.StackInstances.inAccounts(
['222222222222', '333333333333'],
['us-east-1', 'eu-west-1']
),
}),
],
});
Initializer
new StackSetTemplate()
Methods
Name | Description |
---|---|
static from | Use a file in an artifact as Stack Template. |
static fromArtifactPath(artifactPath)
public static fromArtifactPath(artifactPath: ArtifactPath): StackSetTemplate
Parameters
- artifactPath
Artifact
Path
Returns
Use a file in an artifact as Stack Template.