2

I have an issue when I'm working with NestedStack in AWS CDK, the problem is when I'm using the cdk diff command its returns the diff output return to me.

But when I have a diff inside my NestedStack it's just a reference and i really don't know what it will change inside my NestedStack.

[~] AWS::CloudFormation::Stack IAMPolicyStack.NestedStack/IAMPolicyStack.NestedStackResource IAMPolicyStackNestedStackIAMPolicyStackNestedStackResource4B98A1D2 
 ├─ [~] NestedTemplate
 │   └─ [~] .Resources:
 │       └─ [~] .CDKMetadata:
 │           └─ [~] .Properties:
 │               └─ [~] .Analytics:
 │                   ├─ [-] v2:deflate64:H4sIAAAAAAAA/zPSMzLWM1BMLC/WTU7J1s3JTNKr9kstLklNCS5JTM7WcU7LC0otzi8tSk4FsZ3z81IySzLz82p1AipLMvLz9I31DA30TBSzijMzdYtK80oyc1P1giA0AJZoScZcAAAA
 │                   └─ [+] v2:deflate64:H4sIAAAAAAAA/zPSMzLWM1BMLC/WTU7J1s3JTNKr9kstLklNCS5JTM7WcU7LC0otzi8tSk4FsZ3z81IySzLz82p1AipLMvLz9I31LPUMjRSzijMzdYtK80oyc1P1giA0ALbtmvJcAAAA

Hope someone out there has hit the same issue as me and has a solution about how to get the diff output from NestedStack.

Updated 30/05/2022

The featuer look like its not ready yet, but its coming in the feature based my ticket here - https://github.com/aws/aws-cdk/issues/20392

ParisNakitaKejser
  • 12,112
  • 9
  • 46
  • 66

1 Answers1

1

This commit adds a workaround where you can run

cdk deploy --no-execute

and then view the nested stack changes in the CloudFormation change set that gets created.

Edit: Looks like this has not been merged yet as of 1.163.1, here is the open issue.

nicou
  • 11
  • 1
  • 3