CloudFormationを書いていこう

{
	"AWSTemplateFormatVersion" : "2010-09-09",

	"Description" : "Test template.",

	"Resources" : {

		"VPC" : {
			"Type" : "AWS::EC2::VPC",
			"Properties" : {
				"CidrBlock" : "10.0.0.0/16",
				"Tags" : [{"Key": "Application", "Value" : {"Ref" : "AWS::StackId"} }]
			}
		},

		"PublicSubnet" : {
			"Type" : "AWS::EC2::Subnet",
			"Properties" : {
				"VpcId" : {"Ref" : "VPC" },
				"CidrBlock" : "10.0.0.0/24",
				"Tags" : [{"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"}}]
			}
		},

		"PrivateSubnet" : {
			"Type" : "AWS::EC2::Subnet",
			"Properties" : {
				"VpcId" : {"Ref" : "VPC"},
				"CidrBlock" : "10.0.1.0/24",
				"Tags" : [{"Key": "Application", "Value" : {"Ref": "AWS::StackId"}}]
			}
		},

		"InternetGateway" : {
			"Type" : "AWS::EC2::InternetGateway",
			"Properties" : {
				"Tags" : [ {"Key" : "Application", "Value" : {"Ref" : "AWS::StackId"}}]
			}
		},

		"AttachGateway" : {
			"Type" : "AWS::EC2::VPCGatewayAttachment",
			"Properties" : {
				"VpcId" : {"Ref": "VPC"},
				"InternetGatewayId" : {"Ref" : "InternetGateway"}
			}
		},

		"RouteTable" : {
			"Type" : "AWS::EC2::RouteTable",
			"Properties" : {
				"VpcId" : {"Ref" : "VPC"},
				"Tags" : [{"Key" : "Application", "Value" : {"Ref" : "AWS::StackId"}}]
			}
		},

		"Route" : {
			"Type" : "AWS::EC2::Route",
			"DependsOn" : "AttachGateway",
			"Properties" : {
				"RouteTableId" : {"Ref" : "RouteTable"},
				"DestinationCidrBlock": "0.0.0.0/0",
				"GatewayId" : {"Ref" : "InternetGateway"}
			}
		},

		"SubnetRouteTableAssociation" : {
			"Type" : "AWS::EC2::SubnetRouteTableAssociation",
			"Properties" : {
				"SubnetId" : {"Ref" : "PublicSubnet"},
				"RouteTableId" : {"Ref" : "RouteTable"}
			}
		},

		"NetworkAcl" : {
			"Type" : "AWS::EC2::NetworkAcl",
			"Properties" : {
				"VpcId" : {"Ref" : "VPC"},
				"Tags" : [ {"Key" : "Application", "Value": {"Ref" : "AWS::StackId"}}]
			}
		},

		"SubnetNetworkAclAssociation" : {
			"Type" : "AWS::EC2::SubnetNetworkAclAssociation",
			"Properties" : {
				"SubnetId" : {"Ref" : "PublicSubnet" },
				"NetworkAclId" : {"Ref" : "NetworkAcl"}
			}
		}
	}
}

なんじゃこりゃーーーーーーーーーーーー
エンジニアってどうやってモチベーション保ってんだろう。。
まったく、意味が分からんよ。