Skip to content

Commit

Permalink
feat(cdk): Tagging support via TagManager (aws#538)
Browse files Browse the repository at this point in the history
Fixes aws#91, Closes aws#458 (as obsolete)

The TagManager is a class Construct authors can use to implement tagging
consistently. The manager provides the ability to propagate tags from
parents to child, override parent tags in the child, set default tags on
the child that can be overwritten by parents, and block tags from
parents.

Adding tagging support for the Vpc and Subnet constructs.
  • Loading branch information
moofish32 committed Aug 23, 2018
1 parent 4bafcca commit fdfe875
Show file tree
Hide file tree
Showing 10 changed files with 1,006 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"EnableDnsHostnames": true,
"EnableDnsSupport": true,
"InstanceTenancy": "default",
"Tags": []
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC"
}
]
}
},
"VPCPublicSubnet1SubnetB4246D30": {
Expand All @@ -18,15 +23,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": true
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet1"
}
]
}
},
"VPCPublicSubnet1RouteTableFEE4B781": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet1"
}
]
}
},
"VPCPublicSubnet1RouteTableAssociatioin249B4093": {
Expand Down Expand Up @@ -57,7 +74,13 @@
},
"SubnetId": {
"Ref": "VPCPublicSubnet1SubnetB4246D30"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet1"
}
]
}
},
"VPCPublicSubnet1DefaultRoute91CEF279": {
Expand All @@ -80,15 +103,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": true
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet2"
}
]
}
},
"VPCPublicSubnet2RouteTable6F1A15F1": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet2"
}
]
}
},
"VPCPublicSubnet2RouteTableAssociatioin766225D7": {
Expand Down Expand Up @@ -119,7 +154,13 @@
},
"SubnetId": {
"Ref": "VPCPublicSubnet2Subnet74179F39"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet2"
}
]
}
},
"VPCPublicSubnet2DefaultRouteB7481BBA": {
Expand All @@ -142,15 +183,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": true
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet3"
}
]
}
},
"VPCPublicSubnet3RouteTable98AE0E14": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet3"
}
]
}
},
"VPCPublicSubnet3RouteTableAssociatioinF4E24B3B": {
Expand Down Expand Up @@ -181,7 +234,13 @@
},
"SubnetId": {
"Ref": "VPCPublicSubnet3Subnet631C5E25"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PublicSubnet3"
}
]
}
},
"VPCPublicSubnet3DefaultRouteA0D29D46": {
Expand All @@ -204,15 +263,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": false
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet1"
}
]
}
},
"VPCPrivateSubnet1RouteTableBE8A6027": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet1"
}
]
}
},
"VPCPrivateSubnet1RouteTableAssociatioin77F7CA18": {
Expand Down Expand Up @@ -246,15 +317,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": false
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet2"
}
]
}
},
"VPCPrivateSubnet2RouteTable0A19E10E": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet2"
}
]
}
},
"VPCPrivateSubnet2RouteTableAssociatioinC31995B4": {
Expand Down Expand Up @@ -288,15 +371,27 @@
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": "test-region-1c",
"MapPublicIpOnLaunch": false
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet3"
}
]
}
},
"VPCPrivateSubnet3RouteTable192186F8": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC/PrivateSubnet3"
}
]
}
},
"VPCPrivateSubnet3RouteTableAssociatioin3B0B6B38": {
Expand All @@ -323,7 +418,15 @@
}
},
"VPCIGWB7E252D3": {
"Type": "AWS::EC2::InternetGateway"
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-ec2-integ/VPC"
}
]
}
},
"VPCVPCGW99B986DC": {
"Type": "AWS::EC2::VPCGatewayAttachment",
Expand Down
Loading

0 comments on commit fdfe875

Please sign in to comment.