From d5bd714937b16fe85927332f93e2b49b6186aafd Mon Sep 17 00:00:00 2001 From: Imaya Kumar Jagannathan Date: Fri, 20 Aug 2021 10:32:53 -0400 Subject: [PATCH] Remove unnecessary cfn files --- .../resources/cw-agent-linux-instance-cfn.yml | 104 ------------------ .../cw-agent-windows-instance-cfn.yml | 104 ------------------ 2 files changed, 208 deletions(-) delete mode 100644 PetAdoptions/cdk/pet_stack/resources/cw-agent-linux-instance-cfn.yml delete mode 100644 PetAdoptions/cdk/pet_stack/resources/cw-agent-windows-instance-cfn.yml diff --git a/PetAdoptions/cdk/pet_stack/resources/cw-agent-linux-instance-cfn.yml b/PetAdoptions/cdk/pet_stack/resources/cw-agent-linux-instance-cfn.yml deleted file mode 100644 index 7ed056ed..00000000 --- a/PetAdoptions/cdk/pet_stack/resources/cw-agent-linux-instance-cfn.yml +++ /dev/null @@ -1,104 +0,0 @@ -AWSTemplateFormatVersion: 2010-09-09 -Description: >- - This template deploys a VPC, with a public subnet. It deploys an an EC2 - instance for CloudWatch agent installation -Parameters: - EnvironmentName: - Description: An environment name that is prefixed to resource names - Type: String - Default: observability-workshop - KeyPair: - Description: EC2 key pairs - Type: "AWS::EC2::KeyPair::KeyName" -Resources: - VPC: - Type: 'AWS::EC2::VPC' - Properties: - CidrBlock: 10.192.0.0/16 - EnableDnsSupport: true - EnableDnsHostnames: true - Tags: - - Key: Name - Value: !Ref EnvironmentName - InternetGateway: - Type: 'AWS::EC2::InternetGateway' - Properties: - Tags: - - Key: Name - Value: !Ref EnvironmentName - InternetGatewayAttachment: - Type: 'AWS::EC2::VPCGatewayAttachment' - Properties: - InternetGatewayId: !Ref InternetGateway - VpcId: !Ref VPC - PublicSubnet1: - Type: 'AWS::EC2::Subnet' - Properties: - VpcId: !Ref VPC - AvailabilityZone: !Select - - 0 - - !GetAZs '' - CidrBlock: 10.192.10.0/24 - MapPublicIpOnLaunch: true - Tags: - - Key: Name - Value: !Sub '${EnvironmentName} Public Subnet' - PublicRouteTable: - Type: 'AWS::EC2::RouteTable' - Properties: - VpcId: !Ref VPC - Tags: - - Key: Name - Value: !Sub '${EnvironmentName} Public Route' - DefaultPublicRoute: - Type: 'AWS::EC2::Route' - DependsOn: InternetGatewayAttachment - Properties: - RouteTableId: !Ref PublicRouteTable - DestinationCidrBlock: 0.0.0.0/0 - GatewayId: !Ref InternetGateway - PublicSubnet1RouteTableAssociation: - Type: 'AWS::EC2::SubnetRouteTableAssociation' - Properties: - RouteTableId: !Ref PublicRouteTable - SubnetId: !Ref PublicSubnet1 - InstanceSecurityGroup: - Type: 'AWS::EC2::SecurityGroup' - Properties: - GroupName: ingress-sg - GroupDescription: Security group with for the instance - VpcId: !Ref VPC - Tags: - - Key: Name - Value: !Sub '${EnvironmentName}' - SecurityGroupIngress: - - IpProtocol: tcp - FromPort: '22' - ToPort: '22' - CidrIp: 0.0.0.0/0 - Instance: - Type: 'AWS::EC2::Instance' - Properties: - ImageId: >- - {{resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2}} - SubnetId: !Ref PublicSubnet1 - KeyName: !Ref KeyPair - InstanceType: t2.micro - Tags: - - Key: Name - Value: !Sub '${EnvironmentName}' - SecurityGroupIds: - - Ref: InstanceSecurityGroup -Outputs: - VPC: - Description: A reference to the created VPC - Value: !Ref VPC - PublicSubnet1: - Description: A reference to the public subnet - Value: !Ref PublicSubnet1 - InstanceSecurityGroup: - Description: Security group - Value: !Ref InstanceSecurityGroup - Instance: - Description: EC2 instance for agent installation - Value: !Ref Instance \ No newline at end of file diff --git a/PetAdoptions/cdk/pet_stack/resources/cw-agent-windows-instance-cfn.yml b/PetAdoptions/cdk/pet_stack/resources/cw-agent-windows-instance-cfn.yml deleted file mode 100644 index 7cbe2ad0..00000000 --- a/PetAdoptions/cdk/pet_stack/resources/cw-agent-windows-instance-cfn.yml +++ /dev/null @@ -1,104 +0,0 @@ -AWSTemplateFormatVersion: 2010-09-09 -Description: >- - This template deploys a VPC, with a public subnet. It deploys an an EC2 - instance for CloudWatch agent installation -Parameters: - EnvironmentName: - Description: An environment name that is prefixed to resource names - Type: String - Default: observability-workshop - KeyPair: - Description: EC2 key pairs - Type: 'AWS::EC2::KeyPair::KeyName' -Resources: - VPC: - Type: 'AWS::EC2::VPC' - Properties: - CidrBlock: 10.192.0.0/16 - EnableDnsSupport: true - EnableDnsHostnames: true - Tags: - - Key: Name - Value: !Ref EnvironmentName - InternetGateway: - Type: 'AWS::EC2::InternetGateway' - Properties: - Tags: - - Key: Name - Value: !Ref EnvironmentName - InternetGatewayAttachment: - Type: 'AWS::EC2::VPCGatewayAttachment' - Properties: - InternetGatewayId: !Ref InternetGateway - VpcId: !Ref VPC - PublicSubnet1: - Type: 'AWS::EC2::Subnet' - Properties: - VpcId: !Ref VPC - AvailabilityZone: !Select - - 0 - - !GetAZs '' - CidrBlock: 10.192.10.0/24 - MapPublicIpOnLaunch: true - Tags: - - Key: Name - Value: !Sub '${EnvironmentName} Public Subnet' - PublicRouteTable: - Type: 'AWS::EC2::RouteTable' - Properties: - VpcId: !Ref VPC - Tags: - - Key: Name - Value: !Sub '${EnvironmentName} Public Route' - DefaultPublicRoute: - Type: 'AWS::EC2::Route' - DependsOn: InternetGatewayAttachment - Properties: - RouteTableId: !Ref PublicRouteTable - DestinationCidrBlock: 0.0.0.0/0 - GatewayId: !Ref InternetGateway - PublicSubnet1RouteTableAssociation: - Type: 'AWS::EC2::SubnetRouteTableAssociation' - Properties: - RouteTableId: !Ref PublicRouteTable - SubnetId: !Ref PublicSubnet1 - InstanceSecurityGroup: - Type: 'AWS::EC2::SecurityGroup' - Properties: - GroupName: ingress-sg - GroupDescription: Security group with for the instance - VpcId: !Ref VPC - Tags: - - Key: Name - Value: !Sub '${EnvironmentName}' - SecurityGroupIngress: - - IpProtocol: tcp - FromPort: '3389' - ToPort: '3389' - CidrIp: 0.0.0.0/0 - Instance: - Type: 'AWS::EC2::Instance' - Properties: - ImageId: >- - {{resolve:ssm:/aws/service/ami-windows-latest/Windows_Server-2016-English-Full-Base}} - SubnetId: !Ref PublicSubnet1 - KeyName: !Ref KeyPair - InstanceType: t2.micro - Tags: - - Key: Name - Value: !Sub '${EnvironmentName}' - SecurityGroupIds: - - Ref: InstanceSecurityGroup -Outputs: - VPC: - Description: A reference to the created VPC - Value: !Ref VPC - PublicSubnet1: - Description: A reference to the public subnet - Value: !Ref PublicSubnet1 - InstanceSecurityGroup: - Description: Security group - Value: !Ref InstanceSecurityGroup - Instance: - Description: EC2 instance for agent installation - Value: !Ref Instance