Resources:
  keyFEDD6EC0:
    Type: AWS::KMS::Key
    Properties:
      KeyPolicy:
        Statement:
          - Action:
              - kms:Create*
              - kms:Describe*
              - kms:Enable*
              - kms:List*
              - kms:Put*
              - kms:Update*
              - kms:Revoke*
              - kms:Disable*
              - kms:Get*
              - kms:Delete*
              - kms:ScheduleKeyDeletion
              - kms:CancelKeyDeletion
              - kms:GenerateDataKey
              - kms:TagResource
              - kms:UntagResource
            Effect: Allow
            Principal:
              AWS:
                Fn::Join:
                  - ""
                  - - "arn:"
                    - Ref: AWS::Partition
                    - ":iam::"
                    - Ref: AWS::AccountId
                    - :root
            Resource: "*"
          - Action:
              - kms:Decrypt
              - kms:Encrypt
              - kms:ReEncrypt*
              - kms:GenerateDataKey*
            Condition:
              StringEquals:
                kms:ViaService:
                  Fn::Join:
                    - ""
                    - - secretsmanager.
                      - Ref: AWS::Region
                      - .amazonaws.com
            Effect: Allow
            Principal:
              AWS:
                Fn::Join:
                  - ""
                  - - "arn:"
                    - Ref: AWS::Partition
                    - ":iam::"
                    - Ref: AWS::AccountId
                    - :root
            Resource: "*"
          - Action:
              - kms:CreateGrant
              - kms:DescribeKey
            Condition:
              StringEquals:
                kms:ViaService:
                  Fn::Join:
                    - ""
                    - - secretsmanager.
                      - Ref: AWS::Region
                      - .amazonaws.com
            Effect: Allow
            Principal:
              AWS:
                Fn::Join:
                  - ""
                  - - "arn:"
                    - Ref: AWS::Partition
                    - ":iam::"
                    - Ref: AWS::AccountId
                    - :root
            Resource: "*"
        Version: "2012-10-17"
      Enabled: true
      EnableKeyRotation: true
      Tags:
        - Key: Lab
          Value: "Yes"
    UpdateReplacePolicy: Retain
    DeletionPolicy: Retain
    Metadata:
      aws:cdk:path: VsCodeLabStack/key/Resource
  bucket43879C71:
    Type: AWS::S3::Bucket
    Properties:
      Tags:
        - Key: Lab
          Value: "2"
    UpdateReplacePolicy: Delete
    DeletionPolicy: Delete
    Metadata:
      aws:cdk:path: VsCodeLabStack/bucket/Resource
  bucketPolicy638F945D:
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket:
        Ref: bucket43879C71
      PolicyDocument:
        Statement:
          - Action: s3:GetObject
            Effect: Allow
            Principal: "*"
            Resource:
              Fn::Join:
                - ""
                - - Fn::GetAtt:
                      - bucket43879C71
                      - Arn
                  - /*
          - Action: s3:GetBucketAcl
            Effect: Allow
            Principal:
              Service: cloudtrail.amazonaws.com
            Resource:
              Fn::GetAtt:
                - bucket43879C71
                - Arn
          - Action: s3:PutObject
            Condition:
              StringEquals:
                s3:x-amz-acl: bucket-owner-full-control
            Effect: Allow
            Principal:
              Service: cloudtrail.amazonaws.com
            Resource:
              Fn::Join:
                - ""
                - - Fn::GetAtt:
                      - bucket43879C71
                      - Arn
                  - /trail/AWSLogs/
                  - Ref: AWS::AccountId
                  - /*
        Version: "2012-10-17"
    Metadata:
      aws:cdk:path: VsCodeLabStack/bucket/Policy/Resource
  vpcA2121C38:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 10.0.0.0/16
      EnableDnsHostnames: true
      EnableDnsSupport: true
      InstanceTenancy: default
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/Resource
  vpcPublicSubnet1Subnet2E65531E:
    Type: AWS::EC2::Subnet
    Properties:
      CidrBlock: 10.0.0.0/18
      VpcId:
        Ref: vpcA2121C38
      AvailabilityZone:
        Fn::Select:
          - 0
          - Fn::GetAZs: ""
      MapPublicIpOnLaunch: true
      Tags:
        - Key: aws-cdk:subnet-name
          Value: Public
        - Key: aws-cdk:subnet-type
          Value: Public
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/Subnet
  vpcPublicSubnet1RouteTable48A2DF9B:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId:
        Ref: vpcA2121C38
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/RouteTable
  vpcPublicSubnet1RouteTableAssociation5D3F4579:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId:
        Ref: vpcPublicSubnet1RouteTable48A2DF9B
      SubnetId:
        Ref: vpcPublicSubnet1Subnet2E65531E
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/RouteTableAssociation
  vpcPublicSubnet1DefaultRoute10708846:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: vpcPublicSubnet1RouteTable48A2DF9B
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId:
        Ref: vpcIGWE57CBDCA
    DependsOn:
      - vpcVPCGW7984C166
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/DefaultRoute
  vpcPublicSubnet1EIPDA49DCBE:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/EIP
  vpcPublicSubnet1NATGateway9C16659E:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
          - vpcPublicSubnet1EIPDA49DCBE
          - AllocationId
      SubnetId:
        Ref: vpcPublicSubnet1Subnet2E65531E
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet1/NATGateway
  vpcPublicSubnet2Subnet009B674F:
    Type: AWS::EC2::Subnet
    Properties:
      CidrBlock: 10.0.64.0/18
      VpcId:
        Ref: vpcA2121C38
      AvailabilityZone:
        Fn::Select:
          - 1
          - Fn::GetAZs: ""
      MapPublicIpOnLaunch: true
      Tags:
        - Key: aws-cdk:subnet-name
          Value: Public
        - Key: aws-cdk:subnet-type
          Value: Public
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/Subnet
  vpcPublicSubnet2RouteTableEB40D4CB:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId:
        Ref: vpcA2121C38
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/RouteTable
  vpcPublicSubnet2RouteTableAssociation21F81B59:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId:
        Ref: vpcPublicSubnet2RouteTableEB40D4CB
      SubnetId:
        Ref: vpcPublicSubnet2Subnet009B674F
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/RouteTableAssociation
  vpcPublicSubnet2DefaultRouteA1EC0F60:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: vpcPublicSubnet2RouteTableEB40D4CB
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId:
        Ref: vpcIGWE57CBDCA
    DependsOn:
      - vpcVPCGW7984C166
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/DefaultRoute
  vpcPublicSubnet2EIP9B3743B1:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/EIP
  vpcPublicSubnet2NATGateway9B8AE11A:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
          - vpcPublicSubnet2EIP9B3743B1
          - AllocationId
      SubnetId:
        Ref: vpcPublicSubnet2Subnet009B674F
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PublicSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PublicSubnet2/NATGateway
  vpcPrivateSubnet1Subnet934893E8:
    Type: AWS::EC2::Subnet
    Properties:
      CidrBlock: 10.0.128.0/18
      VpcId:
        Ref: vpcA2121C38
      AvailabilityZone:
        Fn::Select:
          - 0
          - Fn::GetAZs: ""
      MapPublicIpOnLaunch: false
      Tags:
        - Key: aws-cdk:subnet-name
          Value: Private
        - Key: aws-cdk:subnet-type
          Value: Private
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PrivateSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet1/Subnet
  vpcPrivateSubnet1RouteTableB41A48CC:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId:
        Ref: vpcA2121C38
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PrivateSubnet1
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet1/RouteTable
  vpcPrivateSubnet1RouteTableAssociation67945127:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId:
        Ref: vpcPrivateSubnet1RouteTableB41A48CC
      SubnetId:
        Ref: vpcPrivateSubnet1Subnet934893E8
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet1/RouteTableAssociation
  vpcPrivateSubnet1DefaultRoute1AA8E2E5:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: vpcPrivateSubnet1RouteTableB41A48CC
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId:
        Ref: vpcPublicSubnet1NATGateway9C16659E
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet1/DefaultRoute
  vpcPrivateSubnet2Subnet7031C2BA:
    Type: AWS::EC2::Subnet
    Properties:
      CidrBlock: 10.0.192.0/18
      VpcId:
        Ref: vpcA2121C38
      AvailabilityZone:
        Fn::Select:
          - 1
          - Fn::GetAZs: ""
      MapPublicIpOnLaunch: false
      Tags:
        - Key: aws-cdk:subnet-name
          Value: Private
        - Key: aws-cdk:subnet-type
          Value: Private
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PrivateSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet2/Subnet
  vpcPrivateSubnet2RouteTable7280F23E:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId:
        Ref: vpcA2121C38
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc/PrivateSubnet2
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet2/RouteTable
  vpcPrivateSubnet2RouteTableAssociation007E94D3:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId:
        Ref: vpcPrivateSubnet2RouteTable7280F23E
      SubnetId:
        Ref: vpcPrivateSubnet2Subnet7031C2BA
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet2/RouteTableAssociation
  vpcPrivateSubnet2DefaultRouteB0E07F99:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: vpcPrivateSubnet2RouteTable7280F23E
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId:
        Ref: vpcPublicSubnet2NATGateway9B8AE11A
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/PrivateSubnet2/DefaultRoute
  vpcIGWE57CBDCA:
    Type: AWS::EC2::InternetGateway
    Properties:
      Tags:
        - Key: Lab
          Value: "Yes"
        - Key: Name
          Value: VsCodeLabStack/vpc
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/IGW
  vpcVPCGW7984C166:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId:
        Ref: vpcA2121C38
      InternetGatewayId:
        Ref: vpcIGWE57CBDCA
    Metadata:
      aws:cdk:path: VsCodeLabStack/vpc/VPCGW
  sg29196201:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: VsCodeLabStack/sg
      GroupName: SuperSecureSG
      SecurityGroupEgress:
        - CidrIp: 255.255.255.255/32
          Description: Disallow all traffic
          FromPort: 252
          IpProtocol: icmp
          ToPort: 86
      SecurityGroupIngress:
        - CidrIp: 10.10.10.10/32
          Description: from 10.10.10.10/32:22
          FromPort: 22
          IpProtocol: tcp
          ToPort: 22
      Tags:
        - Key: Lab
          Value: Home
      VpcId:
        Ref: vpcA2121C38
    Metadata:
      aws:cdk:path: VsCodeLabStack/sg/Resource
  sqs1386CA46:
    Type: AWS::SQS::Queue
    Properties:
      KmsMasterKeyId:
        Fn::GetAtt:
          - keyFEDD6EC0
          - Arn
      Tags:
        - Key: Lab
          Value: "4"
    Metadata:
      aws:cdk:path: VsCodeLabStack/sqs/Resource
  sns78FA588D:
    Type: AWS::SNS::Topic
    Properties:
      KmsMasterKeyId:
        Fn::GetAtt:
          - keyFEDD6EC0
          - Arn
      Tags:
        - Key: Lab
          Value: "4"
    Metadata:
      aws:cdk:path: VsCodeLabStack/sns/Resource
  snsPolicyBD1809F4:
    Type: AWS::SNS::TopicPolicy
    Properties:
      PolicyDocument:
        Statement:
          - Action: sns:Publish
            Effect: Allow
            Principal:
              Service: cloudtrail.amazonaws.com
            Resource:
              Ref: sns78FA588D
            Sid: "0"
        Version: "2012-10-17"
      Topics:
        - Ref: sns78FA588D
    Metadata:
      aws:cdk:path: VsCodeLabStack/sns/Policy/Resource
  roleC7B7E775:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action: sts:AssumeRole
            Effect: Allow
            Principal:
              Service: sns.amazonaws.com
        Version: "2012-10-17"
      Tags:
        - Key: Lab
          Value: "3"
    Metadata:
      aws:cdk:path: VsCodeLabStack/role/Resource
  policyE16B4B70:
    Type: AWS::IAM::Policy
    Properties:
      PolicyDocument:
        Statement:
          - Action: s3:ListBucket
            Effect: Allow
            Resource:
              Fn::GetAtt:
                - bucket43879C71
                - Arn
        Version: "2012-10-17"
      PolicyName: policyE16B4B70
      Roles:
        - Ref: roleC7B7E775
    Metadata:
      aws:cdk:path: VsCodeLabStack/policy/Resource
  secretmanagerE7F46652:
    Type: AWS::SecretsManager::Secret
    Properties:
      GenerateSecretString: {}
      KmsKeyId:
        Fn::GetAtt:
          - keyFEDD6EC0
          - Arn
      Tags:
        - Key: Lab
          Value: Home
    Metadata:
      aws:cdk:path: VsCodeLabStack/secret-manager/Resource
  CloudTrailLogGroup2F0A1829:
    Type: AWS::Logs::LogGroup
    Properties:
      RetentionInDays: 365
    UpdateReplacePolicy: Retain
    DeletionPolicy: Retain
    Metadata:
      aws:cdk:path: VsCodeLabStack/CloudTrail/LogGroup/Resource
  CloudTrailLogsRole9F6E6663:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action: sts:AssumeRole
            Effect: Allow
            Principal:
              Service: cloudtrail.amazonaws.com
        Version: "2012-10-17"
      Tags:
        - Key: Lab
          Value: Home
    Metadata:
      aws:cdk:path: VsCodeLabStack/CloudTrail/LogsRole/Resource
  CloudTrailLogsRoleDefaultPolicyD9019B15:
    Type: AWS::IAM::Policy
    Properties:
      PolicyDocument:
        Statement:
          - Action:
              - logs:PutLogEvents
              - logs:CreateLogStream
            Effect: Allow
            Resource:
              Fn::GetAtt:
                - CloudTrailLogGroup2F0A1829
                - Arn
        Version: "2012-10-17"
      PolicyName: CloudTrailLogsRoleDefaultPolicyD9019B15
      Roles:
        - Ref: CloudTrailLogsRole9F6E6663
    Metadata:
      aws:cdk:path: VsCodeLabStack/CloudTrail/LogsRole/DefaultPolicy/Resource
  CloudTrailA62D711D:
    Type: AWS::CloudTrail::Trail
    Properties:
      IsLogging: true
      S3BucketName:
        Ref: bucket43879C71
      CloudWatchLogsLogGroupArn:
        Fn::GetAtt:
          - CloudTrailLogGroup2F0A1829
          - Arn
      CloudWatchLogsRoleArn:
        Fn::GetAtt:
          - CloudTrailLogsRole9F6E6663
          - Arn
      EnableLogFileValidation: true
      EventSelectors:
        - IncludeManagementEvents: true
          ReadWriteType: All
      IncludeGlobalServiceEvents: true
      IsMultiRegionTrail: true
      KMSKeyId:
        Fn::GetAtt:
          - keyFEDD6EC0
          - Arn
      S3KeyPrefix: trail
      SnsTopicName:
        Fn::GetAtt:
          - sns78FA588D
          - TopicName
      Tags:
        - Key: Lab
          Value: Home
    DependsOn:
      - bucketPolicy638F945D
      - CloudTrailLogsRoleDefaultPolicyD9019B15
      - CloudTrailLogsRole9F6E6663
    Metadata:
      aws:cdk:path: VsCodeLabStack/CloudTrail/Resource
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Modules: aws-cdk=1.71.0,@aws-cdk/assets=1.71.0,@aws-cdk/aws-applicationautoscaling=1.71.0,@aws-cdk/aws-autoscaling=1.71.0,@aws-cdk/aws-autoscaling-common=1.71.0,@aws-cdk/aws-autoscaling-hooktargets=1.71.0,@aws-cdk/aws-cloudformation=1.71.0,@aws-cdk/aws-cloudtrail=1.71.0,@aws-cdk/aws-cloudwatch=1.71.0,@aws-cdk/aws-codebuild=1.71.0,@aws-cdk/aws-codecommit=1.71.0,@aws-cdk/aws-codeguruprofiler=1.71.0,@aws-cdk/aws-codepipeline=1.71.0,@aws-cdk/aws-codepipeline-actions=1.71.0,@aws-cdk/aws-ec2=1.71.0,@aws-cdk/aws-ecr=1.71.0,@aws-cdk/aws-ecr-assets=1.71.0,@aws-cdk/aws-ecs=1.71.0,@aws-cdk/aws-elasticloadbalancingv2=1.71.0,@aws-cdk/aws-events=1.71.0,@aws-cdk/aws-events-targets=1.71.0,@aws-cdk/aws-iam=1.71.0,@aws-cdk/aws-kms=1.71.0,@aws-cdk/aws-lambda=1.71.0,@aws-cdk/aws-logs=1.71.0,@aws-cdk/aws-s3=1.71.0,@aws-cdk/aws-s3-assets=1.71.0,@aws-cdk/aws-sam=1.71.0,@aws-cdk/aws-secretsmanager=1.71.0,@aws-cdk/aws-servicediscovery=1.71.0,@aws-cdk/aws-sns=1.71.0,@aws-cdk/aws-sns-subscriptions=1.71.0,@aws-cdk/aws-sqs=1.71.0,@aws-cdk/aws-ssm=1.71.0,@aws-cdk/cloud-assembly-schema=1.71.0,@aws-cdk/core=1.71.0,@aws-cdk/custom-resources=1.71.0,@aws-cdk/cx-api=1.71.0,@aws-cdk/region-info=1.71.0,jsii-runtime=node.js/v14.6.0
    Metadata:
      aws:cdk:path: VsCodeLabStack/CDKMetadata/Default
    Condition: CDKMetadataAvailable
Conditions:
  CDKMetadataAvailable:
    Fn::Or:
      - Fn::Or:
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-east-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-northeast-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-northeast-2
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-southeast-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-southeast-2
          - Fn::Equals:
              - Ref: AWS::Region
              - ca-central-1
          - Fn::Equals:
              - Ref: AWS::Region
              - cn-north-1
          - Fn::Equals:
              - Ref: AWS::Region
              - cn-northwest-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-central-1
      - Fn::Or:
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-north-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-2
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-3
          - Fn::Equals:
              - Ref: AWS::Region
              - me-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - sa-east-1
          - Fn::Equals:
              - Ref: AWS::Region
              - us-east-1
          - Fn::Equals:
              - Ref: AWS::Region
              - us-east-2
          - Fn::Equals:
              - Ref: AWS::Region
              - us-west-1
          - Fn::Equals:
              - Ref: AWS::Region
              - us-west-2

