1 | import { DockerImageAssetLocation, DockerImageAssetSource, FileAssetLocation, FileAssetSource } from '../assets';
|
2 | import { ISynthesisSession } from '../construct-compat';
|
3 | import { Stack } from '../stack';
|
4 | import { StackSynthesizer } from './stack-synthesizer';
|
5 | /**
|
6 | * Properties for the CliCredentialsStackSynthesizer
|
7 | */
|
8 | export interface CliCredentialsStackSynthesizerProps {
|
9 | /**
|
10 | * Name of the S3 bucket to hold file assets
|
11 | *
|
12 | * You must supply this if you have given a non-standard name to the staging bucket.
|
13 | *
|
14 | * The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
|
15 | * be replaced with the values of qualifier and the stack's account and region,
|
16 | * respectively.
|
17 | *
|
18 | * @default DefaultStackSynthesizer.DEFAULT_FILE_ASSETS_BUCKET_NAME
|
19 | */
|
20 | readonly fileAssetsBucketName?: string;
|
21 | /**
|
22 | * Name of the ECR repository to hold Docker Image assets
|
23 | *
|
24 | * You must supply this if you have given a non-standard name to the ECR repository.
|
25 | *
|
26 | * The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
|
27 | * be replaced with the values of qualifier and the stack's account and region,
|
28 | * respectively.
|
29 | *
|
30 | * @default DefaultStackSynthesizer.DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME
|
31 | */
|
32 | readonly imageAssetsRepositoryName?: string;
|
33 | /**
|
34 | * Qualifier to disambiguate multiple environments in the same account
|
35 | *
|
36 | * You can use this and leave the other naming properties empty if you have deployed
|
37 | * the bootstrap environment with standard names but only differnet qualifiers.
|
38 | *
|
39 | * @default - Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise `DefaultStackSynthesizer.DEFAULT_QUALIFIER`
|
40 | */
|
41 | readonly qualifier?: string;
|
42 | /**
|
43 | * bucketPrefix to use while storing S3 Assets
|
44 | *
|
45 | * @default - DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX
|
46 | */
|
47 | readonly bucketPrefix?: string;
|
48 | /**
|
49 | * A prefix to use while tagging and uploading Docker images to ECR.
|
50 | *
|
51 | * This does not add any separators - the source hash will be appended to
|
52 | * this string directly.
|
53 | *
|
54 | * @default - DefaultStackSynthesizer.DEFAULT_DOCKER_ASSET_PREFIX
|
55 | */
|
56 | readonly dockerTagPrefix?: string;
|
57 | }
|
58 | /**
|
59 | * A synthesizer that uses conventional asset locations, but not conventional deployment roles
|
60 | *
|
61 | * Instead of assuming the bootstrapped deployment roles, all stack operations will be performed
|
62 | * using the CLI's current credentials.
|
63 | *
|
64 | * - This synthesizer does not support deploying to accounts to which the CLI does not have
|
65 | * credentials. It also does not support deploying using **CDK Pipelines**. For either of those
|
66 | * features, use `DefaultStackSynthesizer`.
|
67 | * - This synthesizer requires an S3 bucket and ECR repository with well-known names. To
|
68 | * not depend on those, use `LegacyStackSynthesizer`.
|
69 | *
|
70 | * Be aware that your CLI credentials must be valid for the duration of the
|
71 | * entire deployment. If you are using session credentials, make sure the
|
72 | * session lifetime is long enough.
|
73 | *
|
74 | * By default, expects the environment to have been bootstrapped with just the staging resources
|
75 | * of the Bootstrap Stack V2 (also known as "modern bootstrap stack"). You can override
|
76 | * the default names using the synthesizer's construction properties.
|
77 | */
|
78 | export declare class CliCredentialsStackSynthesizer extends StackSynthesizer {
|
79 | private readonly props;
|
80 | private stack?;
|
81 | private qualifier?;
|
82 | private bucketName?;
|
83 | private repositoryName?;
|
84 | private bucketPrefix?;
|
85 | private dockerTagPrefix?;
|
86 | private readonly assetManifest;
|
87 | constructor(props?: CliCredentialsStackSynthesizerProps);
|
88 | bind(stack: Stack): void;
|
89 | addFileAsset(asset: FileAssetSource): FileAssetLocation;
|
90 | addDockerImageAsset(asset: DockerImageAssetSource): DockerImageAssetLocation;
|
91 | /**
|
92 | * Synthesize the associated stack to the session
|
93 | */
|
94 | synthesize(session: ISynthesisSession): void;
|
95 | }
|