1784 lines
40 KiB
JSON
1784 lines
40 KiB
JSON
{
|
|
"Description": "Production-like AWS environment with Cherokee naming convention",
|
|
"Resources": {
|
|
"CherokeeVPCC932D34C": {
|
|
"Type": "AWS::EC2::VPC",
|
|
"Properties": {
|
|
"CidrBlock": "10.0.0.0/16",
|
|
"EnableDnsHostnames": true,
|
|
"EnableDnsSupport": true,
|
|
"InstanceTenancy": "default",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "Cherokee-Production-VPC"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Resource"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1SubnetF7178127": {
|
|
"Type": "AWS::EC2::Subnet",
|
|
"Properties": {
|
|
"AvailabilityZone": {
|
|
"Fn::Select": [
|
|
0,
|
|
{
|
|
"Fn::GetAZs": ""
|
|
}
|
|
]
|
|
},
|
|
"CidrBlock": "10.0.0.0/24",
|
|
"MapPublicIpOnLaunch": true,
|
|
"Tags": [
|
|
{
|
|
"Key": "aws-cdk:subnet-name",
|
|
"Value": "Sequoyah-Public-Subnet"
|
|
},
|
|
{
|
|
"Key": "aws-cdk:subnet-type",
|
|
"Value": "Public"
|
|
},
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1/Subnet"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1RouteTable97402A11": {
|
|
"Type": "AWS::EC2::RouteTable",
|
|
"Properties": {
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1/RouteTable"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1RouteTableAssociation256A0DB7": {
|
|
"Type": "AWS::EC2::SubnetRouteTableAssociation",
|
|
"Properties": {
|
|
"RouteTableId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet1RouteTable97402A11"
|
|
},
|
|
"SubnetId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet1SubnetF7178127"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1/RouteTableAssociation"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1DefaultRouteC060B7D2": {
|
|
"Type": "AWS::EC2::Route",
|
|
"Properties": {
|
|
"DestinationCidrBlock": "0.0.0.0/0",
|
|
"GatewayId": {
|
|
"Ref": "CherokeeVPCIGWEF3C9951"
|
|
},
|
|
"RouteTableId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet1RouteTable97402A11"
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CherokeeVPCVPCGW1918C4F8"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet1/DefaultRoute"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2SubnetAA3834CB": {
|
|
"Type": "AWS::EC2::Subnet",
|
|
"Properties": {
|
|
"AvailabilityZone": {
|
|
"Fn::Select": [
|
|
1,
|
|
{
|
|
"Fn::GetAZs": ""
|
|
}
|
|
]
|
|
},
|
|
"CidrBlock": "10.0.1.0/24",
|
|
"MapPublicIpOnLaunch": true,
|
|
"Tags": [
|
|
{
|
|
"Key": "aws-cdk:subnet-name",
|
|
"Value": "Sequoyah-Public-Subnet"
|
|
},
|
|
{
|
|
"Key": "aws-cdk:subnet-type",
|
|
"Value": "Public"
|
|
},
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2/Subnet"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2RouteTable028B379C": {
|
|
"Type": "AWS::EC2::RouteTable",
|
|
"Properties": {
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2/RouteTable"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2RouteTableAssociationFF67AF4B": {
|
|
"Type": "AWS::EC2::SubnetRouteTableAssociation",
|
|
"Properties": {
|
|
"RouteTableId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet2RouteTable028B379C"
|
|
},
|
|
"SubnetId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet2SubnetAA3834CB"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2/RouteTableAssociation"
|
|
}
|
|
},
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2DefaultRoute1D5A23BC": {
|
|
"Type": "AWS::EC2::Route",
|
|
"Properties": {
|
|
"DestinationCidrBlock": "0.0.0.0/0",
|
|
"GatewayId": {
|
|
"Ref": "CherokeeVPCIGWEF3C9951"
|
|
},
|
|
"RouteTableId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet2RouteTable028B379C"
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CherokeeVPCVPCGW1918C4F8"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/Sequoyah-Public-SubnetSubnet2/DefaultRoute"
|
|
}
|
|
},
|
|
"CherokeeVPCIGWEF3C9951": {
|
|
"Type": "AWS::EC2::InternetGateway",
|
|
"Properties": {
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "Cherokee-Production-VPC"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/IGW"
|
|
}
|
|
},
|
|
"CherokeeVPCVPCGW1918C4F8": {
|
|
"Type": "AWS::EC2::VPCGatewayAttachment",
|
|
"Properties": {
|
|
"InternetGatewayId": {
|
|
"Ref": "CherokeeVPCIGWEF3C9951"
|
|
},
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/VPCGW"
|
|
}
|
|
},
|
|
"CherokeeVPCRestrictDefaultSecurityGroupCustomResourceA6635C63": {
|
|
"Type": "Custom::VpcRestrictDefaultSG",
|
|
"Properties": {
|
|
"ServiceToken": {
|
|
"Fn::GetAtt": [
|
|
"CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E",
|
|
"Arn"
|
|
]
|
|
},
|
|
"DefaultSecurityGroupId": {
|
|
"Fn::GetAtt": [
|
|
"CherokeeVPCC932D34C",
|
|
"DefaultSecurityGroup"
|
|
]
|
|
},
|
|
"Account": {
|
|
"Ref": "AWS::AccountId"
|
|
}
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeVPC/RestrictDefaultSecurityGroupCustomResource/Default"
|
|
}
|
|
},
|
|
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": {
|
|
"Type": "AWS::IAM::Role",
|
|
"Properties": {
|
|
"AssumeRolePolicyDocument": {
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Action": "sts:AssumeRole",
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": "lambda.amazonaws.com"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
}
|
|
],
|
|
"Policies": [
|
|
{
|
|
"PolicyName": "Inline",
|
|
"PolicyDocument": {
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ec2:AuthorizeSecurityGroupIngress",
|
|
"ec2:AuthorizeSecurityGroupEgress",
|
|
"ec2:RevokeSecurityGroupIngress",
|
|
"ec2:RevokeSecurityGroupEgress"
|
|
],
|
|
"Resource": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:aws:ec2:us-east-2:",
|
|
{
|
|
"Ref": "AWS::AccountId"
|
|
},
|
|
":security-group/",
|
|
{
|
|
"Fn::GetAtt": [
|
|
"CherokeeVPCC932D34C",
|
|
"DefaultSecurityGroup"
|
|
]
|
|
}
|
|
]
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role"
|
|
}
|
|
},
|
|
"CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": {
|
|
"Type": "AWS::Lambda::Function",
|
|
"Properties": {
|
|
"Code": {
|
|
"S3Bucket": {
|
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2"
|
|
},
|
|
"S3Key": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip"
|
|
},
|
|
"Timeout": 900,
|
|
"MemorySize": 128,
|
|
"Handler": "__entrypoint__.handler",
|
|
"Role": {
|
|
"Fn::GetAtt": [
|
|
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0",
|
|
"Arn"
|
|
]
|
|
},
|
|
"Runtime": "nodejs22.x",
|
|
"Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group"
|
|
},
|
|
"DependsOn": [
|
|
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler",
|
|
"aws:asset:path": "asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200",
|
|
"aws:asset:property": "Code"
|
|
}
|
|
},
|
|
"ApacheSecurityGroup0F9B9B26": {
|
|
"Type": "AWS::EC2::SecurityGroup",
|
|
"Properties": {
|
|
"GroupDescription": "Apache Security Group for web servers - allows SSH and HTTP",
|
|
"GroupName": "Apache-Web-SecurityGroup",
|
|
"SecurityGroupEgress": [
|
|
{
|
|
"CidrIp": "0.0.0.0/0",
|
|
"Description": "Allow all outbound traffic by default",
|
|
"IpProtocol": "-1"
|
|
}
|
|
],
|
|
"SecurityGroupIngress": [
|
|
{
|
|
"CidrIp": "0.0.0.0/0",
|
|
"Description": "SSH access from anywhere",
|
|
"FromPort": 22,
|
|
"IpProtocol": "tcp",
|
|
"ToPort": 22
|
|
},
|
|
{
|
|
"CidrIp": "0.0.0.0/0",
|
|
"Description": "HTTP access from anywhere",
|
|
"FromPort": 80,
|
|
"IpProtocol": "tcp",
|
|
"ToPort": 80
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VpcId": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/ApacheSecurityGroup/Resource"
|
|
}
|
|
},
|
|
"SittingBullInstanceInstanceRole4E8753C4": {
|
|
"Type": "AWS::IAM::Role",
|
|
"Properties": {
|
|
"AssumeRolePolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": "sts:AssumeRole",
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": "ec2.amazonaws.com"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "SittingBull-WebServer"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/SittingBullInstance/InstanceRole/Resource"
|
|
}
|
|
},
|
|
"SittingBullInstanceInstanceProfile1A198C8F": {
|
|
"Type": "AWS::IAM::InstanceProfile",
|
|
"Properties": {
|
|
"Roles": [
|
|
{
|
|
"Ref": "SittingBullInstanceInstanceRole4E8753C4"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/SittingBullInstance/InstanceProfile"
|
|
}
|
|
},
|
|
"SittingBullInstance513DF5B2": {
|
|
"Type": "AWS::EC2::Instance",
|
|
"Properties": {
|
|
"AvailabilityZone": {
|
|
"Fn::Select": [
|
|
0,
|
|
{
|
|
"Fn::GetAZs": ""
|
|
}
|
|
]
|
|
},
|
|
"IamInstanceProfile": {
|
|
"Ref": "SittingBullInstanceInstanceProfile1A198C8F"
|
|
},
|
|
"ImageId": {
|
|
"Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter"
|
|
},
|
|
"InstanceType": "t2.micro",
|
|
"KeyName": "my-cdk-keypair",
|
|
"NetworkInterfaces": [
|
|
{
|
|
"AssociatePublicIpAddress": true,
|
|
"DeviceIndex": "0",
|
|
"GroupSet": [
|
|
{
|
|
"Fn::GetAtt": [
|
|
"ApacheSecurityGroup0F9B9B26",
|
|
"GroupId"
|
|
]
|
|
}
|
|
],
|
|
"SubnetId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet1SubnetF7178127"
|
|
}
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "SittingBull-WebServer"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserData": {
|
|
"Fn::Base64": "#!/bin/bash\n#!/bin/bash\nyum update -y\namazon-linux-extras install nginx1 -y\nsystemctl start nginx\nsystemctl enable nginx\necho '<h1>Wakan Tanka Server</h1>' > /var/www/html/index.html\necho '<p>Server: '$(hostname)'</p>' >> /var/www/html/index.html\necho '<p>Great Spirit blesses this server</p>' >> /var/www/html/index.html\nsystemctl restart nginx"
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1DefaultRouteC060B7D2",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1RouteTableAssociation256A0DB7",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2DefaultRoute1D5A23BC",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2RouteTableAssociationFF67AF4B",
|
|
"SittingBullInstanceInstanceRole4E8753C4"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/SittingBullInstance/Resource"
|
|
}
|
|
},
|
|
"CrazyHorseInstanceInstanceRole4B55059C": {
|
|
"Type": "AWS::IAM::Role",
|
|
"Properties": {
|
|
"AssumeRolePolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": "sts:AssumeRole",
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": "ec2.amazonaws.com"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "CrazyHorse-WebServer"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CrazyHorseInstance/InstanceRole/Resource"
|
|
}
|
|
},
|
|
"CrazyHorseInstanceInstanceProfile02082E2B": {
|
|
"Type": "AWS::IAM::InstanceProfile",
|
|
"Properties": {
|
|
"Roles": [
|
|
{
|
|
"Ref": "CrazyHorseInstanceInstanceRole4B55059C"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CrazyHorseInstance/InstanceProfile"
|
|
}
|
|
},
|
|
"CrazyHorseInstance33E3E0F2": {
|
|
"Type": "AWS::EC2::Instance",
|
|
"Properties": {
|
|
"AvailabilityZone": {
|
|
"Fn::Select": [
|
|
0,
|
|
{
|
|
"Fn::GetAZs": ""
|
|
}
|
|
]
|
|
},
|
|
"IamInstanceProfile": {
|
|
"Ref": "CrazyHorseInstanceInstanceProfile02082E2B"
|
|
},
|
|
"ImageId": {
|
|
"Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter"
|
|
},
|
|
"InstanceType": "t2.micro",
|
|
"KeyName": "my-cdk-keypair",
|
|
"NetworkInterfaces": [
|
|
{
|
|
"AssociatePublicIpAddress": true,
|
|
"DeviceIndex": "0",
|
|
"GroupSet": [
|
|
{
|
|
"Fn::GetAtt": [
|
|
"ApacheSecurityGroup0F9B9B26",
|
|
"GroupId"
|
|
]
|
|
}
|
|
],
|
|
"SubnetId": {
|
|
"Ref": "CherokeeVPCSequoyahPublicSubnetSubnet1SubnetF7178127"
|
|
}
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Name",
|
|
"Value": "CrazyHorse-WebServer"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserData": {
|
|
"Fn::Base64": "#!/bin/bash\n#!/bin/bash\nyum update -y\namazon-linux-extras install nginx1 -y\nsystemctl start nginx\nsystemctl enable nginx\necho '<h1>Crazy Horse Server</h1>' > /var/www/html/index.html\necho '<p>Server: '$(hostname)'</p>' >> /var/www/html/index.html\necho '<p>Thunder Being protects this server</p>' >> /var/www/html/index.html\nsystemctl restart nginx"
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1DefaultRouteC060B7D2",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet1RouteTableAssociation256A0DB7",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2DefaultRoute1D5A23BC",
|
|
"CherokeeVPCSequoyahPublicSubnetSubnet2RouteTableAssociationFF67AF4B",
|
|
"CrazyHorseInstanceInstanceRole4B55059C"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CrazyHorseInstance/Resource"
|
|
}
|
|
},
|
|
"CherokeeStorageBucket59591729": {
|
|
"Type": "AWS::S3::Bucket",
|
|
"Properties": {
|
|
"BucketEncryption": {
|
|
"ServerSideEncryptionConfiguration": [
|
|
{
|
|
"ServerSideEncryptionByDefault": {
|
|
"SSEAlgorithm": "AES256"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"BucketName": "cherokee-storage-bucket-aws-20250627",
|
|
"PublicAccessBlockConfiguration": {
|
|
"BlockPublicAcls": true,
|
|
"BlockPublicPolicy": true,
|
|
"IgnorePublicAcls": true,
|
|
"RestrictPublicBuckets": true
|
|
},
|
|
"Tags": [
|
|
{
|
|
"Key": "aws-cdk:auto-delete-objects",
|
|
"Value": "true"
|
|
},
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"VersioningConfiguration": {
|
|
"Status": "Enabled"
|
|
}
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeStorageBucket/Resource"
|
|
}
|
|
},
|
|
"CherokeeStorageBucketPolicy020BCB19": {
|
|
"Type": "AWS::S3::BucketPolicy",
|
|
"Properties": {
|
|
"Bucket": {
|
|
"Ref": "CherokeeStorageBucket59591729"
|
|
},
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"s3:DeleteObject*",
|
|
"s3:GetBucket*",
|
|
"s3:List*",
|
|
"s3:PutBucketPolicy"
|
|
],
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"AWS": {
|
|
"Fn::GetAtt": [
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
|
|
"Arn"
|
|
]
|
|
}
|
|
},
|
|
"Resource": [
|
|
{
|
|
"Fn::GetAtt": [
|
|
"CherokeeStorageBucket59591729",
|
|
"Arn"
|
|
]
|
|
},
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
{
|
|
"Fn::GetAtt": [
|
|
"CherokeeStorageBucket59591729",
|
|
"Arn"
|
|
]
|
|
},
|
|
"/*"
|
|
]
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeStorageBucket/Policy/Resource"
|
|
}
|
|
},
|
|
"CherokeeStorageBucketAutoDeleteObjectsCustomResource8D2E861E": {
|
|
"Type": "Custom::S3AutoDeleteObjects",
|
|
"Properties": {
|
|
"ServiceToken": {
|
|
"Fn::GetAtt": [
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
|
|
"Arn"
|
|
]
|
|
},
|
|
"BucketName": {
|
|
"Ref": "CherokeeStorageBucket59591729"
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CherokeeStorageBucketPolicy020BCB19"
|
|
],
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CherokeeStorageBucket/AutoDeleteObjectsCustomResource/Default"
|
|
}
|
|
},
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": {
|
|
"Type": "AWS::IAM::Role",
|
|
"Properties": {
|
|
"AssumeRolePolicyDocument": {
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Action": "sts:AssumeRole",
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": "lambda.amazonaws.com"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role"
|
|
}
|
|
},
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": {
|
|
"Type": "AWS::Lambda::Function",
|
|
"Properties": {
|
|
"Code": {
|
|
"S3Bucket": {
|
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2"
|
|
},
|
|
"S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip"
|
|
},
|
|
"Timeout": 900,
|
|
"MemorySize": 128,
|
|
"Handler": "index.handler",
|
|
"Role": {
|
|
"Fn::GetAtt": [
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
|
|
"Arn"
|
|
]
|
|
},
|
|
"Runtime": "nodejs22.x",
|
|
"Description": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"Lambda function for auto-deleting objects in ",
|
|
{
|
|
"Ref": "CherokeeStorageBucket59591729"
|
|
},
|
|
" S3 bucket."
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
|
|
],
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler",
|
|
"aws:asset:path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6",
|
|
"aws:asset:property": "Code"
|
|
}
|
|
},
|
|
"KokopelliReadOnlyGroup4B191331": {
|
|
"Type": "AWS::IAM::Group",
|
|
"Properties": {
|
|
"GroupName": "Kokopelli-ReadOnlyAccess-Group",
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/ReadOnlyAccess"
|
|
]
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/KokopelliReadOnlyGroup/Resource"
|
|
}
|
|
},
|
|
"QuetzalcoatlSecret1ACBBB62": {
|
|
"Type": "AWS::SecretsManager::Secret",
|
|
"Properties": {
|
|
"Description": "Password for IAM user Quetzalcoatl-Production-User",
|
|
"GenerateSecretString": {
|
|
"ExcludeCharacters": " \"\\'@/\\",
|
|
"GenerateStringKey": "password",
|
|
"IncludeSpace": false,
|
|
"PasswordLength": 16,
|
|
"RequireEachIncludedType": true,
|
|
"SecretStringTemplate": "{\"username\":\"Quetzalcoatl-Production-User\"}"
|
|
},
|
|
"Name": "iam-user-password/quetzalcoatl-production-user",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/QuetzalcoatlSecret/Resource"
|
|
}
|
|
},
|
|
"QuetzalcoatlUser1344F81A": {
|
|
"Type": "AWS::IAM::User",
|
|
"Properties": {
|
|
"Groups": [
|
|
{
|
|
"Ref": "KokopelliReadOnlyGroup4B191331"
|
|
}
|
|
],
|
|
"LoginProfile": {
|
|
"Password": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"{{resolve:secretsmanager:",
|
|
{
|
|
"Ref": "QuetzalcoatlSecret1ACBBB62"
|
|
},
|
|
":SecretString:password::}}"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/IAMUserChangePassword"
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserName": "Quetzalcoatl-Production-User"
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/QuetzalcoatlUser/Resource"
|
|
}
|
|
},
|
|
"QuetzalcoatlUserDefaultPolicy8CAD25E5": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"secretsmanager:DescribeSecret",
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": {
|
|
"Ref": "QuetzalcoatlSecret1ACBBB62"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"PolicyName": "QuetzalcoatlUserDefaultPolicy8CAD25E5",
|
|
"Users": [
|
|
{
|
|
"Ref": "QuetzalcoatlUser1344F81A"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/QuetzalcoatlUser/DefaultPolicy/Resource"
|
|
}
|
|
},
|
|
"WendigoSecret32B7B40E": {
|
|
"Type": "AWS::SecretsManager::Secret",
|
|
"Properties": {
|
|
"Description": "Password for IAM user Wendigo-Production-User",
|
|
"GenerateSecretString": {
|
|
"ExcludeCharacters": " \"\\'@/\\",
|
|
"GenerateStringKey": "password",
|
|
"IncludeSpace": false,
|
|
"PasswordLength": 16,
|
|
"RequireEachIncludedType": true,
|
|
"SecretStringTemplate": "{\"username\":\"Wendigo-Production-User\"}"
|
|
},
|
|
"Name": "iam-user-password/wendigo-production-user",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/WendigoSecret/Resource"
|
|
}
|
|
},
|
|
"WendigoUser39B04AD3": {
|
|
"Type": "AWS::IAM::User",
|
|
"Properties": {
|
|
"Groups": [
|
|
{
|
|
"Ref": "KokopelliReadOnlyGroup4B191331"
|
|
}
|
|
],
|
|
"LoginProfile": {
|
|
"Password": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"{{resolve:secretsmanager:",
|
|
{
|
|
"Ref": "WendigoSecret32B7B40E"
|
|
},
|
|
":SecretString:password::}}"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/IAMUserChangePassword"
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserName": "Wendigo-Production-User"
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/WendigoUser/Resource"
|
|
}
|
|
},
|
|
"WendigoUserDefaultPolicy758A67B8": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"secretsmanager:DescribeSecret",
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": {
|
|
"Ref": "WendigoSecret32B7B40E"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"PolicyName": "WendigoUserDefaultPolicy758A67B8",
|
|
"Users": [
|
|
{
|
|
"Ref": "WendigoUser39B04AD3"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/WendigoUser/DefaultPolicy/Resource"
|
|
}
|
|
},
|
|
"ThunderbirdSecret27014A30": {
|
|
"Type": "AWS::SecretsManager::Secret",
|
|
"Properties": {
|
|
"Description": "Password for IAM user Thunderbird-Production-User",
|
|
"GenerateSecretString": {
|
|
"ExcludeCharacters": " \"\\'@/\\",
|
|
"GenerateStringKey": "password",
|
|
"IncludeSpace": false,
|
|
"PasswordLength": 16,
|
|
"RequireEachIncludedType": true,
|
|
"SecretStringTemplate": "{\"username\":\"Thunderbird-Production-User\"}"
|
|
},
|
|
"Name": "iam-user-password/thunderbird-production-user",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/ThunderbirdSecret/Resource"
|
|
}
|
|
},
|
|
"ThunderbirdUser61136CC3": {
|
|
"Type": "AWS::IAM::User",
|
|
"Properties": {
|
|
"Groups": [
|
|
{
|
|
"Ref": "KokopelliReadOnlyGroup4B191331"
|
|
}
|
|
],
|
|
"LoginProfile": {
|
|
"Password": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"{{resolve:secretsmanager:",
|
|
{
|
|
"Ref": "ThunderbirdSecret27014A30"
|
|
},
|
|
":SecretString:password::}}"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/IAMUserChangePassword"
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserName": "Thunderbird-Production-User"
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/ThunderbirdUser/Resource"
|
|
}
|
|
},
|
|
"ThunderbirdUserDefaultPolicy54D44ECB": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"secretsmanager:DescribeSecret",
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": {
|
|
"Ref": "ThunderbirdSecret27014A30"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"PolicyName": "ThunderbirdUserDefaultPolicy54D44ECB",
|
|
"Users": [
|
|
{
|
|
"Ref": "ThunderbirdUser61136CC3"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/ThunderbirdUser/DefaultPolicy/Resource"
|
|
}
|
|
},
|
|
"CoyoteSecret6995EE4B": {
|
|
"Type": "AWS::SecretsManager::Secret",
|
|
"Properties": {
|
|
"Description": "Password for IAM user Coyote-Production-User",
|
|
"GenerateSecretString": {
|
|
"ExcludeCharacters": " \"\\'@/\\",
|
|
"GenerateStringKey": "password",
|
|
"IncludeSpace": false,
|
|
"PasswordLength": 16,
|
|
"RequireEachIncludedType": true,
|
|
"SecretStringTemplate": "{\"username\":\"Coyote-Production-User\"}"
|
|
},
|
|
"Name": "iam-user-password/coyote-production-user",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CoyoteSecret/Resource"
|
|
}
|
|
},
|
|
"CoyoteUser15A74194": {
|
|
"Type": "AWS::IAM::User",
|
|
"Properties": {
|
|
"Groups": [
|
|
{
|
|
"Ref": "KokopelliReadOnlyGroup4B191331"
|
|
}
|
|
],
|
|
"LoginProfile": {
|
|
"Password": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"{{resolve:secretsmanager:",
|
|
{
|
|
"Ref": "CoyoteSecret6995EE4B"
|
|
},
|
|
":SecretString:password::}}"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/IAMUserChangePassword"
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserName": "Coyote-Production-User"
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CoyoteUser/Resource"
|
|
}
|
|
},
|
|
"CoyoteUserDefaultPolicy8701DEF0": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"secretsmanager:DescribeSecret",
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": {
|
|
"Ref": "CoyoteSecret6995EE4B"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"PolicyName": "CoyoteUserDefaultPolicy8701DEF0",
|
|
"Users": [
|
|
{
|
|
"Ref": "CoyoteUser15A74194"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CoyoteUser/DefaultPolicy/Resource"
|
|
}
|
|
},
|
|
"RavenSecret86DA1D54": {
|
|
"Type": "AWS::SecretsManager::Secret",
|
|
"Properties": {
|
|
"Description": "Password for IAM user Raven-Production-User",
|
|
"GenerateSecretString": {
|
|
"ExcludeCharacters": " \"\\'@/\\",
|
|
"GenerateStringKey": "password",
|
|
"IncludeSpace": false,
|
|
"PasswordLength": 16,
|
|
"RequireEachIncludedType": true,
|
|
"SecretStringTemplate": "{\"username\":\"Raven-Production-User\"}"
|
|
},
|
|
"Name": "iam-user-password/raven-production-user",
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
]
|
|
},
|
|
"UpdateReplacePolicy": "Delete",
|
|
"DeletionPolicy": "Delete",
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/RavenSecret/Resource"
|
|
}
|
|
},
|
|
"RavenUserB2391A0C": {
|
|
"Type": "AWS::IAM::User",
|
|
"Properties": {
|
|
"Groups": [
|
|
{
|
|
"Ref": "KokopelliReadOnlyGroup4B191331"
|
|
}
|
|
],
|
|
"LoginProfile": {
|
|
"Password": {
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"{{resolve:secretsmanager:",
|
|
{
|
|
"Ref": "RavenSecret86DA1D54"
|
|
},
|
|
":SecretString:password::}}"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"ManagedPolicyArns": [
|
|
{
|
|
"Fn::Join": [
|
|
"",
|
|
[
|
|
"arn:",
|
|
{
|
|
"Ref": "AWS::Partition"
|
|
},
|
|
":iam::aws:policy/IAMUserChangePassword"
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"Tags": [
|
|
{
|
|
"Key": "CostCenter",
|
|
"Value": "Engineering"
|
|
},
|
|
{
|
|
"Key": "Environment",
|
|
"Value": "Production"
|
|
},
|
|
{
|
|
"Key": "Owner",
|
|
"Value": "DevOps-Team"
|
|
},
|
|
{
|
|
"Key": "Project",
|
|
"Value": "CDK-Demo"
|
|
}
|
|
],
|
|
"UserName": "Raven-Production-User"
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/RavenUser/Resource"
|
|
}
|
|
},
|
|
"RavenUserDefaultPolicy23F0D289": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyDocument": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"secretsmanager:DescribeSecret",
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": {
|
|
"Ref": "RavenSecret86DA1D54"
|
|
}
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"PolicyName": "RavenUserDefaultPolicy23F0D289",
|
|
"Users": [
|
|
{
|
|
"Ref": "RavenUserB2391A0C"
|
|
}
|
|
]
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/RavenUser/DefaultPolicy/Resource"
|
|
}
|
|
},
|
|
"CDKMetadata": {
|
|
"Type": "AWS::CDK::Metadata",
|
|
"Properties": {
|
|
"Analytics": "v2:deflate64:H4sIAAAAAAAA/3VPy27CQAz8Fu7LloYvAA6IU6Ok5Vo5i4EtiRfZ3iIU5d+rZANpDz3Nw5Y9k9lskdnFDG4yd4fLvPaVbUsFdzFwk88WXWbb/dWZzZH2+cbksaq9K2NFqL03sSJExXeoapz8yVuJBOdBfaDnck92pMiEugXFG9zHN6NaqYI7N0hqSnSRvd63HOJ1ePDH2JEokBtPJt4ZD41ti5ASPfAxzjkcfY3meTGRD0Hu1YB5qL0bQiXWGVnadh3dJXUeWYJp+bfujKBjVGmA4IRs23LQYwdG7TpToITIffwoGppJHumfUc7h2x+Q1yBoViKopcLJ02kICwwNairyFvUatTP5Xc+BXpb2NbPL2Zd4P+dI6hu0RcIflWas0gwCAAA="
|
|
},
|
|
"Metadata": {
|
|
"aws:cdk:path": "ManitouProductionStack/CDKMetadata/Default"
|
|
}
|
|
}
|
|
},
|
|
"Parameters": {
|
|
"SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": {
|
|
"Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
|
|
"Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2"
|
|
},
|
|
"BootstrapVersion": {
|
|
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
}
|
|
},
|
|
"Outputs": {
|
|
"SittingBullPublicIP": {
|
|
"Description": "Public IP address of Sitting Bull web server",
|
|
"Value": {
|
|
"Fn::GetAtt": [
|
|
"SittingBullInstance513DF5B2",
|
|
"PublicIp"
|
|
]
|
|
}
|
|
},
|
|
"CrazyHorsePublicIP": {
|
|
"Description": "Public IP address of Crazy Horse web server",
|
|
"Value": {
|
|
"Fn::GetAtt": [
|
|
"CrazyHorseInstance33E3E0F2",
|
|
"PublicIp"
|
|
]
|
|
}
|
|
},
|
|
"CherokeeS3BucketName": {
|
|
"Description": "Name of the Cherokee storage S3 bucket",
|
|
"Value": {
|
|
"Ref": "CherokeeStorageBucket59591729"
|
|
}
|
|
},
|
|
"IAMUser1Name": {
|
|
"Description": "IAM username for Quetzalcoatl production user",
|
|
"Value": {
|
|
"Ref": "QuetzalcoatlUser1344F81A"
|
|
}
|
|
},
|
|
"IAMUser2Name": {
|
|
"Description": "IAM username for Wendigo production user",
|
|
"Value": {
|
|
"Ref": "WendigoUser39B04AD3"
|
|
}
|
|
},
|
|
"IAMUser3Name": {
|
|
"Description": "IAM username for Thunderbird production user",
|
|
"Value": {
|
|
"Ref": "ThunderbirdUser61136CC3"
|
|
}
|
|
},
|
|
"IAMUser4Name": {
|
|
"Description": "IAM username for Coyote production user",
|
|
"Value": {
|
|
"Ref": "CoyoteUser15A74194"
|
|
}
|
|
},
|
|
"IAMUser5Name": {
|
|
"Description": "IAM username for Raven production user",
|
|
"Value": {
|
|
"Ref": "RavenUserB2391A0C"
|
|
}
|
|
},
|
|
"User1SecretArn": {
|
|
"Description": "Secrets Manager ARN for Quetzalcoatl user password",
|
|
"Value": {
|
|
"Ref": "QuetzalcoatlSecret1ACBBB62"
|
|
}
|
|
},
|
|
"User2SecretArn": {
|
|
"Description": "Secrets Manager ARN for Wendigo user password",
|
|
"Value": {
|
|
"Ref": "WendigoSecret32B7B40E"
|
|
}
|
|
},
|
|
"User3SecretArn": {
|
|
"Description": "Secrets Manager ARN for Thunderbird user password",
|
|
"Value": {
|
|
"Ref": "ThunderbirdSecret27014A30"
|
|
}
|
|
},
|
|
"User4SecretArn": {
|
|
"Description": "Secrets Manager ARN for Coyote user password",
|
|
"Value": {
|
|
"Ref": "CoyoteSecret6995EE4B"
|
|
}
|
|
},
|
|
"User5SecretArn": {
|
|
"Description": "Secrets Manager ARN for Raven user password",
|
|
"Value": {
|
|
"Ref": "RavenSecret86DA1D54"
|
|
}
|
|
},
|
|
"PasswordRetrievalInstructions": {
|
|
"Description": "Command template for retrieving IAM user passwords from Secrets Manager",
|
|
"Value": "Use AWS CLI: aws secretsmanager get-secret-value --secret-id <secret-arn> --query SecretString --output text"
|
|
},
|
|
"SecretsManagerConsoleURL": {
|
|
"Description": "AWS Secrets Manager Console URL to view and manage user passwords",
|
|
"Value": "https://console.aws.amazon.com/secretsmanager/"
|
|
},
|
|
"SittingBullWebURL": {
|
|
"Description": "Web URL for Sitting Bull server",
|
|
"Value": {
|
|
"Fn::Sub": [
|
|
"http://${PublicIP}",
|
|
{
|
|
"PublicIP": {
|
|
"Fn::GetAtt": [
|
|
"SittingBullInstance513DF5B2",
|
|
"PublicIp"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"CrazyHorseWebURL": {
|
|
"Description": "Web URL for Crazy Horse server",
|
|
"Value": {
|
|
"Fn::Sub": [
|
|
"http://${PublicIP}",
|
|
{
|
|
"PublicIP": {
|
|
"Fn::GetAtt": [
|
|
"CrazyHorseInstance33E3E0F2",
|
|
"PublicIp"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"CherokeeVPCId": {
|
|
"Description": "Cherokee VPC ID",
|
|
"Value": {
|
|
"Ref": "CherokeeVPCC932D34C"
|
|
}
|
|
},
|
|
"ApacheSecurityGroupId": {
|
|
"Description": "Apache Security Group ID",
|
|
"Value": {
|
|
"Fn::GetAtt": [
|
|
"ApacheSecurityGroup0F9B9B26",
|
|
"GroupId"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Rules": {
|
|
"CheckBootstrapVersion": {
|
|
"Assertions": [
|
|
{
|
|
"Assert": {
|
|
"Fn::Not": [
|
|
{
|
|
"Fn::Contains": [
|
|
[
|
|
"1",
|
|
"2",
|
|
"3",
|
|
"4",
|
|
"5"
|
|
],
|
|
{
|
|
"Ref": "BootstrapVersion"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |