Implements IStackSynthesizer
, IReusableStackSynthesizer
, IBoundStackSynthesizer
Extends StackSynthesizer
Uses conventionally named roles and asset storage locations.
This synthesizer:
Requires the environment to have been bootstrapped with Bootstrap Stack V2 (also known as "modern bootstrap stack"). The synthesizer adds a version check to the template, to make sure the bootstrap stack is recent enough to support all features expected by this synthesizer.
Exampledeclare const app: App;
const prodStage = new Stage(app, 'ProdStage', {
permissionsBoundary: PermissionsBoundary.fromName('cdk-${Qualifier}-PermissionsBoundary-${AWS::AccountId}-${AWS::Region}'),
});
new Stack(prodStage, 'ProdStack', {
synthesizer: new DefaultStackSynthesizer({
qualifier: 'custom',
}),
});
Initializer
new DefaultStackSynthesizer(props?: DefaultStackSynthesizerProps)
Parameters
Properties Name Type Description cloudFormationExecutionRoleArnstring
Returns the ARN of the CFN execution Role. deployRoleArn string
Returns the ARN of the deploy Role. bootstrapQualifier? string
The qualifier used to bootstrap this stack. lookupRole? string
The role used to lookup for this stack. stack?â ï¸ Stack
Return the currently bound stack. static DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER string
Default bootstrap stack version SSM parameter. static DEFAULT_CLOUDFORMATION_ROLE_ARN string
Default CloudFormation role ARN. static DEFAULT_DEPLOY_ROLE_ARN string
Default deploy role ARN. static DEFAULT_DOCKER_ASSET_PREFIX string
Default Docker asset prefix. static DEFAULT_FILE_ASSETS_BUCKET_NAME string
Default file assets bucket name. static DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME string
Name of the CloudFormation Export with the asset key name. static DEFAULT_FILE_ASSET_PREFIX string
Default file asset prefix. static DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN string
Default asset publishing role ARN for file (S3) assets. static DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME string
Default image assets repository name. static DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN string
Default asset publishing role ARN for image (ECR) assets. static DEFAULT_LOOKUP_ROLE_ARN string
Default lookup role ARN for missing values. static DEFAULT_QUALIFIER string
Default ARN qualifier. cloudFormationExecutionRoleArn
Type: string
Returns the ARN of the CFN execution Role.
deployRoleArnType: string
Returns the ARN of the deploy Role.
bootstrapQualifier?Type: string
(optional)
The qualifier used to bootstrap this stack.
lookupRole?Type: string
(optional)
The role used to lookup for this stack.
stack?â ï¸â ï¸ Deprecated: Use boundStack
instead.
Type: Stack
(optional)
Return the currently bound stack.
static DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETERType: string
Default bootstrap stack version SSM parameter.
static DEFAULT_CLOUDFORMATION_ROLE_ARNType: string
Default CloudFormation role ARN.
static DEFAULT_DEPLOY_ROLE_ARNType: string
Default deploy role ARN.
static DEFAULT_DOCKER_ASSET_PREFIXType: string
Default Docker asset prefix.
static DEFAULT_FILE_ASSETS_BUCKET_NAMEType: string
Default file assets bucket name.
static DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAMEType: string
Name of the CloudFormation Export with the asset key name.
static DEFAULT_FILE_ASSET_PREFIXType: string
Default file asset prefix.
static DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARNType: string
Default asset publishing role ARN for file (S3) assets.
static DEFAULT_IMAGE_ASSETS_REPOSITORY_NAMEType: string
Default image assets repository name.
static DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARNType: string
Default asset publishing role ARN for image (ECR) assets.
static DEFAULT_LOOKUP_ROLE_ARNType: string
Default lookup role ARN for missing values.
static DEFAULT_QUALIFIERType: string
Default ARN qualifier.
Methods Name Description addDockerImageAsset(asset) Register a Docker Image Asset. addFileAsset(asset) Register a File Asset. bind(stack) Bind to the stack this environment is going to be used on. reusableBind(stack) Produce a bound Stack Synthesizer for the given stack. synthesize(session) Synthesize the associated stack to the session. protected synthesizeStackTemplate(stack, session) Synthesize the stack template to the given session, passing the configured lookup role ARN. addDockerImageAsset(asset)public addDockerImageAsset(asset: DockerImageAssetSource): DockerImageAssetLocation
Parameters
DockerImageAssetSource
Returns
Register a Docker Image Asset.
Returns the parameters that can be used to refer to the asset inside the template.
The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets
tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.
public addFileAsset(asset: FileAssetSource): FileAssetLocation
Parameters
FileAssetSource
Returns
Register a File Asset.
Returns the parameters that can be used to refer to the asset inside the template.
The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets
tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.
public bind(stack: Stack): void
Parameters
Stack
Bind to the stack this environment is going to be used on.
Must be called before any of the other methods are called.
reusableBind(stack)public reusableBind(stack: Stack): IBoundStackSynthesizer
Parameters
Stack
Returns
Produce a bound Stack Synthesizer for the given stack.
This method may be called more than once on the same object.
synthesize(session)public synthesize(session: ISynthesisSession): void
Parameters
ISynthesisSession
Synthesize the associated stack to the session.
protected synthesizeStackTemplate(stack, session)protected synthesizeStackTemplate(stack: Stack, session: ISynthesisSession): void
Parameters
Stack
ISynthesisSession
Synthesize the stack template to the given session, passing the configured lookup role ARN.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4