// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`UnityLicenseServerAmiStack test 1`] = ` { "Outputs": { "AmiInstanceURL": { "Value": { "Fn::Join": [ "", [ "https://", { "Ref": "AWS::Region", }, ".console.aws.amazon.com/ec2/home#InstanceDetails:instanceId=", { "Ref": "Instance", }, ], ], }, }, }, "Parameters": { "BootstrapVersion": { "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", "Type": "AWS::SSM::Parameter::Value", }, "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", "Type": "AWS::SSM::Parameter::Value", }, }, "Resources": { "Instance": { "Properties": { "LaunchTemplate": { "LaunchTemplateId": { "Ref": "LaunchTemplate04EC5460", }, "Version": { "Fn::GetAtt": [ "LaunchTemplate04EC5460", "LatestVersionNumber", ], }, }, "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerAmiStack/Instance", }, ], }, "Type": "AWS::EC2::Instance", }, "LaunchTemplate04EC5460": { "Properties": { "LaunchTemplateData": { "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "Encrypted": true, "VolumeSize": 100, }, }, ], "IamInstanceProfile": { "Arn": { "Fn::GetAtt": [ "LaunchTemplateProfile94AA77CE", "Arn", ], }, }, "ImageId": { "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter", }, "InstanceType": "t3.small", "NetworkInterfaces": [ { "DeleteOnTermination": false, "DeviceIndex": 0, "NetworkInterfaceId": { "Fn::ImportValue": "MockStack:ExportsOutputRefLicenseServerEni1A07D6BD", }, }, ], "TagSpecifications": [ { "ResourceType": "instance", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerAmiStack/LaunchTemplate", }, ], }, { "ResourceType": "volume", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerAmiStack/LaunchTemplate", }, ], }, ], "UserData": { "Fn::Base64": "#cloud-config fqdn: unitylicenseserver.ec2.internal runcmd: - | #!/bin/bash yum -y update yum -y install jq ", }, }, "TagSpecifications": [ { "ResourceType": "launch-template", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerAmiStack/LaunchTemplate", }, ], }, ], }, "Type": "AWS::EC2::LaunchTemplate", }, "LaunchTemplateProfile94AA77CE": { "Properties": { "Roles": [ { "Ref": "Role1ABCC5F0", }, ], }, "Type": "AWS::IAM::InstanceProfile", }, "Ref47C32AF2": { "Properties": { "Type": "String", "Value": { "Fn::ImportValue": "MockStack:ExportsOutputRefLicenseServerEni1A07D6BD", }, }, "Type": "AWS::SSM::Parameter", }, "Role1ABCC5F0": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": [ { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iam::aws:policy/AmazonSSMManagedInstanceCore", ], ], }, ], }, "Type": "AWS::IAM::Role", }, "RoleDefaultPolicy5FFB7DAB": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject", "s3:PutObjectLegalHold", "s3:PutObjectRetention", "s3:PutObjectTagging", "s3:PutObjectVersionTagging", "s3:Abort*", ], "Effect": "Allow", "Resource": [ { "Fn::ImportValue": "MockStack:ExportsOutputFnGetAttBucket83908E77Arn063C8555", }, { "Fn::Join": [ "", [ { "Fn::ImportValue": "MockStack:ExportsOutputFnGetAttBucket83908E77Arn063C8555", }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "RoleDefaultPolicy5FFB7DAB", "Roles": [ { "Ref": "Role1ABCC5F0", }, ], }, "Type": "AWS::IAM::Policy", }, }, "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.", }, ], }, }, } `; exports[`UnityLicenseServerStack test 1`] = ` { "Mappings": { "DefaultCrNodeVersionMap": { "af-south-1": { "value": "nodejs16.x", }, "ap-east-1": { "value": "nodejs16.x", }, "ap-northeast-1": { "value": "nodejs16.x", }, "ap-northeast-2": { "value": "nodejs16.x", }, "ap-northeast-3": { "value": "nodejs16.x", }, "ap-south-1": { "value": "nodejs16.x", }, "ap-south-2": { "value": "nodejs16.x", }, "ap-southeast-1": { "value": "nodejs16.x", }, "ap-southeast-2": { "value": "nodejs16.x", }, "ap-southeast-3": { "value": "nodejs16.x", }, "ca-central-1": { "value": "nodejs16.x", }, "cn-north-1": { "value": "nodejs16.x", }, "cn-northwest-1": { "value": "nodejs16.x", }, "eu-central-1": { "value": "nodejs16.x", }, "eu-central-2": { "value": "nodejs16.x", }, "eu-north-1": { "value": "nodejs16.x", }, "eu-south-1": { "value": "nodejs16.x", }, "eu-south-2": { "value": "nodejs16.x", }, "eu-west-1": { "value": "nodejs16.x", }, "eu-west-2": { "value": "nodejs16.x", }, "eu-west-3": { "value": "nodejs16.x", }, "me-central-1": { "value": "nodejs16.x", }, "me-south-1": { "value": "nodejs16.x", }, "sa-east-1": { "value": "nodejs16.x", }, "us-east-1": { "value": "nodejs16.x", }, "us-east-2": { "value": "nodejs16.x", }, "us-gov-east-1": { "value": "nodejs16.x", }, "us-gov-west-1": { "value": "nodejs16.x", }, "us-iso-east-1": { "value": "nodejs14.x", }, "us-iso-west-1": { "value": "nodejs14.x", }, "us-isob-east-1": { "value": "nodejs14.x", }, "us-west-1": { "value": "nodejs16.x", }, "us-west-2": { "value": "nodejs16.x", }, }, }, "Outputs": { "S3BucketUrl": { "Value": { "Fn::Join": [ "", [ "https://s3.console.aws.amazon.com/s3/buckets/", { "Ref": "Bucket83908E77", }, ], ], }, }, }, "Parameters": { "BootstrapVersion": { "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", "Type": "AWS::SSM::Parameter::Value", }, }, "Resources": { "Bucket83908E77": { "DeletionPolicy": "Delete", "Properties": { "BucketEncryption": { "ServerSideEncryptionConfiguration": [ { "ServerSideEncryptionByDefault": { "SSEAlgorithm": "AES256", }, }, ], }, "LoggingConfiguration": { "DestinationBucketName": { "Ref": "LogBucketCC3B17E8", }, "LogFilePrefix": "license-server-bucket-access-logs/", }, "PublicAccessBlockConfiguration": { "BlockPublicAcls": true, "BlockPublicPolicy": true, "IgnorePublicAcls": true, "RestrictPublicBuckets": true, }, "Tags": [ { "Key": "aws-cdk:auto-delete-objects", "Value": "true", }, ], "VersioningConfiguration": { "Status": "Enabled", }, }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Delete", }, "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { "DeletionPolicy": "Delete", "DependsOn": [ "BucketPolicyE9A3008A", ], "Properties": { "BucketName": { "Ref": "Bucket83908E77", }, "ServiceToken": { "Fn::GetAtt": [ "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", "Arn", ], }, }, "Type": "Custom::S3AutoDeleteObjects", "UpdateReplacePolicy": "Delete", }, "BucketPolicyE9A3008A": { "Properties": { "Bucket": { "Ref": "Bucket83908E77", }, "PolicyDocument": { "Statement": [ { "Action": "s3:*", "Condition": { "Bool": { "aws:SecureTransport": "false", }, }, "Effect": "Deny", "Principal": { "AWS": "*", }, "Resource": [ { "Fn::GetAtt": [ "Bucket83908E77", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "Bucket83908E77", "Arn", ], }, "/*", ], ], }, ], }, { "Action": [ "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", ], "Effect": "Allow", "Principal": { "AWS": { "Fn::GetAtt": [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", "Arn", ], }, }, "Resource": [ { "Fn::GetAtt": [ "Bucket83908E77", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "Bucket83908E77", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, }, "Type": "AWS::S3::BucketPolicy", }, "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { "DependsOn": [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", ], "Properties": { "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "350185a1069fa20a23a583e20c77f6844218bd73097902362dc94f1a108f5d89.zip", }, "Description": { "Fn::Join": [ "", [ "Lambda function for auto-deleting objects in ", { "Ref": "LogBucketCC3B17E8", }, " S3 bucket.", ], ], }, "Handler": "__entrypoint__.handler", "MemorySize": 128, "Role": { "Fn::GetAtt": [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", "Arn", ], }, "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": [ { "Fn::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", }, ], }, "Type": "AWS::IAM::Role", }, "EniSecurityGroup38D1F46C": { "Properties": { "GroupDescription": "UnityLicenseServerStack/EniSecurityGroup", "SecurityGroupEgress": [ { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "SecurityGroupIngress": [ { "CidrIp": { "Fn::GetAtt": [ "Vpc8378EB38", "CidrBlock", ], }, "Description": "Allow TCP 8080", "FromPort": 8080, "IpProtocol": "tcp", "ToPort": 8080, }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::SecurityGroup", }, "LicenseServerEni": { "DeletionPolicy": "Retain", "Properties": { "GroupSet": [ { "Fn::GetAtt": [ "EniSecurityGroup38D1F46C", "GroupId", ], }, ], "SubnetId": { "Ref": "VpcPrivateSubnet1Subnet536B997A", }, "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerEni", }, ], }, "Type": "AWS::EC2::NetworkInterface", "UpdateReplacePolicy": "Retain", }, "LogBucketAutoDeleteObjectsCustomResource7762F42C": { "DeletionPolicy": "Delete", "DependsOn": [ "LogBucketPolicy900DBE48", ], "Properties": { "BucketName": { "Ref": "LogBucketCC3B17E8", }, "ServiceToken": { "Fn::GetAtt": [ "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", "Arn", ], }, }, "Type": "Custom::S3AutoDeleteObjects", "UpdateReplacePolicy": "Delete", }, "LogBucketCC3B17E8": { "DeletionPolicy": "Delete", "Properties": { "AccessControl": "LogDeliveryWrite", "BucketEncryption": { "ServerSideEncryptionConfiguration": [ { "ServerSideEncryptionByDefault": { "SSEAlgorithm": "AES256", }, }, ], }, "OwnershipControls": { "Rules": [ { "ObjectOwnership": "ObjectWriter", }, ], }, "PublicAccessBlockConfiguration": { "BlockPublicAcls": true, "BlockPublicPolicy": true, "IgnorePublicAcls": true, "RestrictPublicBuckets": true, }, "Tags": [ { "Key": "aws-cdk:auto-delete-objects", "Value": "true", }, ], }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Delete", }, "LogBucketPolicy900DBE48": { "Properties": { "Bucket": { "Ref": "LogBucketCC3B17E8", }, "PolicyDocument": { "Statement": [ { "Action": "s3:*", "Condition": { "Bool": { "aws:SecureTransport": "false", }, }, "Effect": "Deny", "Principal": { "AWS": "*", }, "Resource": [ { "Fn::GetAtt": [ "LogBucketCC3B17E8", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "LogBucketCC3B17E8", "Arn", ], }, "/*", ], ], }, ], }, { "Action": [ "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", ], "Effect": "Allow", "Principal": { "AWS": { "Fn::GetAtt": [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", "Arn", ], }, }, "Resource": [ { "Fn::GetAtt": [ "LogBucketCC3B17E8", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "LogBucketCC3B17E8", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, }, "Type": "AWS::S3::BucketPolicy", }, "Vpc8378EB38": { "Properties": { "CidrBlock": "10.0.0.0/16", "EnableDnsHostnames": true, "EnableDnsSupport": true, "InstanceTenancy": "default", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc", }, ], }, "Type": "AWS::EC2::VPC", }, "VpcFlowLogsFlowLogBB096F0F": { "DependsOn": [ "LogBucketAutoDeleteObjectsCustomResource7762F42C", "LogBucketPolicy900DBE48", ], "Properties": { "LogDestination": { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "LogBucketCC3B17E8", "Arn", ], }, "/vpc-flow-logs", ], ], }, "LogDestinationType": "s3", "ResourceId": { "Ref": "Vpc8378EB38", }, "ResourceType": "VPC", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc", }, ], "TrafficType": "ALL", }, "Type": "AWS::EC2::FlowLog", }, "VpcIGWD7BA715C": { "Properties": { "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc", }, ], }, "Type": "AWS::EC2::InternetGateway", }, "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA", }, "RouteTableId": { "Ref": "VpcPrivateSubnet1RouteTableB2C5B500", }, }, "Type": "AWS::EC2::Route", }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { "Properties": { "RouteTableId": { "Ref": "VpcPrivateSubnet1RouteTableB2C5B500", }, "SubnetId": { "Ref": "VpcPrivateSubnet1Subnet536B997A", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Properties": { "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PrivateSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPrivateSubnet1Subnet536B997A": { "Properties": { "AvailabilityZone": { "Fn::Select": [ 0, { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.128.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { "Key": "aws-cdk:subnet-name", "Value": "Private", }, { "Key": "aws-cdk:subnet-type", "Value": "Private", }, { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PrivateSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPrivateSubnet2DefaultRoute060D2087": { "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D", }, "RouteTableId": { "Ref": "VpcPrivateSubnet2RouteTableA678073B", }, }, "Type": "AWS::EC2::Route", }, "VpcPrivateSubnet2RouteTableA678073B": { "Properties": { "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PrivateSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { "Properties": { "RouteTableId": { "Ref": "VpcPrivateSubnet2RouteTableA678073B", }, "SubnetId": { "Ref": "VpcPrivateSubnet2Subnet3788AAA1", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPrivateSubnet2Subnet3788AAA1": { "Properties": { "AvailabilityZone": { "Fn::Select": [ 1, { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.192.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { "Key": "aws-cdk:subnet-name", "Value": "Private", }, { "Key": "aws-cdk:subnet-type", "Value": "Private", }, { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PrivateSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPublicSubnet1DefaultRoute3DA9E72A": { "DependsOn": [ "VpcVPCGWBF912B6E", ], "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C", }, "RouteTableId": { "Ref": "VpcPublicSubnet1RouteTable6C95E38E", }, }, "Type": "AWS::EC2::Route", }, "VpcPublicSubnet1EIPD7E02669": { "Properties": { "Domain": "vpc", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet1", }, ], }, "Type": "AWS::EC2::EIP", }, "VpcPublicSubnet1NATGateway4D7517AA": { "DependsOn": [ "VpcPublicSubnet1DefaultRoute3DA9E72A", "VpcPublicSubnet1RouteTableAssociation97140677", ], "Properties": { "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId", ], }, "SubnetId": { "Ref": "VpcPublicSubnet1Subnet5C2D37C4", }, "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet1", }, ], }, "Type": "AWS::EC2::NatGateway", }, "VpcPublicSubnet1RouteTable6C95E38E": { "Properties": { "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPublicSubnet1RouteTableAssociation97140677": { "Properties": { "RouteTableId": { "Ref": "VpcPublicSubnet1RouteTable6C95E38E", }, "SubnetId": { "Ref": "VpcPublicSubnet1Subnet5C2D37C4", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPublicSubnet1Subnet5C2D37C4": { "Properties": { "AvailabilityZone": { "Fn::Select": [ 0, { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.0.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { "Key": "aws-cdk:subnet-name", "Value": "Public", }, { "Key": "aws-cdk:subnet-type", "Value": "Public", }, { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPublicSubnet2DefaultRoute97F91067": { "DependsOn": [ "VpcVPCGWBF912B6E", ], "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C", }, "RouteTableId": { "Ref": "VpcPublicSubnet2RouteTable94F7E489", }, }, "Type": "AWS::EC2::Route", }, "VpcPublicSubnet2EIP3C605A87": { "Properties": { "Domain": "vpc", "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet2", }, ], }, "Type": "AWS::EC2::EIP", }, "VpcPublicSubnet2NATGateway9182C01D": { "DependsOn": [ "VpcPublicSubnet2DefaultRoute97F91067", "VpcPublicSubnet2RouteTableAssociationDD5762D8", ], "Properties": { "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId", ], }, "SubnetId": { "Ref": "VpcPublicSubnet2Subnet691E08A3", }, "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet2", }, ], }, "Type": "AWS::EC2::NatGateway", }, "VpcPublicSubnet2RouteTable94F7E489": { "Properties": { "Tags": [ { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { "Properties": { "RouteTableId": { "Ref": "VpcPublicSubnet2RouteTable94F7E489", }, "SubnetId": { "Ref": "VpcPublicSubnet2Subnet691E08A3", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPublicSubnet2Subnet691E08A3": { "Properties": { "AvailabilityZone": { "Fn::Select": [ 1, { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.64.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { "Key": "aws-cdk:subnet-name", "Value": "Public", }, { "Key": "aws-cdk:subnet-type", "Value": "Public", }, { "Key": "Name", "Value": "UnityLicenseServerStack/Vpc/PublicSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcS3A5408339": { "Properties": { "RouteTableIds": [ { "Ref": "VpcPrivateSubnet1RouteTableB2C5B500", }, { "Ref": "VpcPrivateSubnet2RouteTableA678073B", }, { "Ref": "VpcPublicSubnet1RouteTable6C95E38E", }, { "Ref": "VpcPublicSubnet2RouteTable94F7E489", }, ], "ServiceName": { "Fn::Join": [ "", [ "com.amazonaws.", { "Ref": "AWS::Region", }, ".s3", ], ], }, "VpcEndpointType": "Gateway", "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::VPCEndpoint", }, "VpcVPCGWBF912B6E": { "Properties": { "InternetGatewayId": { "Ref": "VpcIGWD7BA715C", }, "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::VPCGatewayAttachment", }, }, "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.", }, ], }, }, } `; exports[`UnityTestClientStack test 1`] = ` { "Outputs": { "TestClientUrl": { "Value": { "Fn::Join": [ "", [ "https://", { "Ref": "AWS::Region", }, ".console.aws.amazon.com/ec2/home#InstanceDetails:instanceId=", { "Ref": "TestClientE2CB58CC", }, ], ], }, }, }, "Parameters": { "BootstrapVersion": { "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", "Type": "AWS::SSM::Parameter::Value", }, "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", "Type": "AWS::SSM::Parameter::Value", }, }, "Resources": { "TestClientE2CB58CC": { "DependsOn": [ "TestClientInstanceRoleDefaultPolicy399EC1CE", "TestClientInstanceRoleF0778570", ], "Properties": { "AvailabilityZone": { "Fn::Select": [ 0, { "Fn::GetAZs": "", }, ], }, "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "Encrypted": true, "VolumeSize": 100, }, }, ], "IamInstanceProfile": { "Ref": "TestClientInstanceProfileF9C60143", }, "ImageId": { "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter", }, "InstanceType": "t3.small", "SecurityGroupIds": [ { "Fn::GetAtt": [ "TestClientInstanceSecurityGroup94FF0EA5", "GroupId", ], }, ], "SubnetId": { "Fn::ImportValue": "MockStack:ExportsOutputRefVpcPrivateSubnet1Subnet536B997AFD4CC940", }, "Tags": [ { "Key": "Name", "Value": "TestClientInstance", }, ], "UserData": { "Fn::Base64": { "Fn::Join": [ "", [ "#!/bin/bash yum -y update sh -c 'echo -e "[unityhub] name=Unity Hub baseurl=https://hub.unity3d.com/linux/repos/rpm/stable enabled=1 gpgcheck=1 gpgkey=https://hub.unity3d.com/linux/repos/rpm/stable/repodata/repomd.xml.key repo_gpgcheck=1" > /etc/yum.repos.d/unityhub.repo' yum check-update yum -y install unityhub mkdir /usr/share/unity3d/config aws s3 cp s3://", { "Fn::ImportValue": "MockStack:ExportsOutputRefBucket83908E7781C90AC0", }, "/services-config.json /usr/share/unity3d/config/", ], ], }, }, }, "Type": "AWS::EC2::Instance", }, "TestClientInstanceProfileF9C60143": { "Properties": { "Roles": [ { "Ref": "TestClientInstanceRoleF0778570", }, ], }, "Type": "AWS::IAM::InstanceProfile", }, "TestClientInstanceRoleDefaultPolicy399EC1CE": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", ], "Effect": "Allow", "Resource": [ { "Fn::ImportValue": "MockStack:ExportsOutputFnGetAttBucket83908E77Arn063C8555", }, { "Fn::Join": [ "", [ { "Fn::ImportValue": "MockStack:ExportsOutputFnGetAttBucket83908E77Arn063C8555", }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "TestClientInstanceRoleDefaultPolicy399EC1CE", "Roles": [ { "Ref": "TestClientInstanceRoleF0778570", }, ], }, "Type": "AWS::IAM::Policy", }, "TestClientInstanceRoleF0778570": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": [ { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iam::aws:policy/AmazonSSMManagedInstanceCore", ], ], }, ], "Tags": [ { "Key": "Name", "Value": "TestClientInstance", }, ], }, "Type": "AWS::IAM::Role", }, "TestClientInstanceSecurityGroup94FF0EA5": { "Properties": { "GroupDescription": "UnityTestClientStack/TestClient/InstanceSecurityGroup", "SecurityGroupEgress": [ { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "Tags": [ { "Key": "Name", "Value": "TestClientInstance", }, ], "VpcId": { "Fn::ImportValue": "MockStack:ExportsOutputRefVpc8378EB38272D6E3A", }, }, "Type": "AWS::EC2::SecurityGroup", }, }, "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.", }, ], }, }, } `;