// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DLT API Test 1`] = ` Object { "Conditions": Object { "condition": Object { "Fn::If": Array [ "testCondition", true, false, ], }, }, "Resources": Object { "DLTCustomResourcesAnonymousMetricE30E46B4": Object { "Condition": "condition", "DeletionPolicy": "Delete", "Properties": Object { "Region": Object { "Ref": "AWS::Region", }, "Resource": "AnonymousMetric", "ServiceToken": Object { "Fn::GetAtt": Array [ "TestCustomResourceInfraCustomResourceLambda92E822A7", "Arn", ], }, "SolutionId": "testId", "UUID": "abc-123-def-456", "VERSION": "testVersion", "existingVPC": "false", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "DLTCustomResourcesConsoleConfig9F494EAB": Object { "DeletionPolicy": "Delete", "Properties": Object { "AwsExports": Object { "Fn::Join": Array [ "", Array [ "const awsConfig = { aws_iot_endpoint: 'testIoTEndpoint', aws_iot_policy_name: 'testIoTPolicy', cw_dashboard: 'https://console.aws.amazon.com/cloudwatch/home?region=", Object { "Ref": "AWS::Region", }, "#dashboards:', ecs_dashboard: 'https://", Object { "Ref": "AWS::Region", }, ".console.aws.amazon.com/ecs/home?region=", Object { "Ref": "AWS::Region", }, "#/clusters/", Object { "Ref": "AWS::StackName", }, "/tasks', aws_project_region: '", Object { "Ref": "AWS::Region", }, "', aws_cognito_region: '", Object { "Ref": "AWS::Region", }, "', aws_cognito_identity_pool_id: 'testIdentityPool', aws_user_pools_id: 'testUserPool', aws_user_pools_web_client_id: 'testUserPoolClient', oauth: {}, aws_cloud_logic_custom: [ { name: 'dlts', endpoint: 'http://testEndpointUrl.com', region: '", Object { "Ref": "AWS::Region", }, "' } ], aws_user_files_s3_bucket: 'testscenariobucket', aws_user_files_s3_bucket_region: '", Object { "Ref": "AWS::Region", }, "', }", ], ], }, "DestBucket": "testconsolebucket", "Resource": "ConfigFile", "ServiceToken": Object { "Fn::GetAtt": Array [ "TestCustomResourceInfraCustomResourceLambda92E822A7", "Arn", ], }, }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "DLTCustomResourcesCopyConsoleFiles2EBD447E": Object { "DeletionPolicy": "Delete", "Properties": Object { "DestBucket": "testconsolebucket", "ManifestFile": "console-manifest.json", "Resource": "CopyAssets", "ServiceToken": Object { "Fn::GetAtt": Array [ "TestCustomResourceInfraCustomResourceLambda92E822A7", "Arn", ], }, "SrcBucket": "testcodebucket", "SrcPath": "testCodePrefix//console", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "DLTCustomResourcesTestingResourcesConfig0BCA657F": Object { "DeletionPolicy": "Delete", "Properties": Object { "Resource": "TestingResourcesConfigFile", "ServiceToken": Object { "Fn::GetAtt": Array [ "TestCustomResourceInfraCustomResourceLambda92E822A7", "Arn", ], }, "TestingResourcesConfig": Object { "ecsCloudWatchLogGroup": "testCloudWatchLogGroup", "region": Object { "Ref": "AWS::Region", }, "subnetA": "subnet-123", "subnetB": "subnet-abc", "taskCluster": "testTaskCluster", "taskDefinition": "task:def:arn:123", "taskImage": Object { "Fn::Join": Array [ "", Array [ Object { "Ref": "AWS::StackName", }, "-load-tester", ], ], }, "taskSecurityGroup": "sg-test123", }, "Uuid": "abc-123-def-456", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "TestCustomResourceInfraCustomResourceLambda92E822A7": Object { "DependsOn": Array [ "TestCustomResourceInfraCustomResourceLambdaRoleDefaultPolicy46B2072F", "TestCustomResourceInfraCustomResourceLambdaRole03671AE8", ], "Metadata": Object { "cfn_nag": Object { "rules_to_suppress": Array [ Object { "id": "W58", "reason": "CloudWatchLogsPolicy covers a permission to write CloudWatch logs.", }, Object { "id": "W89", "reason": "VPC not needed for lambda", }, Object { "id": "W92", "reason": "Does not run concurrent executions", }, ], }, }, "Properties": Object { "Code": Object { "S3Bucket": Object { "Ref": "testSourceCodeBucketC577B176", }, "S3Key": "test/source/prefix/main-custom-resource.zip", }, "Description": "CFN Lambda backed custom resource to deploy assets to s3", "Environment": Object { "Variables": Object { "DDB_TABLE": "scenarioTestTable", "MAIN_REGION": "test-region-1", "METRIC_URL": "http://testurl.com", "S3_BUCKET": "scenariotestbucket", "SOLUTION_ID": "S0XXX", "VERSION": "testVersion", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "TestCustomResourceInfraCustomResourceLambdaRole03671AE8", "Arn", ], }, "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", }, "TestCustomResourceInfraCustomResourceLambdaRole03671AE8": Object { "Metadata": Object { "cfn_nag": Object { "rules_to_suppress": Array [ Object { "id": "W11", "reason": "iot:DescribeEndpoint and iot:DetachPrincipalPolicy cannot specify the resource.", }, ], }, }, "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "s3:GetObject", "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "testSourceCodeBucketC577B176", "Arn", ], }, "/*", ], ], }, }, Object { "Action": Array [ "s3:PutObject", "s3:DeleteObject", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":s3:::scenariotestbucket/*", ], ], }, }, Object { "Action": Array [ "dynamodb:PutItem", "dynamodb:DeleteItem", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":dynamodb:test-region-1:", Object { "Ref": "AWS::AccountId", }, ":table/scenarioTestTable", ], ], }, }, Object { "Action": Array [ "iot:DescribeEndpoint", "iot:DetachPrincipalPolicy", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": "iot:ListTargetsForPolicy", "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iot:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":policy/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "CustomResourcePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "TestCustomResourceInfraCustomResourceLambdaRoleDefaultPolicy46B2072F": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "s3:PutObject", "Effect": "Allow", "Resource": Array [ "test:console:bucket:arn", "test:console:bucket:arn/*", ], }, ], "Version": "2012-10-17", }, "PolicyName": "TestCustomResourceInfraCustomResourceLambdaRoleDefaultPolicy46B2072F", "Roles": Array [ Object { "Ref": "TestCustomResourceInfraCustomResourceLambdaRole03671AE8", }, ], }, "Type": "AWS::IAM::Policy", }, "TestPolicyCC05E598": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "cloudwatch:Get*", "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "TestPolicyCC05E598", "Roles": Array [ Object { "Ref": "TestCustomResourceInfraCustomResourceLambdaRole03671AE8", }, ], }, "Type": "AWS::IAM::Policy", }, "testSourceCodeBucketC577B176": Object { "DeletionPolicy": "Retain", "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, }, } `;