Skip to content

Commit

Permalink
fix(core): consistent sorting of resource tags
Browse files Browse the repository at this point in the history
Sorts tags by key name so the ordering is consistent in the synthesized
output. This prevents a change to the order of tag definition from creating
a different synthesized output (and unnecessary deployments).

fixes aws#7707
  • Loading branch information
njlynch authored May 13, 2020
1 parent 18601dd commit 0105efd
Show file tree
Hide file tree
Showing 76 changed files with 1,804 additions and 1,784 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1"
}
]
}
Expand Down Expand Up @@ -122,17 +122,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2"
}
]
}
Expand Down Expand Up @@ -219,17 +219,17 @@
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3"
}
]
}
Expand Down Expand Up @@ -316,17 +316,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet1"
}
]
}
Expand Down Expand Up @@ -378,17 +378,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet2"
}
]
}
Expand Down Expand Up @@ -440,17 +440,17 @@
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet3"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet3"
}
]
}
Expand Down
48 changes: 24 additions & 24 deletions packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet1"
}
]
}
Expand Down Expand Up @@ -122,17 +122,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet2"
}
]
}
Expand Down Expand Up @@ -187,17 +187,17 @@
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet3"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PublicSubnet3"
}
]
}
Expand Down Expand Up @@ -252,17 +252,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet1"
}
]
}
Expand Down Expand Up @@ -314,17 +314,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet2"
}
]
}
Expand Down Expand Up @@ -376,17 +376,17 @@
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet3"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "mesh-stack/vpc/PrivateSubnet3"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1"
}
]
}
Expand Down Expand Up @@ -122,17 +122,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2"
}
]
}
Expand Down Expand Up @@ -219,17 +219,17 @@
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1"
}
]
}
Expand Down Expand Up @@ -281,17 +281,17 @@
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2"
}
]
}
Expand Down
Loading

0 comments on commit 0105efd

Please sign in to comment.