Skip to content

Commit

Permalink
docs: add clarifying note on intrinsic function support for hotswaps
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwwright committed Sep 27, 2023
1 parent 41baea5 commit 383a609
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/aws-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,16 @@ For this reason, only use it for development purposes.
**⚠ Note #2**: This command is considered experimental,
and might have breaking changes in the future.

**⚠ Note #3**: Expected defaults for certain parameters may be different with the hotswap parameter. For example, an ECS service's minimum healthy percentage will currently be set to 0. Please review the source accordingly if this occurs.
**⚠ Note #3**: Expected defaults for certain parameters may be different with the hotswap parameter. For example, an ECS service's minimum healthy percentage will currently be set to 0. Please review the source accordingly if this occurs.

**⚠ Note #4**: Only usage of certain [CloudFormation intrinsic functions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html) are supported as part of a hotswapped deployment. At time of writing, these are:
- `Ref`
- `Fn::GetAtt`
- `Fn::ImportValue`
- `Fn::Join`
- `Fn::Select`
- `Fn::Split`
- `Fn::Sub`

### `cdk watch`

Expand Down
8 changes: 8 additions & 0 deletions packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ export class EvaluateCloudFormationTemplate {

public async evaluateCfnExpression(cfnExpression: any): Promise<any> {
const self = this;
/**
* Evaluates CloudFormation intrinsic functions
*
* Note that supported intrinsic functions are documented in README.md -- please update
* list of supported functions when adding new evaluations
*
* See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
*/
class CfnIntrinsics {
public evaluateIntrinsic(intrinsic: Intrinsic): any {
const intrinsicFunc = (this as any)[intrinsic.name];
Expand Down

0 comments on commit 383a609

Please sign in to comment.