|
| 1 | +/** |
| 2 | + * In what scenarios should the CLI ask for approval |
| 3 | + */ |
| 4 | +export enum RequireApproval { |
| 5 | + /** |
| 6 | + * Never ask for approval |
| 7 | + */ |
| 8 | + NEVER = 'never', |
| 9 | + |
| 10 | + /** |
| 11 | + * Prompt for approval for any type of change to the stack |
| 12 | + */ |
| 13 | + ANYCHANGE = 'any-change', |
| 14 | + |
| 15 | + /** |
| 16 | + * Only prompt for approval if there are security related changes |
| 17 | + */ |
| 18 | + BROADENING = 'broadening' |
| 19 | +} |
| 20 | + |
| 21 | +/** |
| 22 | + * Default CDK CLI options that apply to all commands |
| 23 | + */ |
| 24 | +export interface DefaultCdkOptions { |
| 25 | + /** |
| 26 | + * List of stacks to deploy |
| 27 | + * |
| 28 | + * Requried if `all` is not set |
| 29 | + * |
| 30 | + * @default - [] |
| 31 | + */ |
| 32 | + readonly stacks?: string[]; |
| 33 | + |
| 34 | + /** |
| 35 | + * Deploy all stacks |
| 36 | + * |
| 37 | + * Requried if `stacks` is not set |
| 38 | + * |
| 39 | + * @default - false |
| 40 | + */ |
| 41 | + readonly all?: boolean; |
| 42 | + |
| 43 | + /** |
| 44 | + * command-line for executing your app or a cloud assembly directory |
| 45 | + * e.g. "node bin/my-app.js" |
| 46 | + * or |
| 47 | + * "cdk.out" |
| 48 | + * |
| 49 | + * @default - read from cdk.json |
| 50 | + */ |
| 51 | + readonly app?: string; |
| 52 | + |
| 53 | + |
| 54 | + /** |
| 55 | + * Role to pass to CloudFormation for deployment |
| 56 | + * |
| 57 | + * @default - use the bootstrap cfn-exec role |
| 58 | + */ |
| 59 | + readonly roleArn?: string; |
| 60 | + |
| 61 | + /** |
| 62 | + * Additional context |
| 63 | + * |
| 64 | + * @default - no additional context |
| 65 | + */ |
| 66 | + readonly context?: { [name: string]: string }; |
| 67 | + |
| 68 | + /** |
| 69 | + * Print trace for stack warnings |
| 70 | + * |
| 71 | + * @default false |
| 72 | + */ |
| 73 | + readonly trace?: boolean; |
| 74 | + |
| 75 | + /** |
| 76 | + * Do not construct stacks with warnings |
| 77 | + * |
| 78 | + * @default false |
| 79 | + */ |
| 80 | + readonly strict?: boolean; |
| 81 | + |
| 82 | + /** |
| 83 | + * Perform context lookups. |
| 84 | + * |
| 85 | + * Synthesis fails if this is disabled and context lookups need |
| 86 | + * to be performed |
| 87 | + * |
| 88 | + * @default true |
| 89 | + */ |
| 90 | + readonly lookups?: boolean; |
| 91 | + |
| 92 | + /** |
| 93 | + * Ignores synthesis errors, which will likely produce an invalid output |
| 94 | + * |
| 95 | + * @default false |
| 96 | + */ |
| 97 | + readonly ignoreErrors?: boolean; |
| 98 | + |
| 99 | + /** |
| 100 | + * Use JSON output instead of YAML when templates are printed |
| 101 | + * to STDOUT |
| 102 | + * |
| 103 | + * @default false |
| 104 | + */ |
| 105 | + readonly json?: boolean; |
| 106 | + |
| 107 | + /** |
| 108 | + * show debug logs |
| 109 | + * |
| 110 | + * @default false |
| 111 | + */ |
| 112 | + readonly verbose?: boolean; |
| 113 | + |
| 114 | + /** |
| 115 | + * enable emission of additional debugging information, such as creation stack |
| 116 | + * traces of tokens |
| 117 | + * |
| 118 | + * @default false |
| 119 | + */ |
| 120 | + readonly debug?: boolean; |
| 121 | + |
| 122 | + /** |
| 123 | + * Use the indicated AWS profile as the default environment |
| 124 | + * |
| 125 | + * @default - no profile is used |
| 126 | + */ |
| 127 | + readonly profile?: string; |
| 128 | + |
| 129 | + /** |
| 130 | + * Use the indicated proxy. Will read from |
| 131 | + * HTTPS_PROXY environment if specified |
| 132 | + * |
| 133 | + * @default - no proxy |
| 134 | + */ |
| 135 | + readonly proxy?: string; |
| 136 | + |
| 137 | + /** |
| 138 | + * Path to CA certificate to use when validating HTTPS |
| 139 | + * requests. |
| 140 | + * |
| 141 | + * @default - read from AWS_CA_BUNDLE environment variable |
| 142 | + */ |
| 143 | + readonly caBundlePath?: string; |
| 144 | + |
| 145 | + /** |
| 146 | + * Force trying to fetch EC2 instance credentials |
| 147 | + * |
| 148 | + * @default - guess EC2 instance status |
| 149 | + */ |
| 150 | + readonly ec2Creds?: boolean; |
| 151 | + |
| 152 | + /** |
| 153 | + * Include "AWS::CDK::Metadata" resource in synthesized templates |
| 154 | + * |
| 155 | + * @default true |
| 156 | + */ |
| 157 | + readonly versionReporting?: boolean; |
| 158 | + |
| 159 | + /** |
| 160 | + * Include "aws:cdk:path" CloudFormation metadata for each resource |
| 161 | + * |
| 162 | + * @default true |
| 163 | + */ |
| 164 | + readonly pathMetadata?: boolean; |
| 165 | + |
| 166 | + /** |
| 167 | + * Include "aws:asset:*" CloudFormation metadata for resources that use assets |
| 168 | + * |
| 169 | + * @default true |
| 170 | + */ |
| 171 | + readonly assetMetadata?: boolean; |
| 172 | + |
| 173 | + /** |
| 174 | + * Copy assets to the output directory |
| 175 | + * |
| 176 | + * Needed for local debugging the source files with SAM CLI |
| 177 | + * |
| 178 | + * @default false |
| 179 | + */ |
| 180 | + readonly staging?: boolean; |
| 181 | + |
| 182 | + /** |
| 183 | + * Emits the synthesized cloud assembly into a directory |
| 184 | + * |
| 185 | + * @default cdk.out |
| 186 | + */ |
| 187 | + readonly output?: string; |
| 188 | + |
| 189 | + /** |
| 190 | + * Show relevant notices |
| 191 | + * |
| 192 | + * @default true |
| 193 | + */ |
| 194 | + readonly notices?: boolean; |
| 195 | + |
| 196 | + /** |
| 197 | + * Show colors and other style from console output |
| 198 | + * |
| 199 | + * @default true |
| 200 | + */ |
| 201 | + readonly color?: boolean; |
| 202 | +} |
0 commit comments