- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
I'll help you break down the output from the CDK.
Deprecation Warning
First, you have a deprecation warning appearing twice:
[WARNING] aws-cdk-lib.aws_ec2.VpcProps#cidr is deprecated.
Use ipAddresses instead
This API will be removed in the next major release.
This is to inform you that the VpcProps
interface will no longer use the cidr
property in the future and will instead use the ipAddresses
property. On the overview page for the EC2 module, you can see the new way to input a CIDR value.
CDK diff output
The output from the cdk diff
command can be challenging to understand sometimes, but is immensely helpful when performing upgrades or refactoring.
Stack UprightPipelineStack/test/network-stack (test-network-stack)
Resources
[~] AWS::EC2::NatGateway test/network-stack/upright_vpc/PublicSubnet1/NATGateway uprightvpcPublicSubnet1NATGateway86E25FDE
└─ [+] DependsOn
└─ ["uprightvpcPublicSubnet1DefaultRoute900852B5","uprightvpcPublicSubnet1RouteTableAssociation7B05C537"]
[~] AWS::EC2::NatGateway test/network-stack/upright_vpc/PublicSubnet2/NATGateway uprightvpcPublicSubnet2NATGateway117AA26A
└─ [+] DependsOn
└─ ["uprightvpcPublicSubnet2DefaultRouteC847382C","uprightvpcPublicSubnet2RouteTableAssociation517ECEEF"]
[~] AWS::EC2::NatGateway test/network-stack/upright_vpc/PublicSubnet3/NATGateway uprightvpcPublicSubnet3NATGateway27BAB1E3
└─ [+] DependsOn
└─ ["uprightvpcPublicSubnet3DefaultRoute2A9BF176","uprightvpcPublicSubnet3RouteTableAssociation39653CF8"]
I will go line-by-line for the first three lines of the diff to explain the output.
[~] AWS::EC2::NatGateway test/network-stack/upright_vpc/PublicSubnet1/NATGateway uprightvpcPublicSubnet1NATGateway86E25FDE
[~]
means that the resource indicated here might changeAWS::EC2::NatGateway
indicates the resource is a NAT Gatewaytest/network-stack/upright_vpc/PublicSubnet1/NATGateway
is the path to the resource in your CDK Stacks. The path might be a combination of file path and the hierarchy of constructs used to define your CDK stackuprightvpcPublicSubnet1NATGateway86E25FDE
is the logical ID for the resource, it's the identifier in your CloudFormation stack
└─ [+] DependsOn
This indicates that the preceding resource in the CloudFormation stack will have a DependsOn
property added. If it were [-]
, that would mean it was being removed.
└─ ["uprightvpcPublicSubnet1DefaultRoute900852B5","uprightvpcPublicSubnet1RouteTableAssociation7B05C537"]
This identifies the logical IDs of the resources the NAT Gateway will be marked as depending upon. Based upon the IDs I am guessing it had to do with your route tables.
You can view additional information on the docs page for the AWS CDK CLI toolkit.
Based on the diff you shared, I doubt you will have any issues if you deploy your migrated coded. The DependsOn
property is there to help CloudFormation deploy resources in the correct order.
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata un anno fa
Thank you very much for your very detailed explanation! I assume this new dependency may be a result of AWS CDK v2 being able to establish these dependencies, while v1 did not.
@sbrattla, I think it's more of a change where they are improving the CDK constructs to mitigate issues. CDK v1 supports
DependsOn