Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviomacedo committed Feb 27, 2025
1 parent fb7c47d commit 6963761
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions text/0162-refactoring-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ different CDK applications into a single reusable construct (often called an L3
construct). Introducing a new node for the L3 construct in the construct tree
will rename the logical IDs of the resources in that subtree.

Additionally, you might need to move resources within the tree for better
readability or between stacks to isolate concerns. Accidental renames have also
caused issues for customers in the past. Perhaps even worse, if you depend on a
third-party construct library, you are not in control of the logical IDs of
those resources. If the library changes the logical IDs from one version to
another, you will be affected without any action on your part.
Also, you might need to move resources within the tree for better readability or
between stacks to isolate concerns. Accidental renames have also caused issues
for customers in the past. Perhaps even worse, if you depend on a third-party
construct library, you are not in control of the logical IDs of those resources.
If the library changes the logical IDs from one version to another, you will be
affected without any action on your part.

To address all these problems, the CDK CLI now automatically detects these
cases, and refactors the stack on your behalf, using the new CloudFormation
Expand Down Expand Up @@ -76,7 +76,7 @@ The refactored construct tree looks like this:
Even though none of the resources have changed, their paths have
(from `MyStack/Bucket/Resource` to `Web/Website/Origin/Resource` etc.) Since the
CDK computes the logical IDs of the resources from their path in the tree, all
three resources will have different logical IDs changed.
three resources will have their logical IDs changed.

If you run `cdk deploy` now, by default the CLI will detect these changes and
present you with a selection prompt:
Expand Down Expand Up @@ -343,7 +343,7 @@ better experience by automatically detecting these cases, and interacting with
the user when necessary.

Another alternative is to use aliases, using [Pulumi's model]
[pulumi-aliases] as inspiration. This feature would be similar to the
[pulumi-aliases] as inspiration. This feature would be similar to the
`renameLogicalId` function, but operating on a higher level of abstraction, by
taking into account the construct tree and construct IDs. And, just like
`renameLogicalId`, it could be perceived as a workaround. However, we are open
Expand Down

0 comments on commit 6963761

Please sign in to comment.