Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"vpc-dev": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
"Tags": [
{
"Key": "Name",
"Value": "mylib-dev"
}
]
}
},
"public-subnet-dev": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.0.0/24",
"AvailabilityZone": "eu-west-2a",
"VpcId": {
"Ref": "vpc-dev"
},
"Tags": [
{
"Key": "Name",
"Value": "mylib-dev-public"
}
]
}
},
"igw": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
}
},
"DCHP-opt": {
"Type": "AWS::EC2::DHCPOptions",
"Properties": {
"DomainName": "eu-west-2.compute.internal",
"DomainNameServers": [
"AmazonProvidedDNS"
]
}
},
"vpc-network-acl": {
"Type": "AWS::EC2::NetworkAcl",
"Properties": {
"VpcId": {
"Ref": "vpc-dev"
}
}
},
"rtb0174ea390bd34d65e": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpc-dev"
}
}
},
"rtb0e3091f7cc1502083": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpc-dev"
}
}
},
"dev-site-elastic-ip": {
"Type": "AWS::EC2::EIP",
"DependsOn": [
"gw1"
],
"Properties": {
"Domain": "vpc"
}
},
"dev-instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"DisableApiTermination": "false",
"InstanceInitiatedShutdownBehavior": "stop",
"IamInstanceProfile": "arn:aws:iam::543150015719:instance-profile/ec2-read-s3-role",
"ImageId": "ami-0560ead6d0ca01b2e",
"InstanceType": "t2.micro",
"KeyName": "NEW-ec2-devandprod",
"Monitoring": "false",
"Tags": [
{
"Key": "Name",
"Value": "mylib-dev"
}
],
"NetworkInterfaces": [
{
"DeleteOnTermination": "true",
"Description": "Primary network interface",
"DeviceIndex": 0,
"SubnetId": {
"Ref": "public-subnet-dev"
},
"PrivateIpAddresses": [
{
"PrivateIpAddress": "10.0.0.142",
"Primary": "true"
}
],
"GroupSet": [
{
"Ref": "dev-security-group"
}
]
}
]
}
},
"env-file-store": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "Private",
"VersioningConfiguration": {
"Status": "Suspended"
},
"Tags": [
{
"Key": "project",
"Value": "mylibrary"
}
]
}
},
"artifact-store": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "Private",
"LifecycleConfiguration": {
"Rules": [
{
"ExpirationInDays": "30",
"Id": "Delete build artifacts older than one month",
"Status": "Enabled"
},
{
"ExpirationInDays": "1",
"Id": "Delete source artifacts after one day",
"Status": "Enabled"
}
]
},
"VersioningConfiguration": {
"Status": "Suspended"
},
"Tags": [
{
"Key": "project",
"Value": "mylibrary"
}
]
}
},
"dev-security-group": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Security Group for mylib dev EC2",
"VpcId": {
"Ref": "vpc-dev"
}
}
},
"acl1": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Egress": "true",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "vpc-network-acl"
}
}
},
"acl2": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "vpc-network-acl"
}
}
},
"subnetacl1": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "vpc-network-acl"
},
"SubnetId": {
"Ref": "public-subnet-dev"
}
}
},
"gw1": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "vpc-dev"
},
"InternetGatewayId": {
"Ref": "igw"
}
}
},
"subnetroute2": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb0e3091f7cc1502083"
},
"SubnetId": {
"Ref": "public-subnet-dev"
}
}
},
"route1": {
"Type": "AWS::EC2::Route",
"Properties": {
"DestinationCidrBlock": "0.0.0.0/0",
"RouteTableId": {
"Ref": "rtb0e3091f7cc1502083"
},
"GatewayId": {
"Ref": "igw"
}
},
"DependsOn": "gw1"
},
"dchpassoc1": {
"Type": "AWS::EC2::VPCDHCPOptionsAssociation",
"Properties": {
"VpcId": {
"Ref": "vpc-dev"
},
"DhcpOptionsId": {
"Ref": "DCHP-opt"
}
}
},
"assoc1": {
"Type": "AWS::EC2::EIPAssociation",
"Properties": {
"AllocationId": {
"Fn::GetAtt": [
"dev-site-elastic-ip",
"AllocationId"
]
},
"InstanceId": {
"Ref": "dev-instance"
}
}
},
"ingress1": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "dev-security-group"
},
"IpProtocol": "tcp",
"FromPort": "22",
"ToPort": "22",
"CidrIp": "0.0.0.0/0"
}
},
"ingress2": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "dev-security-group"
},
"IpProtocol": "tcp",
"FromPort": "3000",
"ToPort": "3000",
"CidrIp": "0.0.0.0/0"
}
},
"egress1": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Ref": "dev-security-group"
},
"IpProtocol": "-1",
"CidrIp": "0.0.0.0/0"
}
}
},
"Description": "Dev stack for my-library application"
}