diff --git a/packages/@aws-cdk/app-delivery/test/integ.cicd.expected.json b/packages/@aws-cdk/app-delivery/test/integ.cicd.expected.json deleted file mode 100644 index fa3888cc26741..0000000000000 --- a/packages/@aws-cdk/app-delivery/test/integ.cicd.expected.json +++ /dev/null @@ -1,472 +0,0 @@ -{ - "Resources": { - "ArtifactBucket7410C9EF": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CodePipelineRoleB3A660B4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineRoleDefaultPolicy8D520A8D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodePipelineDeployChangeSetCodePipelineActionRoleB3BCDD8A", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "CodePipelineDeployExecuteCodePipelineActionRoleAE36AF49", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineRoleDefaultPolicy8D520A8D", - "Roles": [ - { - "Ref": "CodePipelineRoleB3A660B4" - } - ] - } - }, - "CodePipelineB74E5936": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineRoleB3A660B4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "ThirdParty", - "Provider": "GitHub", - "Version": "1" - }, - "Configuration": { - "Owner": "awslabs", - "Repo": "aws-cdk", - "Branch": "master", - "OAuthToken": "DummyToken", - "PollForSourceChanges": true - }, - "Name": "GitHub", - "OutputArtifacts": [ - { - "Name": "Artifact_CICDGitHubF8BA7ADD" - } - ], - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "CICD", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployChangeSetRoleF9F2B343", - "Arn" - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "CICD-ChangeSet", - "TemplatePath": "Artifact_CICDGitHubF8BA7ADD::CICD.template.json" - }, - "InputArtifacts": [ - { - "Name": "Artifact_CICDGitHubF8BA7ADD" - } - ], - "Name": "ChangeSet", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployChangeSetCodePipelineActionRoleB3BCDD8A", - "Arn" - ] - }, - "RunOrder": 10 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "CICD", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "CICD-ChangeSet" - }, - "Name": "Execute", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployExecuteCodePipelineActionRoleAE36AF49", - "Arn" - ] - }, - "RunOrder": 999 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "ArtifactBucket7410C9EF" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "CodePipelineRoleDefaultPolicy8D520A8D", - "CodePipelineRoleB3A660B4" - ] - }, - "CodePipelineDeployExecuteCodePipelineActionRoleAE36AF49": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployExecuteCodePipelineActionRoleDefaultPolicy2B66E78C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudformation:DescribeChangeSet", - "cloudformation:DescribeStacks", - "cloudformation:ExecuteChangeSet" - ], - "Condition": { - "StringEqualsIfExists": { - "cloudformation:ChangeSetName": "CICD-ChangeSet" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/CICD/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployExecuteCodePipelineActionRoleDefaultPolicy2B66E78C", - "Roles": [ - { - "Ref": "CodePipelineDeployExecuteCodePipelineActionRoleAE36AF49" - } - ] - } - }, - "CodePipelineDeployChangeSetCodePipelineActionRoleB3BCDD8A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployChangeSetCodePipelineActionRoleDefaultPolicy87FA0C1E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CodePipelineDeployChangeSetRoleF9F2B343", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "cloudformation:CreateChangeSet", - "cloudformation:DeleteChangeSet", - "cloudformation:DescribeChangeSet", - "cloudformation:DescribeStacks" - ], - "Condition": { - "StringEqualsIfExists": { - "cloudformation:ChangeSetName": "CICD-ChangeSet" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/CICD/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployChangeSetCodePipelineActionRoleDefaultPolicy87FA0C1E", - "Roles": [ - { - "Ref": "CodePipelineDeployChangeSetCodePipelineActionRoleB3BCDD8A" - } - ] - } - }, - "CodePipelineDeployChangeSetRoleF9F2B343": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployChangeSetRoleDefaultPolicy289820BE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployChangeSetRoleDefaultPolicy289820BE", - "Roles": [ - { - "Ref": "CodePipelineDeployChangeSetRoleF9F2B343" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.expected.json b/packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.expected.json deleted file mode 100644 index 2bd04571ffc91..0000000000000 --- a/packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.expected.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "Parameters": { - "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaS3Bucket83484C89": { - "Type": "String", - "Description": "S3 bucket for asset \"8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cda\"" - }, - "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaS3VersionKey70C0B407": { - "Type": "String", - "Description": "S3 key for asset version \"8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cda\"" - }, - "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaArtifactHash3A9285DE": { - "Type": "String", - "Description": "Artifact hash for asset \"8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cda\"" - }, - "AssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3Bucket3E112CA5": { - "Type": "String", - "Description": "S3 bucket for asset \"f4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6\"" - }, - "AssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3VersionKeyE9CF14C0": { - "Type": "String", - "Description": "S3 key for asset version \"f4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6\"" - }, - "AssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6ArtifactHash3B9A157C": { - "Type": "String", - "Description": "Artifact hash for asset \"f4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aS3Bucket0A5FA7C6": { - "Type": "String", - "Description": "S3 bucket for asset \"e3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8a\"" - }, - "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aS3VersionKey657A1204": { - "Type": "String", - "Description": "S3 key for asset version \"e3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8a\"" - }, - "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aArtifactHash065BBA17": { - "Type": "String", - "Description": "Artifact hash for asset \"e3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8a\"" - } - }, - "Resources": { - "AppRole1AF9B530": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "amplify.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppF1B96344": { - "Type": "AWS::Amplify::App", - "Properties": { - "Name": "App", - "BasicAuthConfig": { - "EnableBasicAuth": false - }, - "IAMServiceRole": { - "Fn::GetAtt": [ - "AppRole1AF9B530", - "Arn" - ] - } - } - }, - "AppmainF505BAED": { - "Type": "AWS::Amplify::Branch", - "Properties": { - "AppId": { - "Fn::GetAtt": [ - "AppF1B96344", - "AppId" - ] - }, - "BranchName": "main", - "EnableAutoBuild": true, - "EnablePullRequestPreview": true - } - }, - "AppmainDeploymentResource442DE93D": { - "Type": "Custom::AmplifyAssetDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcesamplifyassetdeploymentproviderNestedStackcomamazonawscdkcustomresourcesamplifyassetdeploymentproviderNestedStackResource89BDFEB2", - "Outputs.cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovideramplifyassetdeploymenthandlerproviderframeworkonEventC3C43E44Arn" - ] - }, - "AppId": { - "Fn::GetAtt": [ - "AppF1B96344", - "AppId" - ] - }, - "BranchName": "main", - "S3ObjectKey": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaS3VersionKey70C0B407" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaS3VersionKey70C0B407" - } - ] - } - ] - } - ] - ] - }, - "S3BucketName": { - "Ref": "AssetParameters8c89eadc6be22019c81ed6b9c7d9929ae10de55679fd8e0e9fd4c00f8edc1cdaS3Bucket83484C89" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "comamazonawscdkcustomresourcesamplifyassetdeploymentproviderNestedStackcomamazonawscdkcustomresourcesamplifyassetdeploymentproviderNestedStackResource89BDFEB2": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aS3Bucket0A5FA7C6" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aS3VersionKey657A1204" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse3304a59a46a1ac955511f11bdfe439a31c567da6faab8390ac987e9c9edff8aS3VersionKey657A1204" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetocdkamplifyappassetdeploymentAssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3Bucket3462E0F4Ref": { - "Ref": "AssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3Bucket3E112CA5" - }, - "referencetocdkamplifyappassetdeploymentAssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3VersionKey4934CDF2Ref": { - "Ref": "AssetParametersf4c3be09f3fcdd17ab851339f091bc78984d15e3f83e6883a31e2e034ad4cce6S3VersionKeyE9CF14C0" - }, - "referencetocdkamplifyappassetdeploymentAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket2F32F802Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetocdkamplifyappassetdeploymentAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey3B80829BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json b/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json deleted file mode 100644 index 740a646d60a12..0000000000000 --- a/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "integ-amplify-app" - } - }, - "AppRole1AF9B530": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "amplify.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppRoleDefaultPolicy9CADBAA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codecommit:GitPull", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AppRoleDefaultPolicy9CADBAA1", - "Roles": [ - { - "Ref": "AppRole1AF9B530" - } - ] - } - }, - "AppF1B96344": { - "Type": "AWS::Amplify::App", - "Properties": { - "Name": "App", - "BasicAuthConfig": { - "EnableBasicAuth": false - }, - "IAMServiceRole": { - "Fn::GetAtt": [ - "AppRole1AF9B530", - "Arn" - ] - }, - "Repository": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "CloneUrlHttp" - ] - } - } - }, - "Appmaster71597E87": { - "Type": "AWS::Amplify::Branch", - "Properties": { - "AppId": { - "Fn::GetAtt": [ - "AppF1B96344", - "AppId" - ] - }, - "BranchName": "master", - "EnableAutoBuild": true, - "EnablePullRequestPreview": true - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json b/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json deleted file mode 100644 index bd8f69d9f66d8..0000000000000 --- a/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "Resources": { - "AppRole1AF9B530": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "amplify.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppAppBasicAuthE743F015": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"aws\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AppF1B96344": { - "Type": "AWS::Amplify::App", - "Properties": { - "Name": "App", - "AutoBranchCreationConfig": { - "BasicAuthConfig": { - "EnableBasicAuth": false - }, - "EnableAutoBranchCreation": true, - "EnableAutoBuild": true, - "EnablePullRequestPreview": true - }, - "BasicAuthConfig": { - "EnableBasicAuth": true, - "Password": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "AppAppBasicAuthE743F015" - }, - ":SecretString:password::}}" - ] - ] - }, - "Username": "aws" - }, - "CustomHeaders": "customHeaders:\n - pattern: \"*.json\"\n headers:\n - key: custom-header-name-1\n value: custom-header-value-1\n - key: custom-header-name-2\n value: custom-header-value-2\n - pattern: /path/*\n headers:\n - key: custom-header-name-1\n value: custom-header-value-2\n", - "CustomRules": [ - { - "Source": "/source", - "Target": "/target" - } - ], - "IAMServiceRole": { - "Fn::GetAtt": [ - "AppRole1AF9B530", - "Arn" - ] - } - } - }, - "Appmaster71597E87": { - "Type": "AWS::Amplify::Branch", - "Properties": { - "AppId": { - "Fn::GetAtt": [ - "AppF1B96344", - "AppId" - ] - }, - "BranchName": "master", - "EnableAutoBuild": true, - "EnablePullRequestPreview": true, - "EnvironmentVariables": [ - { - "Name": "key", - "Value": "value" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.expected.json deleted file mode 100644 index 085243d4b61ec..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.expected.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "Resources": { - "UserPool6BA7E5F2": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myauthorizer23CB99DD": { - "Type": "AWS::ApiGateway::Authorizer", - "Properties": { - "Name": "CognitoUserPoolsAuthorizerIntegmyauthorizer10C804C1", - "RestApiId": { - "Ref": "myrestapi551C8392" - }, - "Type": "COGNITO_USER_POOLS", - "IdentitySource": "method.request.header.Authorization", - "ProviderARNs": [ - { - "Fn::GetAtt": [ - "UserPool6BA7E5F2", - "Arn" - ] - } - ] - } - }, - "myrestapi551C8392": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "myrestapi" - } - }, - "myrestapiCloudWatchRoleC48DA1DD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "myrestapiAccountA49A05BE": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "myrestapiCloudWatchRoleC48DA1DD", - "Arn" - ] - } - }, - "DependsOn": [ - "myrestapi551C8392" - ] - }, - "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "myrestapi551C8392" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "myrestapiANY94B0497F" - ] - }, - "myrestapiDeploymentStageprodA9250EA4": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "myrestapi551C8392" - }, - "DeploymentId": { - "Ref": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a" - }, - "StageName": "prod" - }, - "DependsOn": [ - "myrestapiAccountA49A05BE" - ] - }, - "myrestapiANY94B0497F": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "myrestapi551C8392", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "myrestapi551C8392" - }, - "AuthorizationType": "COGNITO_USER_POOLS", - "AuthorizerId": { - "Ref": "myauthorizer23CB99DD" - }, - "Integration": { - "IntegrationResponses": [ - { - "StatusCode": "200" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": "{ \"statusCode\": 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "StatusCode": "200" - } - ] - } - } - }, - "Outputs": { - "myrestapiEndpointE06F9D98": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myrestapi551C8392" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myrestapiDeploymentStageprodA9250EA4" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json deleted file mode 100644 index 981f02ebed888..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.expected.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "Resources": { - "MyAuthorizerFunctionServiceRole8A34C19E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyAuthorizerFunction70F1223E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0S3BucketD7637C1B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0S3VersionKeyC19FD924" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0S3VersionKeyC19FD924" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "MyAuthorizerFunctionServiceRole8A34C19E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyAuthorizerFunctionServiceRole8A34C19E" - ] - }, - "MyAuthorizerFunctionRequestAuthorizerIntegMyAuthorizer5D9D41C5PermissionsCB8B246E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyRestApi2D1F47A9" - }, - "/authorizers/", - { - "Ref": "MyAuthorizer6575980E" - } - ] - ] - } - } - }, - "MyRestApi2D1F47A9": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "MyRestApi" - } - }, - "MyRestApiCloudWatchRoleD4042E8E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "MyRestApiAccount2FB6DB7A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "MyRestApiCloudWatchRoleD4042E8E", - "Arn" - ] - } - }, - "DependsOn": [ - "MyRestApi2D1F47A9" - ] - }, - "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "MyRestApiANY05143F93" - ] - }, - "MyRestApiDeploymentStageprodC33B8E5F": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" - }, - "StageName": "prod" - }, - "DependsOn": [ - "MyRestApiAccount2FB6DB7A" - ] - }, - "MyRestApiANY05143F93": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "MyRestApi2D1F47A9", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "AuthorizationType": "CUSTOM", - "AuthorizerId": { - "Ref": "MyAuthorizer6575980E" - }, - "Integration": { - "IntegrationResponses": [ - { - "StatusCode": "200" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": "{ \"statusCode\": 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "StatusCode": "200" - } - ] - } - }, - "MyAuthorizer6575980E": { - "Type": "AWS::ApiGateway::Authorizer", - "Properties": { - "Name": "RequestAuthorizerIntegMyAuthorizer5D9D41C5", - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Type": "REQUEST", - "AuthorizerUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":apigateway:", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "IdentitySource": "method.request.header.Authorization,method.request.querystring.allow" - } - } - }, - "Parameters": { - "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0S3BucketD7637C1B": { - "Type": "String", - "Description": "S3 bucket for asset \"3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0\"" - }, - "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0S3VersionKeyC19FD924": { - "Type": "String", - "Description": "S3 key for asset version \"3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0\"" - }, - "AssetParameters3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0ArtifactHash9DF43F02": { - "Type": "String", - "Description": "Artifact hash for asset \"3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0\"" - } - }, - "Outputs": { - "MyRestApiEndpoint4C55E4CB": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyRestApi2D1F47A9" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyRestApiDeploymentStageprodC33B8E5F" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.expected.json deleted file mode 100644 index d5cca0c564f32..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.expected.json +++ /dev/null @@ -1,370 +0,0 @@ -{ - "Resources": { - "MyAuthorizerFunctionServiceRole8A34C19E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyAuthorizerFunction70F1223E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3Bucket2E551A38" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "MyAuthorizerFunctionServiceRole8A34C19E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyAuthorizerFunctionServiceRole8A34C19E" - ] - }, - "authorizerRole06E70703": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyAuthorizer6575980E": { - "Type": "AWS::ApiGateway::Authorizer", - "Properties": { - "Name": "TokenAuthorizerIAMRoleIntegMyAuthorizer1DFDE3B5", - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Type": "TOKEN", - "AuthorizerCredentials": { - "Fn::GetAtt": [ - "authorizerRole06E70703", - "Arn" - ] - }, - "AuthorizerUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":apigateway:", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "IdentitySource": "method.request.header.Authorization" - } - }, - "MyAuthorizerauthorizerInvokePolicy0F88B8E1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyAuthorizerauthorizerInvokePolicy0F88B8E1", - "Roles": [ - { - "Ref": "authorizerRole06E70703" - } - ] - } - }, - "MyRestApi2D1F47A9": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "MyRestApi" - } - }, - "MyRestApiCloudWatchRoleD4042E8E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "MyRestApiAccount2FB6DB7A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "MyRestApiCloudWatchRoleD4042E8E", - "Arn" - ] - } - }, - "DependsOn": [ - "MyRestApi2D1F47A9" - ] - }, - "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "MyRestApiANY05143F93" - ] - }, - "MyRestApiDeploymentStageprodC33B8E5F": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" - }, - "StageName": "prod" - }, - "DependsOn": [ - "MyRestApiAccount2FB6DB7A" - ] - }, - "MyRestApiANY05143F93": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "MyRestApi2D1F47A9", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "AuthorizationType": "CUSTOM", - "AuthorizerId": { - "Ref": "MyAuthorizer6575980E" - }, - "Integration": { - "IntegrationResponses": [ - { - "StatusCode": "200" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": "{ \"statusCode\": 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "StatusCode": "200" - } - ] - } - } - }, - "Parameters": { - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3Bucket2E551A38": { - "Type": "String", - "Description": "S3 bucket for asset \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - }, - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621": { - "Type": "String", - "Description": "S3 key for asset version \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - }, - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3ArtifactHashD7A29DA9": { - "Type": "String", - "Description": "Artifact hash for asset \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - } - }, - "Outputs": { - "MyRestApiEndpoint4C55E4CB": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyRestApi2D1F47A9" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyRestApiDeploymentStageprodC33B8E5F" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json deleted file mode 100644 index 237a238eefcaa..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.expected.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "Resources": { - "MyAuthorizerFunctionServiceRole8A34C19E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyAuthorizerFunction70F1223E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3Bucket2E551A38" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "MyAuthorizerFunctionServiceRole8A34C19E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyAuthorizerFunctionServiceRole8A34C19E" - ] - }, - "MyAuthorizerFunctionTokenAuthorizerIntegMyAuthorizer793B1D5FPermissions7557AE26": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyRestApi2D1F47A9" - }, - "/authorizers/", - { - "Ref": "MyAuthorizer6575980E" - } - ] - ] - } - } - }, - "MyRestApi2D1F47A9": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "MyRestApi" - } - }, - "MyRestApiCloudWatchRoleD4042E8E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "MyRestApiAccount2FB6DB7A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "MyRestApiCloudWatchRoleD4042E8E", - "Arn" - ] - } - }, - "DependsOn": [ - "MyRestApi2D1F47A9" - ] - }, - "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "MyRestApiANY05143F93" - ] - }, - "MyRestApiDeploymentStageprodC33B8E5F": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" - }, - "StageName": "prod" - }, - "DependsOn": [ - "MyRestApiAccount2FB6DB7A" - ] - }, - "MyRestApiANY05143F93": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "MyRestApi2D1F47A9", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "AuthorizationType": "CUSTOM", - "AuthorizerId": { - "Ref": "MyAuthorizer6575980E" - }, - "Integration": { - "IntegrationResponses": [ - { - "StatusCode": "200" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": "{ \"statusCode\": 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "StatusCode": "200" - } - ] - } - }, - "MyAuthorizer6575980E": { - "Type": "AWS::ApiGateway::Authorizer", - "Properties": { - "Name": "TokenAuthorizerIntegMyAuthorizer793B1D5F", - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Type": "TOKEN", - "AuthorizerUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":apigateway:", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - } - ] - } - ] - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyAuthorizerFunction70F1223E", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "IdentitySource": "method.request.header.Authorization" - } - } - }, - "Parameters": { - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3Bucket2E551A38": { - "Type": "String", - "Description": "S3 bucket for asset \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - }, - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3S3VersionKeyE54FD621": { - "Type": "String", - "Description": "S3 key for asset version \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - }, - "AssetParametersfec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3ArtifactHashD7A29DA9": { - "Type": "String", - "Description": "Artifact hash for asset \"fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3\"" - } - }, - "Outputs": { - "MyRestApiEndpoint4C55E4CB": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyRestApi2D1F47A9" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyRestApiDeploymentStageprodC33B8E5F" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.asset.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.asset.expected.json deleted file mode 100644 index 8946e415c6874..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.asset.expected.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "Resources": { - "myapi4C7BF186": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "BodyS3Location": { - "Bucket": { - "Ref": "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3Bucket42039E29" - }, - "Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3VersionKeyB590532F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3VersionKeyB590532F" - } - ] - } - ] - } - ] - ] - } - }, - "Name": "my-api" - } - }, - "myapibooks51D54548": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "myapi4C7BF186", - "RootResourceId" - ] - }, - "PathPart": "books", - "RestApiId": { - "Ref": "myapi4C7BF186" - } - } - }, - "myapibooksGETD6B2F597": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "myapibooks51D54548" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationResponses": [ - { - "StatusCode": "200" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": "{ \"statusCode\": 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "StatusCode": "200" - } - ] - } - }, - "myapiDeployment92F2CB49fe116fef7f552ff0fc433c9aa3930d2f": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "myapibooksGETD6B2F597", - "myapibooks51D54548" - ] - }, - "myapiDeploymentStageprod298F01AF": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "DeploymentId": { - "Ref": "myapiDeployment92F2CB49fe116fef7f552ff0fc433c9aa3930d2f" - }, - "StageName": "prod" - } - }, - "myapiCloudWatchRole095452E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "myapiAccountEC421A0A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "myapiCloudWatchRole095452E5", - "Arn" - ] - } - }, - "DependsOn": [ - "myapi4C7BF186" - ] - } - }, - "Outputs": { - "myapiEndpoint3628AFE3": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/" - ] - ] - } - }, - "PetsURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/pets" - ] - ] - } - }, - "BooksURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/books" - ] - ] - } - } - }, - "Parameters": { - "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3Bucket42039E29": { - "Type": "String", - "Description": "S3 bucket for asset \"68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb\"" - }, - "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3VersionKeyB590532F": { - "Type": "String", - "Description": "S3 key for asset version \"68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb\"" - }, - "AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbArtifactHashA9C91B6D": { - "Type": "String", - "Description": "Artifact hash for asset \"68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.inline.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.inline.expected.json deleted file mode 100644 index e319d4fb28ccd..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.api-definition.inline.expected.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "Resources": { - "myapi4C7BF186": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Body": { - "openapi": "3.0.2", - "info": { - "version": "1.0.0", - "title": "Test API for CDK" - }, - "paths": { - "/pets": { - "get": { - "summary": "Test Method", - "operationId": "testMethod", - "responses": { - "200": { - "description": "A paged array of pets", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "x-amazon-apigateway-integration": { - "responses": { - "default": { - "statusCode": "200" - } - }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "passthroughBehavior": "when_no_match", - "type": "mock" - } - } - } - }, - "components": { - "schemas": { - "Empty": { - "title": "Empty Schema", - "type": "object" - } - } - } - }, - "Name": "my-api" - } - }, - "myapiDeployment92F2CB49a59bca458e4fac1fcd742212ded42a65": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "Description": "Automatically created by the RestApi construct" - } - }, - "myapiDeploymentStageprod298F01AF": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "DeploymentId": { - "Ref": "myapiDeployment92F2CB49a59bca458e4fac1fcd742212ded42a65" - }, - "StageName": "prod" - } - }, - "myapiCloudWatchRole095452E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "myapiAccountEC421A0A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "myapiCloudWatchRole095452E5", - "Arn" - ] - } - }, - "DependsOn": [ - "myapi4C7BF186" - ] - } - }, - "Outputs": { - "myapiEndpoint3628AFE3": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/" - ] - ] - } - }, - "PetsURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/pets" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.cors.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.cors.expected.json deleted file mode 100644 index 02d757e898afe..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.cors.expected.json +++ /dev/null @@ -1,626 +0,0 @@ -{ - "Resources": { - "corsapitest8682546E": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "cors-api-test" - } - }, - "corsapitestCloudWatchRole9AF5A81A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "corsapitestAccount7D1D6854": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "corsapitestCloudWatchRole9AF5A81A", - "Arn" - ] - } - }, - "DependsOn": [ - "corsapitest8682546E" - ] - }, - "corsapitestDeployment2BF1633A51392cbce1ac2785bd0e53063423e203": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "corsapitesttwitchDELETEB4C94228", - "corsapitesttwitchGET4270341B", - "corsapitesttwitchOPTIONSE5EEB527", - "corsapitesttwitchPOSTB52CFB02", - "corsapitesttwitch0E3D1559" - ] - }, - "corsapitestDeploymentStageprod8F31F2AB": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "DeploymentId": { - "Ref": "corsapitestDeployment2BF1633A51392cbce1ac2785bd0e53063423e203" - }, - "StageName": "prod" - }, - "DependsOn": [ - "corsapitestAccount7D1D6854" - ] - }, - "corsapitesttwitch0E3D1559": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "corsapitest8682546E", - "RootResourceId" - ] - }, - "PathPart": "twitch", - "RestApiId": { - "Ref": "corsapitest8682546E" - } - } - }, - "corsapitesttwitchGETApiPermissioncorstwitchtestcorsapitest1E81FF74GETtwitchDD74718A": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/", - { - "Ref": "corsapitestDeploymentStageprod8F31F2AB" - }, - "/GET/twitch" - ] - ] - } - } - }, - "corsapitesttwitchGETApiPermissionTestcorstwitchtestcorsapitest1E81FF74GETtwitch730CD01F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/test-invoke-stage/GET/twitch" - ] - ] - } - } - }, - "corsapitesttwitchGET4270341B": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "corsapitesttwitch0E3D1559" - }, - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "corsapitesttwitchPOSTApiPermissioncorstwitchtestcorsapitest1E81FF74POSTtwitchD6548E1B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/", - { - "Ref": "corsapitestDeploymentStageprod8F31F2AB" - }, - "/POST/twitch" - ] - ] - } - } - }, - "corsapitesttwitchPOSTApiPermissionTestcorstwitchtestcorsapitest1E81FF74POSTtwitch9C9C1E14": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/test-invoke-stage/POST/twitch" - ] - ] - } - } - }, - "corsapitesttwitchPOSTB52CFB02": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "POST", - "ResourceId": { - "Ref": "corsapitesttwitch0E3D1559" - }, - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "corsapitesttwitchDELETEApiPermissioncorstwitchtestcorsapitest1E81FF74DELETEtwitch2AF8A510": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/", - { - "Ref": "corsapitestDeploymentStageprod8F31F2AB" - }, - "/DELETE/twitch" - ] - ] - } - } - }, - "corsapitesttwitchDELETEApiPermissionTestcorstwitchtestcorsapitest1E81FF74DELETEtwitch0CD7A81B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "corsapitest8682546E" - }, - "/test-invoke-stage/DELETE/twitch" - ] - ] - } - } - }, - "corsapitesttwitchDELETEB4C94228": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "DELETE", - "ResourceId": { - "Ref": "corsapitesttwitch0E3D1559" - }, - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "handlerE1533BD5", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "corsapitesttwitchOPTIONSE5EEB527": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "OPTIONS", - "ResourceId": { - "Ref": "corsapitesttwitch0E3D1559" - }, - "RestApiId": { - "Ref": "corsapitest8682546E" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationResponses": [ - { - "ResponseParameters": { - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", - "method.response.header.Access-Control-Allow-Origin": "'https://google.com'", - "method.response.header.Vary": "'Origin'", - "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'" - }, - "ResponseTemplates": { - "application/json": "#set($origin = $input.params().header.get(\"Origin\"))\n#if($origin == \"\") #set($origin = $input.params().header.get(\"origin\")) #end\n#if($origin.matches(\"https://www.test-cors.org\"))\n #set($context.responseOverride.header.Access-Control-Allow-Origin = $origin)\n#end" - }, - "StatusCode": "204" - } - ], - "RequestTemplates": { - "application/json": "{ statusCode: 200 }" - }, - "Type": "MOCK" - }, - "MethodResponses": [ - { - "ResponseParameters": { - "method.response.header.Access-Control-Allow-Headers": true, - "method.response.header.Access-Control-Allow-Origin": true, - "method.response.header.Vary": true, - "method.response.header.Access-Control-Allow-Methods": true - }, - "StatusCode": "204" - } - ] - } - }, - "handlerServiceRole187D5A5A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "handlerE1533BD5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fS3BucketE85F411C" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fS3VersionKeyF02404BC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fS3VersionKeyF02404BC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "handlerServiceRole187D5A5A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "handlerServiceRole187D5A5A" - ] - } - }, - "Outputs": { - "corsapitestEndpointE63606AE": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "corsapitest8682546E" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "corsapitestDeploymentStageprod8F31F2AB" - }, - "/" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fS3BucketE85F411C": { - "Type": "String", - "Description": "S3 bucket for asset \"c7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4f\"" - }, - "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fS3VersionKeyF02404BC": { - "Type": "String", - "Description": "S3 key for asset version \"c7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4f\"" - }, - "AssetParametersc7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4fArtifactHash6742F1C9": { - "Type": "String", - "Description": "Artifact hash for asset \"c7bba0d9d477c86c6dc2adb0eb95842634a1c040dd3a66b42eec2bb604644d4f\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.lambda-api.latebound-deploymentstage.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.lambda-api.latebound-deploymentstage.expected.json deleted file mode 100644 index 93d1c97217aa0..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.lambda-api.latebound-deploymentstage.expected.json +++ /dev/null @@ -1,386 +0,0 @@ -{ - "Resources": { - "myfnServiceRole7822DC24": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myfn8C66D016": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "myfnServiceRole7822DC24", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "myfnServiceRole7822DC24" - ] - }, - "lambdarestapiF559E4F2": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "lambdarestapi" - } - }, - "lambdarestapiCloudWatchRoleA142878F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "lambdarestapiAccount856938D8": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "lambdarestapiCloudWatchRoleA142878F", - "Arn" - ] - } - }, - "DependsOn": [ - "lambdarestapiF559E4F2" - ] - }, - "lambdarestapiproxyB0E963B7": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "lambdarestapiF559E4F2", - "RootResourceId" - ] - }, - "PathPart": "{proxy+}", - "RestApiId": { - "Ref": "lambdarestapiF559E4F2" - } - } - }, - "lambdarestapiproxyANYApiPermissionLateBoundDeploymentStageStacklambdarestapiCE6017F6ANYproxy2C5460ED": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "lambdarestapiF559E4F2" - }, - "/", - { - "Ref": "stage0661E4AC" - }, - "/*/*" - ] - ] - } - } - }, - "lambdarestapiproxyANYApiPermissionTestLateBoundDeploymentStageStacklambdarestapiCE6017F6ANYproxyCC4F6BB2": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "lambdarestapiF559E4F2" - }, - "/test-invoke-stage/*/*" - ] - ] - } - } - }, - "lambdarestapiproxyANYC900233F": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Ref": "lambdarestapiproxyB0E963B7" - }, - "RestApiId": { - "Ref": "lambdarestapiF559E4F2" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "lambdarestapiANYApiPermissionLateBoundDeploymentStageStacklambdarestapiCE6017F6ANY35688E13": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "lambdarestapiF559E4F2" - }, - "/", - { - "Ref": "stage0661E4AC" - }, - "/*/" - ] - ] - } - } - }, - "lambdarestapiANYApiPermissionTestLateBoundDeploymentStageStacklambdarestapiCE6017F6ANY239CFD70": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "lambdarestapiF559E4F2" - }, - "/test-invoke-stage/*/" - ] - ] - } - } - }, - "lambdarestapiANYB9BB3FB2": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "lambdarestapiF559E4F2", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "lambdarestapiF559E4F2" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "myfn8C66D016", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "deployment3338197541aef5f15bf9a60b10e06fdbe72854f4": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "lambdarestapiF559E4F2" - } - }, - "DependsOn": [ - "lambdarestapiproxyANYC900233F", - "lambdarestapiANYB9BB3FB2" - ] - }, - "stage0661E4AC": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "lambdarestapiF559E4F2" - }, - "DeploymentId": { - "Ref": "deployment3338197541aef5f15bf9a60b10e06fdbe72854f4" - }, - "StageName": "prod" - }, - "DependsOn": [ - "lambdarestapiAccount856938D8" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi-import.lit.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi-import.lit.expected.json deleted file mode 100644 index 54805c9f2e682..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi-import.lit.expected.json +++ /dev/null @@ -1,340 +0,0 @@ -{ - "Resources": { - "RestApi0C43BF4B": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "RestApi" - } - }, - "RestApiCloudWatchRoleE3ED6605": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "RestApiAccount7C83CF5A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "RestApiCloudWatchRoleE3ED6605", - "Arn" - ] - } - }, - "DependsOn": [ - "RestApi0C43BF4B" - ] - }, - "RestApiANYA7C1DC94": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "RestApi0C43BF4B", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "RestApi0C43BF4B" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - }, - "integrestapiimportPetsStackNestedStackintegrestapiimportPetsStackNestedStackResource2B31898B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efS3BucketFE7B8A1B" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efS3VersionKeyB80604FE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efS3VersionKeyB80604FE" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetointegrestapiimportRootStackRestApi2647DA4CRootResourceId": { - "Fn::GetAtt": [ - "RestApi0C43BF4B", - "RootResourceId" - ] - }, - "referencetointegrestapiimportRootStackRestApi2647DA4CRef": { - "Ref": "RestApi0C43BF4B" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrestapiimportBooksStackNestedStackintegrestapiimportBooksStackNestedStackResource395C2C9B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141S3Bucket74F8A623" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141S3VersionKeyC855AC3B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141S3VersionKeyC855AC3B" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetointegrestapiimportRootStackRestApi2647DA4CRootResourceId": { - "Fn::GetAtt": [ - "RestApi0C43BF4B", - "RootResourceId" - ] - }, - "referencetointegrestapiimportRootStackRestApi2647DA4CRef": { - "Ref": "RestApi0C43BF4B" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrestapiimportDeployStackNestedStackintegrestapiimportDeployStackNestedStackResource0D0EE737": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abS3BucketADE4C6AE" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abS3VersionKeyF36B0062" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abS3VersionKeyF36B0062" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetointegrestapiimportRootStackRestApi2647DA4CRef": { - "Ref": "RestApi0C43BF4B" - } - } - }, - "DependsOn": [ - "integrestapiimportBooksStackNestedStackintegrestapiimportBooksStackNestedStackResource395C2C9B", - "integrestapiimportPetsStackNestedStackintegrestapiimportPetsStackNestedStackResource2B31898B" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "PetsURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "RestApi0C43BF4B" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/prod/pets" - ] - ] - } - }, - "BooksURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "RestApi0C43BF4B" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/prod/books" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efS3BucketFE7B8A1B": { - "Type": "String", - "Description": "S3 bucket for asset \"c6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1ef\"" - }, - "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efS3VersionKeyB80604FE": { - "Type": "String", - "Description": "S3 key for asset version \"c6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1ef\"" - }, - "AssetParametersc6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1efArtifactHashED1A6259": { - "Type": "String", - "Description": "Artifact hash for asset \"c6464ef3a9925cfe5c28d912ee7fc0952eb5135b281419c8d450a3aa8825e1ef\"" - }, - "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141S3Bucket74F8A623": { - "Type": "String", - "Description": "S3 bucket for asset \"480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141\"" - }, - "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141S3VersionKeyC855AC3B": { - "Type": "String", - "Description": "S3 key for asset version \"480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141\"" - }, - "AssetParameters480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141ArtifactHash1198374C": { - "Type": "String", - "Description": "Artifact hash for asset \"480caddfb9aa669df64905982e75c672d967ce9d9ed261ee8c73f6bdcaf97141\"" - }, - "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abS3BucketADE4C6AE": { - "Type": "String", - "Description": "S3 bucket for asset \"04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86ab\"" - }, - "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abS3VersionKeyF36B0062": { - "Type": "String", - "Description": "S3 key for asset version \"04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86ab\"" - }, - "AssetParameters04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86abArtifactHash6DD5E125": { - "Type": "String", - "Description": "Artifact hash for asset \"04407a85c5bf6d4da110e25ee35b1f67903f760cd7835965518b0f7ad37e86ab\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.expected.json deleted file mode 100644 index a6e2e2830cbb5..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.expected.json +++ /dev/null @@ -1,886 +0,0 @@ -{ - "Resources": { - "BooksHandlerServiceRole5B6A8847": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BooksHandler3EB83358": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function echoHandlerCode(event, _, callback) {\n return callback(undefined, {\n isBase64Encoded: false,\n statusCode: 200,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(event),\n });\n}" - }, - "Role": { - "Fn::GetAtt": [ - "BooksHandlerServiceRole5B6A8847", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "BooksHandlerServiceRole5B6A8847" - ] - }, - "BookHandlerServiceRole894768AD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BookHandlerF9638A7A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function echoHandlerCode(event, _, callback) {\n return callback(undefined, {\n isBase64Encoded: false,\n statusCode: 200,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(event),\n });\n}" - }, - "Role": { - "Fn::GetAtt": [ - "BookHandlerServiceRole894768AD", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "BookHandlerServiceRole894768AD" - ] - }, - "HelloServiceRole1E55EA16": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Hello4A628BD4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function helloCode(_event, _context, callback) {\n return callback(undefined, {\n statusCode: 200,\n body: 'hello, world!',\n });\n}" - }, - "Role": { - "Fn::GetAtt": [ - "HelloServiceRole1E55EA16", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HelloServiceRole1E55EA16" - ] - }, - "booksapiE1885304": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "books-api" - } - }, - "booksapiCloudWatchRole089CB225": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "booksapiAccountDBA98FB9": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "booksapiCloudWatchRole089CB225", - "Arn" - ] - } - }, - "DependsOn": [ - "booksapiE1885304" - ] - }, - "booksapiDeployment308B08F132cc25cf8168bd5e99b9e6d4915866b5": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "booksapiANYF4F0CDEB", - "booksapibooksbookidDELETE214F4059", - "booksapibooksbookidGETCCE21986", - "booksapibooksbookid5264BCA2", - "booksapibooksGETA776447A", - "booksapibooksPOSTF6C6559D", - "booksapibooks97D84727" - ] - }, - "booksapiDeploymentStageprod55D8E03E": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "DeploymentId": { - "Ref": "booksapiDeployment308B08F132cc25cf8168bd5e99b9e6d4915866b5" - }, - "StageName": "prod" - }, - "DependsOn": [ - "booksapiAccountDBA98FB9" - ] - }, - "booksapiANYApiPermissionrestapibooksexamplebooksapi4538F335ANY73B3CDDC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/*/" - ] - ] - } - } - }, - "booksapiANYApiPermissionTestrestapibooksexamplebooksapi4538F335ANYB0D7D8AC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/test-invoke-stage/*/" - ] - ] - } - } - }, - "booksapiANYF4F0CDEB": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "booksapiE1885304", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "booksapibooks97D84727": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "booksapiE1885304", - "RootResourceId" - ] - }, - "PathPart": "books", - "RestApiId": { - "Ref": "booksapiE1885304" - } - } - }, - "booksapibooksGETApiPermissionrestapibooksexamplebooksapi4538F335GETbooks391776D8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/GET/books" - ] - ] - } - } - }, - "booksapibooksGETApiPermissionTestrestapibooksexamplebooksapi4538F335GETbooks01FB3D1B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/test-invoke-stage/GET/books" - ] - ] - } - } - }, - "booksapibooksGETA776447A": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "booksapibooks97D84727" - }, - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "AuthorizationType": "AWS_IAM", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "booksapibooksPOSTApiPermissionrestapibooksexamplebooksapi4538F335POSTbooksDFEC643F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/POST/books" - ] - ] - } - } - }, - "booksapibooksPOSTApiPermissionTestrestapibooksexamplebooksapi4538F335POSTbooks1C6D24C8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/test-invoke-stage/POST/books" - ] - ] - } - } - }, - "booksapibooksPOSTF6C6559D": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "POST", - "ResourceId": { - "Ref": "booksapibooks97D84727" - }, - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "AuthorizationType": "AWS_IAM", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "BooksHandler3EB83358", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "booksapibooksbookid5264BCA2": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Ref": "booksapibooks97D84727" - }, - "PathPart": "{book_id}", - "RestApiId": { - "Ref": "booksapiE1885304" - } - } - }, - "booksapibooksbookidGETApiPermissionrestapibooksexamplebooksapi4538F335GETbooksbookidBB91DFBD": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/GET/books/*" - ] - ] - } - } - }, - "booksapibooksbookidGETApiPermissionTestrestapibooksexamplebooksapi4538F335GETbooksbookidA0230B08": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/test-invoke-stage/GET/books/*" - ] - ] - } - } - }, - "booksapibooksbookidGETCCE21986": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "booksapibooksbookid5264BCA2" - }, - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "AuthorizationType": "AWS_IAM", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "booksapibooksbookidDELETEApiPermissionrestapibooksexamplebooksapi4538F335DELETEbooksbookid76C1C947": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/DELETE/books/*" - ] - ] - } - } - }, - "booksapibooksbookidDELETEApiPermissionTestrestapibooksexamplebooksapi4538F335DELETEbooksbookid09D6CB8A": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "booksapiE1885304" - }, - "/test-invoke-stage/DELETE/books/*" - ] - ] - } - } - }, - "booksapibooksbookidDELETE214F4059": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "DELETE", - "ResourceId": { - "Ref": "booksapibooksbookid5264BCA2" - }, - "RestApiId": { - "Ref": "booksapiE1885304" - }, - "AuthorizationType": "AWS_IAM", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "BookHandlerF9638A7A", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - } - }, - "Outputs": { - "booksapiEndpointE230E8D5": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "booksapiE1885304" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "booksapiDeploymentStageprod55D8E03E" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.defaults.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.defaults.expected.json deleted file mode 100644 index 5ff84c1dc8c5e..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.defaults.expected.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "Resources": { - "myapi4C7BF186": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "my-api" - } - }, - "myapiCloudWatchRole095452E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "myapiAccountEC421A0A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "myapiCloudWatchRole095452E5", - "Arn" - ] - } - }, - "DependsOn": [ - "myapi4C7BF186" - ] - }, - "myapiDeployment92F2CB4972a890db5063ec679071ba7eefc76f2a": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "myapiGETF990CE3C" - ] - }, - "myapiDeploymentStageprod298F01AF": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "DeploymentId": { - "Ref": "myapiDeployment92F2CB4972a890db5063ec679071ba7eefc76f2a" - }, - "StageName": "prod" - }, - "DependsOn": [ - "myapiAccountEC421A0A" - ] - }, - "myapiGETF990CE3C": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Fn::GetAtt": [ - "myapi4C7BF186", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - } - }, - "Outputs": { - "myapiEndpoint3628AFE3": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStageprod298F01AF" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json deleted file mode 100644 index 28814e9651273..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json +++ /dev/null @@ -1,700 +0,0 @@ -{ - "Resources": { - "myapi4C7BF186": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "my-api" - } - }, - "myapiCloudWatchRole095452E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "myapiAccountEC421A0A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "myapiCloudWatchRole095452E5", - "Arn" - ] - } - }, - "DependsOn": [ - "myapi4C7BF186" - ] - }, - "myapiDeployment92F2CB4963d40685c54c6f8da21d80a83f16d3d5": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "myapiv1appliancesGET8FE872EC", - "myapiv1appliances507FEFF4", - "myapiv1booksGETC6B996D0", - "myapiv1booksPOST53E2832E", - "myapiv1books1D4BE6C1", - "myapiv113487378", - "myapiv1toysGET7348114D", - "myapiv1toysPOST55128058", - "myapiv1toysPUT59AFBBC2", - "myapiv1toysA55FCBC4" - ], - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myapiDeploymentStagebeta96434BEB": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "CacheClusterEnabled": true, - "CacheClusterSize": "0.5", - "DeploymentId": { - "Ref": "myapiDeployment92F2CB4963d40685c54c6f8da21d80a83f16d3d5" - }, - "Description": "beta stage", - "MethodSettings": [ - { - "DataTraceEnabled": true, - "HttpMethod": "*", - "LoggingLevel": "INFO", - "ResourcePath": "/*" - }, - { - "CachingEnabled": true, - "DataTraceEnabled": false, - "HttpMethod": "GET", - "ResourcePath": "/~1api~1appliances" - } - ], - "StageName": "beta" - }, - "DependsOn": [ - "myapiAccountEC421A0A" - ] - }, - "myapiv113487378": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "myapi4C7BF186", - "RootResourceId" - ] - }, - "PathPart": "v1", - "RestApiId": { - "Ref": "myapi4C7BF186" - } - } - }, - "myapiv1toysA55FCBC4": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Ref": "myapiv113487378" - }, - "PathPart": "toys", - "RestApiId": { - "Ref": "myapi4C7BF186" - } - } - }, - "myapiv1toysGETApiPermissiontestapigatewayrestapimyapi1AE401C4GETv1toysA829D1CC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/", - { - "Ref": "myapiDeploymentStagebeta96434BEB" - }, - "/GET/v1/toys" - ] - ] - } - } - }, - "myapiv1toysGETApiPermissionTesttestapigatewayrestapimyapi1AE401C4GETv1toys9E0BAE9F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/test-invoke-stage/GET/v1/toys" - ] - ] - } - } - }, - "myapiv1toysGET7348114D": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "myapiv1toysA55FCBC4" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "ApiKeyRequired": true, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "myapiv1toysPOST55128058": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "POST", - "ResourceId": { - "Ref": "myapiv1toysA55FCBC4" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - }, - "myapiv1toysPUT59AFBBC2": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "PUT", - "ResourceId": { - "Ref": "myapiv1toysA55FCBC4" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - }, - "myapiv1appliances507FEFF4": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Ref": "myapiv113487378" - }, - "PathPart": "appliances", - "RestApiId": { - "Ref": "myapi4C7BF186" - } - } - }, - "myapiv1appliancesGET8FE872EC": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "myapiv1appliances507FEFF4" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - }, - "myapiv1books1D4BE6C1": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Ref": "myapiv113487378" - }, - "PathPart": "books", - "RestApiId": { - "Ref": "myapi4C7BF186" - } - } - }, - "myapiv1booksGETApiPermissiontestapigatewayrestapimyapi1AE401C4GETv1books484ACD3F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/", - { - "Ref": "myapiDeploymentStagebeta96434BEB" - }, - "/GET/v1/books" - ] - ] - } - } - }, - "myapiv1booksGETApiPermissionTesttestapigatewayrestapimyapi1AE401C4GETv1booksE255E31A": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/test-invoke-stage/GET/v1/books" - ] - ] - } - } - }, - "myapiv1booksGETC6B996D0": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "myapiv1books1D4BE6C1" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "myapiv1booksPOSTApiPermissiontestapigatewayrestapimyapi1AE401C4POSTv1books2B1BC62B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/", - { - "Ref": "myapiDeploymentStagebeta96434BEB" - }, - "/POST/v1/books" - ] - ] - } - } - }, - "myapiv1booksPOSTApiPermissionTesttestapigatewayrestapimyapi1AE401C4POSTv1books816A6B37": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "myapi4C7BF186" - }, - "/test-invoke-stage/POST/v1/books" - ] - ] - } - } - }, - "myapiv1booksPOST53E2832E": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "POST", - "ResourceId": { - "Ref": "myapiv1books1D4BE6C1" - }, - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MyHandler6B74D312", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "myapiApiKey43446CCF": { - "Type": "AWS::ApiGateway::ApiKey", - "Properties": { - "Enabled": true, - "StageKeys": [ - { - "RestApiId": { - "Ref": "myapi4C7BF186" - }, - "StageName": { - "Ref": "myapiDeploymentStagebeta96434BEB" - } - } - ] - } - }, - "myapiUsagePlan56F9C4F2": { - "Type": "AWS::ApiGateway::UsagePlan", - "Properties": { - "ApiStages": [ - { - "ApiId": { - "Ref": "myapi4C7BF186" - }, - "Stage": { - "Ref": "myapiDeploymentStagebeta96434BEB" - }, - "Throttle": { - "/v1/toys/GET": { - "BurstLimit": 2, - "RateLimit": 10 - } - } - } - ], - "Description": "Free tier monthly usage plan", - "Quota": { - "Limit": 10000, - "Period": "MONTH" - }, - "Throttle": { - "RateLimit": 5 - }, - "UsagePlanName": "Basic" - } - }, - "myapiUsagePlanUsagePlanKeyResourcetestapigatewayrestapimyapiApiKeyC43601CB600D112D": { - "Type": "AWS::ApiGateway::UsagePlanKey", - "Properties": { - "KeyId": { - "Ref": "myapiApiKey43446CCF" - }, - "KeyType": "API_KEY", - "UsagePlanId": { - "Ref": "myapiUsagePlan56F9C4F2" - } - } - }, - "MyHandlerServiceRoleFFA06653": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyHandler6B74D312": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handlerCode(event, _, callback) {\n return callback(undefined, {\n isBase64Encoded: false,\n statusCode: 200,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(event),\n });\n }" - }, - "Role": { - "Fn::GetAtt": [ - "MyHandlerServiceRoleFFA06653", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyHandlerServiceRoleFFA06653" - ] - } - }, - "Outputs": { - "myapiEndpoint3628AFE3": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myapi4C7BF186" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "myapiDeploymentStagebeta96434BEB" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multistack.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multistack.expected.json deleted file mode 100644 index 80bc077e35eb4..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multistack.expected.json +++ /dev/null @@ -1,325 +0,0 @@ -[ - { - "Resources": { - "firstLambdaServiceRoleB6408C31": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "firstLambda395F9ADE": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event) {\n return {\n 'headers': { 'Content-Type': 'text/plain' },\n 'statusCode': 200\n }\n }" - }, - "Role": { - "Fn::GetAtt": [ - "firstLambdaServiceRoleB6408C31", - "Arn" - ] - }, - "FunctionName": "FirstLambda", - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "firstLambdaServiceRoleB6408C31" - ] - } - }, - "Outputs": { - "ExportsOutputFnGetAttfirstLambda395F9ADEArn1A9B3BC3": { - "Value": { - "Fn::GetAtt": [ - "firstLambda395F9ADE", - "Arn" - ] - }, - "Export": { - "Name": "FirstStack:ExportsOutputFnGetAttfirstLambda395F9ADEArn1A9B3BC3" - } - } - } - }, - { - "Resources": { - "BooksApi60AC975F": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "SecondRestAPI" - } - }, - "BooksApiCloudWatchRoleB120ADBA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "BooksApiAccount9C44AF8E": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "BooksApiCloudWatchRoleB120ADBA", - "Arn" - ] - } - }, - "DependsOn": [ - "BooksApi60AC975F" - ] - }, - "BooksApiDeployment86CA39AF4ff82f86c127f53c9de94d266b1906be": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "BooksApi60AC975F" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "BooksApiANY0C4EABE3", - "BooksApibooksGET6066BF7E", - "BooksApibooks1F745538" - ] - }, - "BooksApiDeploymentStageprod0693B760": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "BooksApi60AC975F" - }, - "DeploymentId": { - "Ref": "BooksApiDeployment86CA39AF4ff82f86c127f53c9de94d266b1906be" - }, - "StageName": "prod" - }, - "DependsOn": [ - "BooksApiAccount9C44AF8E" - ] - }, - "BooksApiANY0C4EABE3": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "BooksApi60AC975F", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "BooksApi60AC975F" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - }, - "BooksApibooks1F745538": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "BooksApi60AC975F", - "RootResourceId" - ] - }, - "PathPart": "books", - "RestApiId": { - "Ref": "BooksApi60AC975F" - } - } - }, - "BooksApibooksGETApiPermissionSecondStackBooksApi2660DEC5GETbooksE54B6E9B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::ImportValue": "FirstStack:ExportsOutputFnGetAttfirstLambda395F9ADEArn1A9B3BC3" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "BooksApi60AC975F" - }, - "/", - { - "Ref": "BooksApiDeploymentStageprod0693B760" - }, - "/GET/books" - ] - ] - } - } - }, - "BooksApibooksGETApiPermissionTestSecondStackBooksApi2660DEC5GETbooks0B7ED39D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::ImportValue": "FirstStack:ExportsOutputFnGetAttfirstLambda395F9ADEArn1A9B3BC3" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "BooksApi60AC975F" - }, - "/test-invoke-stage/GET/books" - ] - ] - } - } - }, - "BooksApibooksGET6066BF7E": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "BooksApibooks1F745538" - }, - "RestApiId": { - "Ref": "BooksApi60AC975F" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::ImportValue": "FirstStack:ExportsOutputFnGetAttfirstLambda395F9ADEArn1A9B3BC3" - }, - "/invocations" - ] - ] - } - } - } - } - }, - "Outputs": { - "BooksApiEndpointF2AA70A2": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "BooksApi60AC975F" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "BooksApiDeploymentStageprod0693B760" - }, - "/" - ] - ] - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multiuse.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multiuse.expected.json deleted file mode 100644 index 9a3f0a37f94a7..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.multiuse.expected.json +++ /dev/null @@ -1,532 +0,0 @@ -{ - "Resources": { - "HelloServiceRole1E55EA16": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Hello4A628BD4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function helloCode(_event, _context, callback) {\n return callback(undefined, {\n statusCode: 200,\n body: 'hello, world!',\n });\n}" - }, - "Role": { - "Fn::GetAtt": [ - "HelloServiceRole1E55EA16", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HelloServiceRole1E55EA16" - ] - }, - "helloapi4446A35B": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "hello-api" - } - }, - "helloapiCloudWatchRoleD13E913E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "helloapiAccountD8C38BCE": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "helloapiCloudWatchRoleD13E913E", - "Arn" - ] - } - }, - "DependsOn": [ - "helloapi4446A35B" - ] - }, - "helloapiDeploymentFA89AEEC3622d8c965f356a33fd95586d24bf138": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "helloapi4446A35B" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "helloapihelloGETE6A58337", - "helloapihello4AA00177" - ] - }, - "helloapiDeploymentStageprod677E2C4F": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "helloapi4446A35B" - }, - "DeploymentId": { - "Ref": "helloapiDeploymentFA89AEEC3622d8c965f356a33fd95586d24bf138" - }, - "StageName": "prod" - }, - "DependsOn": [ - "helloapiAccountD8C38BCE" - ] - }, - "helloapihello4AA00177": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "helloapi4446A35B", - "RootResourceId" - ] - }, - "PathPart": "hello", - "RestApiId": { - "Ref": "helloapi4446A35B" - } - } - }, - "helloapihelloGETApiPermissionrestapimultiuseexamplehelloapi9FD0148DGEThello2FD34BC2": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "helloapi4446A35B" - }, - "/", - { - "Ref": "helloapiDeploymentStageprod677E2C4F" - }, - "/GET/hello" - ] - ] - } - } - }, - "helloapihelloGETApiPermissionTestrestapimultiuseexamplehelloapi9FD0148DGEThelloA58B2FAE": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "helloapi4446A35B" - }, - "/test-invoke-stage/GET/hello" - ] - ] - } - } - }, - "helloapihelloGETE6A58337": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "helloapihello4AA00177" - }, - "RestApiId": { - "Ref": "helloapi4446A35B" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "secondapi730EF3C7": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "second-api" - } - }, - "secondapiCloudWatchRole7FEC1028": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "secondapiAccountDF729874": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "secondapiCloudWatchRole7FEC1028", - "Arn" - ] - } - }, - "DependsOn": [ - "secondapi730EF3C7" - ] - }, - "secondapiDeployment20F2C70088fa5a027620045bea3e5043c6d31f5a": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "secondapi730EF3C7" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "secondapihelloGETDC5BBB18", - "secondapihello7264EB69" - ] - }, - "secondapiDeploymentStageprod40491DF0": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "secondapi730EF3C7" - }, - "DeploymentId": { - "Ref": "secondapiDeployment20F2C70088fa5a027620045bea3e5043c6d31f5a" - }, - "StageName": "prod" - }, - "DependsOn": [ - "secondapiAccountDF729874" - ] - }, - "secondapihello7264EB69": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "secondapi730EF3C7", - "RootResourceId" - ] - }, - "PathPart": "hello", - "RestApiId": { - "Ref": "secondapi730EF3C7" - } - } - }, - "secondapihelloGETApiPermissionrestapimultiuseexamplesecondapi5CB05B89GEThello2D6C1879": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "secondapi730EF3C7" - }, - "/", - { - "Ref": "secondapiDeploymentStageprod40491DF0" - }, - "/GET/hello" - ] - ] - } - } - }, - "secondapihelloGETApiPermissionTestrestapimultiuseexamplesecondapi5CB05B89GEThelloB0B3B749": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "secondapi730EF3C7" - }, - "/test-invoke-stage/GET/hello" - ] - ] - } - } - }, - "secondapihelloGETDC5BBB18": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "secondapihello7264EB69" - }, - "RestApiId": { - "Ref": "secondapi730EF3C7" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - } - }, - "Outputs": { - "helloapiEndpoint0E4D8D32": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "helloapi4446A35B" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "helloapiDeploymentStageprod677E2C4F" - }, - "/" - ] - ] - } - }, - "secondapiEndpoint89D0E02C": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "secondapi730EF3C7" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "secondapiDeploymentStageprod40491DF0" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.vpc-endpoint.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.vpc-endpoint.expected.json deleted file mode 100644 index 0c3a632ff8313..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.vpc-endpoint.expected.json +++ /dev/null @@ -1,756 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcMyVpcEndpointSecurityGroup52BE62B3": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "test-apigateway-vpcendpoint/MyVpc/MyVpcEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "MyVpcF9F0CA6F", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "MyVpcF9F0CA6F", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "test-apigateway-vpcendpoint/MyVpc" - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - }, - "MyVpcMyVpcEndpointA401F313": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".execute-api" - ] - ] - }, - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyVpcMyVpcEndpointSecurityGroup52BE62B3", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - }, - { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - }, - { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - ], - "VpcEndpointType": "Interface" - } - }, - "MyApi49610EDF": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "EndpointConfiguration": { - "Types": [ - "PRIVATE" - ], - "VpcEndpointIds": [ - { - "Ref": "MyVpcMyVpcEndpointA401F313" - } - ] - }, - "Name": "MyApi", - "Policy": { - "Statement": [ - { - "Action": "execute-api:Invoke", - "Effect": "Allow", - "Principal": { - "AWS": "*" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyApiCloudWatchRole2BEC1A9C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "MyApiAccount13882D84": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "MyApiCloudWatchRole2BEC1A9C", - "Arn" - ] - } - }, - "DependsOn": [ - "MyApi49610EDF" - ] - }, - "MyApiDeploymentECB0D05E58dcfc85d01f2b81270e177f5347476d": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "MyApi49610EDF" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "MyApiGETD0C7AA0C" - ] - }, - "MyApiDeploymentStageprodE1054AF0": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "MyApi49610EDF" - }, - "DeploymentId": { - "Ref": "MyApiDeploymentECB0D05E58dcfc85d01f2b81270e177f5347476d" - }, - "StageName": "prod" - }, - "DependsOn": [ - "MyApiAccount13882D84" - ] - }, - "MyApiGETD0C7AA0C": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Fn::GetAtt": [ - "MyApi49610EDF", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "MyApi49610EDF" - }, - "AuthorizationType": "NONE", - "Integration": { - "Type": "MOCK" - } - } - } - }, - "Outputs": { - "MyApiEndpoint869ABE96": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyApi49610EDF" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyApiDeploymentStageprodE1054AF0" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.expected.json deleted file mode 100644 index ce9b25be6ecbe..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.expected.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"PassTask\",\"States\":{\"PassTask\":{\"Type\":\"Pass\",\"Result\":\"Hello\",\"End\":true}}}", - "StateMachineType": "EXPRESS" - }, - "DependsOn": [ - "StateMachineRoleB840431D" - ] - }, - "StepFunctionsRestApiANYStartSyncExecutionRole425C03BB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StepFunctionsRestApiANYStartSyncExecutionRoleDefaultPolicy7B6D0CED": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "states:StartSyncExecution", - "Effect": "Allow", - "Resource": { - "Ref": "StateMachine2E01A3A5" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StepFunctionsRestApiANYStartSyncExecutionRoleDefaultPolicy7B6D0CED", - "Roles": [ - { - "Ref": "StepFunctionsRestApiANYStartSyncExecutionRole425C03BB" - } - ] - } - }, - "StepFunctionsRestApiC6E3E883": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "StepFunctionsRestApi" - } - }, - "StepFunctionsRestApiCloudWatchRoleB06ACDB9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "StepFunctionsRestApiAccountBD0CCC0E": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "StepFunctionsRestApiCloudWatchRoleB06ACDB9", - "Arn" - ] - } - }, - "DependsOn": [ - "StepFunctionsRestApiC6E3E883" - ] - }, - "StepFunctionsRestApiANY7699CA92": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "StepFunctionsRestApiC6E3E883", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "StepFunctionsRestApiC6E3E883" - }, - "AuthorizationType": "NONE", - "Integration": { - "Credentials": { - "Fn::GetAtt": [ - "StepFunctionsRestApiANYStartSyncExecutionRole425C03BB", - "Arn" - ] - }, - "IntegrationHttpMethod": "POST", - "IntegrationResponses": [ - { - "ResponseTemplates": { - "application/json": "#set($inputRoot = $input.path('$'))\n#if($input.path('$.status').toString().equals(\"FAILED\"))\n#set($context.responseOverride.status = 500)\n{\n\"error\": \"$input.path('$.error')\",\n\"cause\": \"$input.path('$.cause')\"\n}\n#else\n$input.path('$.output')\n#end" - }, - "StatusCode": "200" - }, - { - "ResponseTemplates": { - "application/json": "{\n \"error\": \"Bad request!\"\n }" - }, - "SelectionPattern": "4\\d{2}", - "StatusCode": "400" - }, - { - "ResponseTemplates": { - "application/json": "\"error\": $input.path('$.error')" - }, - "SelectionPattern": "5\\d{2}", - "StatusCode": "500" - } - ], - "PassthroughBehavior": "NEVER", - "RequestTemplates": { - "application/json": { - "Fn::Join": [ - "", - [ - "## Velocity Template used for API Gateway request mapping template\n##\n## This template forwards the request body, header, path, and querystring\n## to the execution input of the state machine.\n##\n## \"@@\" is used here as a placeholder for '\"' to avoid using escape characters.\n\n#set($inputString = '')\n#set($includeHeaders = true)\n#set($includeQueryString = false)\n#set($includePath = false)\n#set($includeAuthorizer = false)\n#set($allParams = $input.params())\n{\n \"stateMachineArn\": \"", - { - "Ref": "StateMachine2E01A3A5" - }, - "\",\n\n #set($inputString = \"$inputString,@@body@@: $input.body\")\n\n #if ($includeHeaders)\n #set($inputString = \"$inputString, @@header@@:{\")\n #foreach($paramName in $allParams.header.keySet())\n #set($inputString = \"$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.header.get($paramName))@@\")\n #if($foreach.hasNext)\n #set($inputString = \"$inputString,\")\n #end\n #end\n #set($inputString = \"$inputString }\")\n \n #end\n\n #if ($includeQueryString)\n #set($inputString = \"$inputString, @@querystring@@:{\")\n #foreach($paramName in $allParams.querystring.keySet())\n #set($inputString = \"$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.querystring.get($paramName))@@\")\n #if($foreach.hasNext)\n #set($inputString = \"$inputString,\")\n #end\n #end\n #set($inputString = \"$inputString }\")\n #end\n\n #if ($includePath)\n #set($inputString = \"$inputString, @@path@@:{\")\n #foreach($paramName in $allParams.path.keySet())\n #set($inputString = \"$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.path.get($paramName))@@\")\n #if($foreach.hasNext)\n #set($inputString = \"$inputString,\")\n #end\n #end\n #set($inputString = \"$inputString }\")\n #end\n \n #if ($includeAuthorizer)\n #set($inputString = \"$inputString, @@authorizer@@:{\")\n #foreach($paramName in $context.authorizer.keySet())\n #set($inputString = \"$inputString @@$paramName@@: @@$util.escapeJavaScript($context.authorizer.get($paramName))@@\")\n #if($foreach.hasNext)\n #set($inputString = \"$inputString,\")\n #end\n #end\n #set($inputString = \"$inputString }\")\n #end\n\n #set($requestContext = \"{@@accountId@@:@@$context.identity.accountId@@,@@userArn@@:@@$context.identity.userArn@@}\")\n ## Check if the request context should be included as part of the execution input\n #if($requestContext && !$requestContext.empty)\n #set($inputString = \"$inputString,\")\n #set($inputString = \"$inputString @@requestContext@@: $requestContext\")\n #end\n\n #set($inputString = \"$inputString}\")\n #set($inputString = $inputString.replaceAll(\"@@\",'\"'))\n #set($len = $inputString.length() - 1)\n \"input\": \"{$util.escapeJavaScript($inputString.substring(1,$len))}\"\n}\n" - ] - ] - } - }, - "Type": "AWS", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":states:action/StartSyncExecution" - ] - ] - } - }, - "MethodResponses": [ - { - "ResponseModels": { - "application/json": "Empty" - }, - "StatusCode": "200" - }, - { - "ResponseModels": { - "application/json": "Error" - }, - "StatusCode": "400" - }, - { - "ResponseModels": { - "application/json": "Error" - }, - "StatusCode": "500" - } - ] - } - }, - "deployment33381975b5dafda9a97138f301ea25da405640e8": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "StepFunctionsRestApiC6E3E883" - } - }, - "DependsOn": [ - "StepFunctionsRestApiANY7699CA92" - ] - }, - "stage0661E4AC": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "StepFunctionsRestApiC6E3E883" - }, - "DeploymentId": { - "Ref": "deployment33381975b5dafda9a97138f301ea25da405640e8" - }, - "StageName": "prod" - }, - "DependsOn": [ - "StepFunctionsRestApiAccountBD0CCC0E" - ] - } - }, - "Outputs": { - "ApiEndpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "StepFunctionsRestApiC6E3E883" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "stage0661E4AC" - }, - "/" - ] - ] - } - } - } -} diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.multikey.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.multikey.expected.json deleted file mode 100644 index 9dee2e7aa07b0..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.multikey.expected.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "Resources": { - "myusageplan4B391740": { - "Type": "AWS::ApiGateway::UsagePlan" - }, - "myusageplanUsagePlanKeyResourcetestapigatewayusageplanmultikeymyapikey1DDABC389A2809A73": { - "Type": "AWS::ApiGateway::UsagePlanKey", - "Properties": { - "KeyId": { - "Ref": "myapikey18B056ACE" - }, - "KeyType": "API_KEY", - "UsagePlanId": { - "Ref": "myusageplan4B391740" - } - } - }, - "myusageplanUsagePlanKeyResourcetestapigatewayusageplanmultikeymyapikey29D6460C6AE8DE59D": { - "Type": "AWS::ApiGateway::UsagePlanKey", - "Properties": { - "KeyId": { - "Ref": "myapikey250C8F11B" - }, - "KeyType": "API_KEY", - "UsagePlanId": { - "Ref": "myusageplan4B391740" - } - } - }, - "myapikey18B056ACE": { - "Type": "AWS::ApiGateway::ApiKey", - "Properties": { - "Enabled": true - } - }, - "myapikey250C8F11B": { - "Type": "AWS::ApiGateway::ApiKey", - "Properties": { - "Enabled": true - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.sharing.expected.json b/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.sharing.expected.json deleted file mode 100644 index 9e663c4a1f2c8..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/integ.usage-plan.sharing.expected.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "Resources": { - "myusageplan4B391740": { - "Type": "AWS::ApiGateway::UsagePlan" - } - }, - "Outputs": { - "ExportsOutputRefmyusageplan4B391740F6B819BA": { - "Value": { - "Ref": "myusageplan4B391740" - }, - "Export": { - "Name": "test-apigateway-usageplan-create:ExportsOutputRefmyusageplan4B391740F6B819BA" - } - } - } - }, - { - "Resources": { - "myusageplanUsagePlanKeyResourcetestapigatewayusageplanimportmyapikey14CF31667CCB4183": { - "Type": "AWS::ApiGateway::UsagePlanKey", - "Properties": { - "KeyId": { - "Ref": "myapikey5C116C09" - }, - "KeyType": "API_KEY", - "UsagePlanId": { - "Fn::ImportValue": "test-apigateway-usageplan-create:ExportsOutputRefmyusageplan4B391740F6B819BA" - } - } - }, - "myapikey5C116C09": { - "Type": "AWS::ApiGateway::ApiKey", - "Properties": { - "Enabled": true - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.iam.expected.json b/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.iam.expected.json deleted file mode 100644 index 4993cbdffad53..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.iam.expected.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "Resources": { - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "UserDefaultPolicy1F97781E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "execute-api:Invoke", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "HttpApiF5A9A8A7" - }, - "/*/*/books/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:aws:execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "HttpApiF5A9A8A7" - }, - "/*/*/foo" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserDefaultPolicy1F97781E", - "Users": [ - { - "Ref": "User00B015A1" - } - ] - } - }, - "UserAccessEC42ADF7": { - "Type": "AWS::IAM::AccessKey", - "Properties": { - "UserName": { - "Ref": "User00B015A1" - } - } - }, - "HttpApiF5A9A8A7": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpApi", - "ProtocolType": "HTTP" - } - }, - "HttpApiDefaultStage3EEB07D6": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "StageName": "$default", - "AutoDeploy": true - } - }, - "HttpApiANYfooexamplecom903F7A9F": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "IntegrationType": "HTTP_PROXY", - "IntegrationMethod": "GET", - "IntegrationUri": "https://www.example.com/", - "PayloadFormatVersion": "1.0" - } - }, - "HttpApiANYfooD178456F": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "RouteKey": "ANY /foo", - "AuthorizationType": "AWS_IAM", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpApiANYfooexamplecom903F7A9F" - } - ] - ] - } - } - }, - "HttpApiANYbooksbookexamplecom5C333C98": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "IntegrationType": "HTTP_PROXY", - "IntegrationMethod": "GET", - "IntegrationUri": "https://www.example.com/", - "PayloadFormatVersion": "1.0" - } - }, - "HttpApiANYbooksbook2F78361C": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "RouteKey": "ANY /books/{book}", - "AuthorizationType": "AWS_IAM", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpApiANYbooksbookexamplecom5C333C98" - } - ] - ] - } - } - } - }, - "Outputs": { - "API": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpApiF5A9A8A7" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - }, - "TESTACCESSKEYID": { - "Value": { - "Ref": "UserAccessEC42ADF7" - } - }, - "TESTSECRETACCESSKEY": { - "Value": { - "Fn::GetAtt": [ - "UserAccessEC42ADF7", - "SecretAccessKey" - ] - } - }, - "TESTREGION": { - "Value": { - "Ref": "AWS::Region" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.lambda.expected.json b/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.lambda.expected.json deleted file mode 100644 index 1f4a0445f9243..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.lambda.expected.json +++ /dev/null @@ -1,397 +0,0 @@ -{ - "Resources": { - "MyHttpApi8AEAAC21": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "MyHttpApi", - "ProtocolType": "HTTP" - } - }, - "MyHttpApiDefaultStageDCB9BC49": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "StageName": "$default", - "AutoDeploy": true - } - }, - "MyHttpApiGETRootIntegrationPermission81613491": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "lambda8B5974B5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyHttpApi8AEAAC21" - }, - "/*/*/" - ] - ] - } - } - }, - "MyHttpApiGETRootIntegration5068C5B0": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "lambda8B5974B5", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "MyHttpApiGETE0EFC6F8": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "RouteKey": "GET /", - "AuthorizationType": "CUSTOM", - "AuthorizerId": { - "Ref": "MyHttpApiLambdaAuthorizerB8A0E2A4" - }, - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "MyHttpApiGETRootIntegration5068C5B0" - } - ] - ] - } - } - }, - "MyHttpApiLambdaAuthorizerB8A0E2A4": { - "Type": "AWS::ApiGatewayV2::Authorizer", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "AuthorizerType": "REQUEST", - "Name": "my-simple-authorizer", - "AuthorizerPayloadFormatVersion": "2.0", - "AuthorizerResultTtlInSeconds": 300, - "AuthorizerUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "authfunction96361832", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "EnableSimpleResponses": true, - "IdentitySource": [ - "$request.header.X-API-Key" - ] - } - }, - "MyHttpApiAuthorizerIntegMyHttpApiLambdaAuthorizerB89228D7Permission82260331": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "authfunction96361832", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyHttpApi8AEAAC21" - }, - "/authorizers/", - { - "Ref": "MyHttpApiLambdaAuthorizerB8A0E2A4" - } - ] - ] - } - } - }, - "authfunctionServiceRoleFCB72198": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "authfunction96361832": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aS3Bucket7FA0095F" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aS3VersionKeyC54BEE58" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aS3VersionKeyC54BEE58" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "authfunctionServiceRoleFCB72198", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "authfunctionServiceRoleFCB72198" - ] - }, - "lambdaServiceRole494E4CA6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "lambda8B5974B5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaS3Bucket2E6D85D3" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaS3VersionKey22B8E7C6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaS3VersionKey22B8E7C6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "lambdaServiceRole494E4CA6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "lambdaServiceRole494E4CA6" - ] - } - }, - "Parameters": { - "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aS3Bucket7FA0095F": { - "Type": "String", - "Description": "S3 bucket for asset \"74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3a\"" - }, - "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aS3VersionKeyC54BEE58": { - "Type": "String", - "Description": "S3 key for asset version \"74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3a\"" - }, - "AssetParameters74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3aArtifactHash06752181": { - "Type": "String", - "Description": "Artifact hash for asset \"74589072567ba0ad5a12f277a47a8c3b7b5151e9290901fae0a4ce72fe7e3a3a\"" - }, - "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaS3Bucket2E6D85D3": { - "Type": "String", - "Description": "S3 bucket for asset \"1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cda\"" - }, - "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaS3VersionKey22B8E7C6": { - "Type": "String", - "Description": "S3 key for asset version \"1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cda\"" - }, - "AssetParameters1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cdaArtifactHash82A279EA": { - "Type": "String", - "Description": "Artifact hash for asset \"1fd1c15cb7d5e2e36a11745fd10b4b7c3ca8eb30642b41954630413d2b913cda\"" - } - }, - "Outputs": { - "URL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyHttpApi8AEAAC21" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.user-pool.expected.json b/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.user-pool.expected.json deleted file mode 100644 index 44055c596d865..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.user-pool.expected.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "Resources": { - "MyHttpApi8AEAAC21": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "MyHttpApi", - "ProtocolType": "HTTP" - } - }, - "MyHttpApiDefaultStageDCB9BC49": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "StageName": "$default", - "AutoDeploy": true - } - }, - "MyHttpApiGETRootIntegratinPermissionCEEEB498": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "lambda8B5974B5", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyHttpApi8AEAAC21" - }, - "/*/*/" - ] - ] - } - } - }, - "MyHttpApiGETRootIntegratin93150A89": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "lambda8B5974B5", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "MyHttpApiGETE0EFC6F8": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "RouteKey": "GET /", - "AuthorizationType": "JWT", - "AuthorizerId": { - "Ref": "MyHttpApiUserPoolAuthorizer8754262B" - }, - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "MyHttpApiGETRootIntegratin93150A89" - } - ] - ] - } - } - }, - "MyHttpApiUserPoolAuthorizer8754262B": { - "Type": "AWS::ApiGatewayV2::Authorizer", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "AuthorizerType": "JWT", - "Name": "UserPoolAuthorizer", - "IdentitySource": [ - "$request.header.Authorization" - ], - "JwtConfiguration": { - "Audience": [ - { - "Ref": "userpoolUserPoolAuthorizerClient6A7486E8" - } - ], - "Issuer": { - "Fn::Join": [ - "", - [ - "https://cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "userpool0AC4AA96" - } - ] - ] - } - } - } - }, - "userpool0AC4AA96": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "userpoolUserPoolAuthorizerClient6A7486E8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "userpool0AC4AA96" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - }, - "lambdaServiceRole494E4CA6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "lambda8B5974B5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdS3Bucket0AFE1748" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdS3VersionKey8E654BCC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdS3VersionKey8E654BCC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "lambdaServiceRole494E4CA6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "lambdaServiceRole494E4CA6" - ] - } - }, - "Parameters": { - "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdS3Bucket0AFE1748": { - "Type": "String", - "Description": "S3 bucket for asset \"7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cd\"" - }, - "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdS3VersionKey8E654BCC": { - "Type": "String", - "Description": "S3 key for asset version \"7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cd\"" - }, - "AssetParameters7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cdArtifactHashC4761AE9": { - "Type": "String", - "Description": "Artifact hash for asset \"7410bbb25893071ddf955447cf906ac518465ea509469e6b012c28dde8f8b5cd\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json deleted file mode 100644 index 273e66ff03ac0..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "lbA35910C5": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "lbSecurityGroup47B6F855", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "application" - } - }, - "lbSecurityGroup47B6F855": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB integalbintegrationlb02F792D5", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "lblistener657ADDEC": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "FixedResponseConfig": { - "StatusCode": "200" - }, - "Type": "fixed-response" - } - ], - "LoadBalancerArn": { - "Ref": "lbA35910C5" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "lblistenertargetGroupC7489D1E": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "HttpProxyPrivateApiVpcLink190366CAE" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Ref": "lblistener657ADDEC" - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiVpcLink190366CAE": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integalbintegrationHttpProxyPrivateApiVpcLink125175F29", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.expected.json deleted file mode 100644 index edb4305fe239b..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.http-proxy.expected.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "Resources": { - "AlwaysSuccessServiceRole6DB8C2F6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AlwaysSuccess099EAB05": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { return { statusCode: 200, body: \"success\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "AlwaysSuccessServiceRole6DB8C2F6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AlwaysSuccessServiceRole6DB8C2F6" - ] - }, - "LambdaProxyApi67594471": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "LambdaProxyApi", - "ProtocolType": "HTTP" - } - }, - "LambdaProxyApiDefaultRouteDefaultIntegrationPermission39F587FC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AlwaysSuccess099EAB05", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "LambdaProxyApi67594471" - }, - "/*/*" - ] - ] - } - } - }, - "LambdaProxyApiDefaultRouteDefaultIntegrationAE9908C8": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "AlwaysSuccess099EAB05", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "LambdaProxyApiDefaultRoute1EB30A46": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "LambdaProxyApiDefaultRouteDefaultIntegrationAE9908C8" - } - ] - ] - } - } - }, - "LambdaProxyApiDefaultStage07C38681": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "StageName": "$default", - "AutoDeploy": true - } - }, - "HttpProxyApiD0217C67": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyApiDefaultRouteDefaultIntegration95D23B0D": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyApiD0217C67" - }, - "IntegrationType": "HTTP_PROXY", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "LambdaProxyApi67594471" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyApiDefaultRoute8AF66B5C": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyApiD0217C67" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyApiDefaultRouteDefaultIntegration95D23B0D" - } - ] - ] - } - } - }, - "HttpProxyApiDefaultStageA88F9DE3": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyApiD0217C67" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyApiD0217C67" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.expected.json deleted file mode 100644 index 5de2892451602..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.lambda-proxy.expected.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "Resources": { - "AlwaysSuccessServiceRole6DB8C2F6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AlwaysSuccess099EAB05": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { return { statusCode: 200, body: \"success\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "AlwaysSuccessServiceRole6DB8C2F6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AlwaysSuccessServiceRole6DB8C2F6" - ] - }, - "LambdaProxyApi67594471": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "LambdaProxyApi", - "ProtocolType": "HTTP" - } - }, - "LambdaProxyApiDefaultRouteDefaultIntegrationPermission39F587FC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AlwaysSuccess099EAB05", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "LambdaProxyApi67594471" - }, - "/*/*" - ] - ] - } - } - }, - "LambdaProxyApiDefaultRouteDefaultIntegrationAE9908C8": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "AlwaysSuccess099EAB05", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "LambdaProxyApiDefaultRoute1EB30A46": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "LambdaProxyApiDefaultRouteDefaultIntegrationAE9908C8" - } - ] - ] - } - } - }, - "LambdaProxyApiDefaultStage07C38681": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "LambdaProxyApi67594471" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "LambdaProxyApi67594471" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json deleted file mode 100644 index ad0376a19c058..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json +++ /dev/null @@ -1,668 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "lbA35910C5": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "network" - } - }, - "lblistener657ADDEC": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "lblistenertargetGroupC7489D1E" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "lbA35910C5" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "lblistenertargetGroupC7489D1E": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "HttpProxyPrivateApiVpcLink190366CAE" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Ref": "lblistener657ADDEC" - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiVpcLink190366CAE": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integnlbintegrationHttpProxyPrivateApiVpcLink1C940EC42", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json deleted file mode 100644 index 56af47d74c0c0..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json +++ /dev/null @@ -1,654 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VpcLink42ED6FF0": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integservicediscoveryintegrationVpcLink09ACD3FF", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "Namespace9B63B8C8": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "foobar.com", - "Vpc": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "NamespaceServiceCABDF534": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 60, - "Type": "A" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "VpcLink42ED6FF0" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Fn::GetAtt": [ - "NamespaceServiceCABDF534", - "Arn" - ] - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultIntegration002C2760" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.lambda.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.lambda.expected.json deleted file mode 100644 index a26b35f5ccfb9..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.lambda.expected.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "Resources": { - "ConnectHandlerServiceRole7E4A9B1F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "ConnectHandler2FFD52D8": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: \"connected\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "ConnectHandlerServiceRole7E4A9B1F", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "ConnectHandlerServiceRole7E4A9B1F" - ] - }, - "DisconnectHandlerServiceRoleE54F14F9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "DisconnectHandlerCB7ED6F7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: \"disconnected\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "DisconnectHandlerServiceRoleE54F14F9", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "DisconnectHandlerServiceRoleE54F14F9" - ] - }, - "DefaultHandlerServiceRoleDF00569C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "DefaultHandler604DF7AC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: \"default\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "DefaultHandlerServiceRoleDF00569C", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "DefaultHandlerServiceRoleDF00569C" - ] - }, - "MessageHandlerServiceRoleDF05266A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MessageHandlerDFBBCD6B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: \"received\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "MessageHandlerServiceRoleDF05266A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "MessageHandlerServiceRoleDF05266A" - ] - }, - "mywsapi32E6CE11": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "mywsapi", - "ProtocolType": "WEBSOCKET", - "RouteSelectionExpression": "$request.body.action" - } - }, - "mywsapiconnectRouteConnectIntegrationPermission719B6E63": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ConnectHandler2FFD52D8", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "mywsapi32E6CE11" - }, - "/*/*$connect" - ] - ] - } - } - }, - "mywsapiconnectRouteConnectIntegrationE101DB9B": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "ConnectHandler2FFD52D8", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "mywsapiconnectRoute45A0ED6A": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "$connect", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapiconnectRouteConnectIntegrationE101DB9B" - } - ] - ] - } - } - }, - "mywsapidisconnectRouteDisconnectIntegrationPermissionA8197C41": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "DisconnectHandlerCB7ED6F7", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "mywsapi32E6CE11" - }, - "/*/*$disconnect" - ] - ] - } - } - }, - "mywsapidisconnectRouteDisconnectIntegrationF927D904": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "DisconnectHandlerCB7ED6F7", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "mywsapidisconnectRoute421A8CB9": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "$disconnect", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapidisconnectRouteDisconnectIntegrationF927D904" - } - ] - ] - } - } - }, - "mywsapidefaultRouteDefaultIntegrationPermission3B7F9CA1": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "DefaultHandler604DF7AC", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "mywsapi32E6CE11" - }, - "/*/*$default" - ] - ] - } - } - }, - "mywsapidefaultRouteDefaultIntegrationFFCB3BA9": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "DefaultHandler604DF7AC", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "mywsapidefaultRouteE9382DF8": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapidefaultRouteDefaultIntegrationFFCB3BA9" - } - ] - ] - } - } - }, - "mywsapisendmessageRouteSendMessageIntegrationPermission92C9841E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MessageHandlerDFBBCD6B", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "mywsapi32E6CE11" - }, - "/*/*sendmessage" - ] - ] - } - } - }, - "mywsapisendmessageRouteSendMessageIntegrationD29E12F9": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "MessageHandlerDFBBCD6B", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "mywsapisendmessageRouteAE873328": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "sendmessage", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapisendmessageRouteSendMessageIntegrationD29E12F9" - } - ] - ] - } - } - }, - "mystage114C35EC": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "StageName": "dev", - "AutoDeploy": true - } - } - }, - "Outputs": { - "ApiEndpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "wss://", - { - "Ref": "mywsapi32E6CE11" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/dev" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.mock.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.mock.expected.json deleted file mode 100644 index dede3af2298b4..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.mock.expected.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "Resources": { - "mywsapi32E6CE11": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "mywsapi", - "ProtocolType": "WEBSOCKET", - "RouteSelectionExpression": "$request.body.action" - } - }, - "mywsapidefaultRouteDefaultIntegrationFFCB3BA9": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "MOCK", - "IntegrationUri": "" - } - }, - "mywsapidefaultRouteE9382DF8": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "$default", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapidefaultRouteDefaultIntegrationFFCB3BA9" - } - ] - ] - } - } - }, - "mywsapisendmessageRouteSendMessageIntegrationD29E12F9": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "IntegrationType": "MOCK", - "IntegrationUri": "" - } - }, - "mywsapisendmessageRouteAE873328": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "RouteKey": "sendmessage", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "mywsapisendmessageRouteSendMessageIntegrationD29E12F9" - } - ] - ] - } - } - }, - "mystage114C35EC": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "mywsapi32E6CE11" - }, - "StageName": "dev", - "AutoDeploy": true - } - } - }, - "Outputs": { - "ApiEndpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "wss://", - { - "Ref": "mywsapi32E6CE11" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/dev" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.stage.expected.json b/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.stage.expected.json deleted file mode 100644 index e5693781538c5..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/integ.stage.expected.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Resources": { - "HttpApiF5A9A8A7": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpApi", - "ProtocolType": "HTTP" - } - }, - "HttpStageWithPropertiesC0AABA83": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpApiF5A9A8A7" - }, - "StageName": "$default", - "DefaultRouteSettings": { - "ThrottlingBurstLimit": 1000, - "ThrottlingRateLimit": 1000 - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.api-apikey.expected.json b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.api-apikey.expected.json deleted file mode 100644 index bc0b6f740acc8..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.api-apikey.expected.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Resources": { - "MyWebsocketApiEBAC53DF": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "ApiKeySelectionExpression": "$request.header.x-api-key", - "Name": "MyWebsocketApi", - "ProtocolType": "WEBSOCKET", - "RouteSelectionExpression": "$request.body.action" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.stage.expected.json b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.stage.expected.json deleted file mode 100644 index 3f22d2c416ba9..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/integ.stage.expected.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Resources": { - "WebSocketApi34BCF99B": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "WebSocketApi", - "ProtocolType": "WEBSOCKET", - "RouteSelectionExpression": "$request.body.action" - } - }, - "WebSocketStageC46B7E43": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "WebSocketApi34BCF99B" - }, - "StageName": "dev", - "DefaultRouteSettings": { - "ThrottlingBurstLimit": 1000, - "ThrottlingRateLimit": 1000 - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json deleted file mode 100644 index 3649195cf9c7e..0000000000000 --- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json +++ /dev/null @@ -1,1942 +0,0 @@ -{ - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet3Subnet11B92D7C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableA3C00665": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableAssociationD102D1C4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - } - } - }, - "vpcPublicSubnet3DefaultRoute3F356A11": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet3Subnet985AC459": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTable24DA79A0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - } - }, - "vpcPrivateSubnet3DefaultRoute30C45F47": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "mesh-stack/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "testnamespace01FA2CAF": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "domain.local", - "Vpc": { - "Ref": "vpcA2121C38" - } - } - }, - "meshACDFE68E": { - "Type": "AWS::AppMesh::Mesh", - "Properties": { - "MeshName": "meshstackmesh680D3CEB", - "Spec": {} - } - }, - "meshrouter81B8087E": { - "Type": "AWS::AppMesh::VirtualRouter", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Listeners": [ - { - "PortMapping": { - "Port": 8080, - "Protocol": "http" - } - } - ] - }, - "VirtualRouterName": "meshstackmeshrouter2FE6E358" - } - }, - "meshrouterroute118BAC45E": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "HttpRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode726C787D", - "VirtualNodeName" - ] - }, - "Weight": 50 - } - ] - }, - "Match": { - "Prefix": "/" - }, - "Timeout": { - "Idle": { - "Unit": "ms", - "Value": 10000 - }, - "PerRequest": { - "Unit": "ms", - "Value": 10000 - } - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-1" - } - }, - "meshrouterroute2486D9DEF": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "HttpRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode2092BA426", - "VirtualNodeName" - ] - }, - "Weight": 30 - } - ] - }, - "Match": { - "Prefix": "/path2" - }, - "Timeout": { - "Idle": { - "Unit": "ms", - "Value": 11000 - }, - "PerRequest": { - "Unit": "ms", - "Value": 11000 - } - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-2" - } - }, - "meshrouterroute3BD0FA22F": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "TcpRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode3D2A19CF2", - "VirtualNodeName" - ] - }, - "Weight": 20 - } - ] - }, - "Timeout": { - "Idle": { - "Unit": "ms", - "Value": 12000 - } - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-3" - } - }, - "meshrouterroute417D3F5B5": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "GrpcRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode4AE87F692", - "VirtualNodeName" - ] - }, - "Weight": 20 - } - ] - }, - "Match": { - "ServiceName": "test" - }, - "Timeout": { - "Idle": { - "Unit": "ms", - "Value": 12000 - } - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-4" - } - }, - "meshrouterroutematchingACC12F04": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode3D2A19CF2", - "VirtualNodeName" - ] - }, - "Weight": 1 - } - ] - }, - "Match": { - "Headers": [ - { - "Invert": false, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Prefix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Suffix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Regex": "application/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Prefix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Suffix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Regex": "application/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Content-Type" - } - ], - "Method": "POST", - "Prefix": "/", - "Scheme": "https" - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-matching" - } - }, - "meshrouterroutehttp2retryCC41345F": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode3D2A19CF2", - "VirtualNodeName" - ] - }, - "Weight": 1 - } - ] - }, - "Match": { - "Prefix": "/" - }, - "RetryPolicy": { - "HttpRetryEvents": [ - "client-error" - ], - "MaxRetries": 5, - "PerRetryTimeout": { - "Unit": "ms", - "Value": 1000 - }, - "TcpRetryEvents": [ - "connection-error" - ] - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-http2-retry" - } - }, - "meshrouterroute53F46B0FE": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode2092BA426", - "VirtualNodeName" - ] - }, - "Weight": 1 - } - ] - }, - "Match": { - "Prefix": "/" - } - }, - "Priority": 10 - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-5" - } - }, - "meshrouterroutegrpcretry9BEB798A": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "GrpcRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode3D2A19CF2", - "VirtualNodeName" - ] - }, - "Weight": 1 - } - ] - }, - "Match": { - "ServiceName": "servicename" - }, - "RetryPolicy": { - "GrpcRetryEvents": [ - "deadline-exceeded" - ], - "HttpRetryEvents": [ - "client-error" - ], - "MaxRetries": 5, - "PerRetryTimeout": { - "Unit": "ms", - "Value": 1000 - }, - "TcpRetryEvents": [ - "connection-error" - ] - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-grpc-retry" - } - }, - "meshrouterroute699804AE1": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode2092BA426", - "VirtualNodeName" - ] - }, - "Weight": 30 - } - ] - }, - "Match": { - "Path": { - "Regex": "regex" - }, - "QueryParameters": [ - { - "Match": { - "Exact": "value" - }, - "Name": "query-field" - } - ] - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-6" - } - }, - "meshrouterroute76C21E6E7": { - "Type": "AWS::AppMesh::Route", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "GrpcRoute": { - "Action": { - "WeightedTargets": [ - { - "VirtualNode": { - "Fn::GetAtt": [ - "meshnode4AE87F692", - "VirtualNodeName" - ] - }, - "Weight": 20 - } - ] - }, - "Match": { - "Metadata": [ - { - "Invert": false, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - } - ], - "MethodName": "test-method", - "ServiceName": "test-service" - } - } - }, - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - }, - "RouteName": "route-7" - } - }, - "meshnode726C787D": { - "Type": "AWS::AppMesh::VirtualNode", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Backends": [ - { - "VirtualService": { - "VirtualServiceName": "service1.domain.local" - } - }, - { - "VirtualService": { - "VirtualServiceName": "service2.domain.local" - } - } - ], - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 3, - "IntervalMillis": 5000, - "Path": "/check-path", - "Port": 8080, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 8080, - "Protocol": "http" - } - } - ], - "ServiceDiscovery": { - "DNS": { - "Hostname": "node1.domain.local" - } - } - }, - "VirtualNodeName": "meshstackmeshnode61AD3D23" - } - }, - "meshnode2092BA426": { - "Type": "AWS::AppMesh::VirtualNode", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "BackendDefaults": { - "ClientPolicy": { - "TLS": { - "Validation": { - "Trust": { - "File": { - "CertificateChain": "path/to/cert" - } - } - } - } - } - }, - "Backends": [ - { - "VirtualService": { - "VirtualServiceName": "service3.domain.local" - } - } - ], - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 3, - "IntervalMillis": 5000, - "Path": "/check-path2", - "Port": 8080, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 8080, - "Protocol": "http" - } - } - ], - "ServiceDiscovery": { - "DNS": { - "Hostname": "node2.domain.local" - } - } - }, - "VirtualNodeName": "meshstackmeshnode2F1F28441" - } - }, - "meshnode3D2A19CF2": { - "Type": "AWS::AppMesh::VirtualNode", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "BackendDefaults": { - "ClientPolicy": { - "TLS": { - "Validation": { - "Trust": { - "File": { - "CertificateChain": "path-to-certificate" - } - } - } - } - } - }, - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 3, - "IntervalMillis": 5000, - "Path": "/check-path3", - "Port": 8080, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 8080, - "Protocol": "http" - } - } - ], - "Logging": { - "AccessLog": { - "File": { - "Path": "/dev/stdout" - } - } - }, - "ServiceDiscovery": { - "DNS": { - "Hostname": "node3.domain.local" - } - } - }, - "VirtualNodeName": "meshstackmeshnode3C5835BCB" - } - }, - "meshnode4AE87F692": { - "Type": "AWS::AppMesh::VirtualNode", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "BackendDefaults": { - "ClientPolicy": { - "TLS": { - "Certificate": { - "File": { - "CertificateChain": "path/to/certChain", - "PrivateKey": "path/to/privateKey" - } - }, - "Validation": { - "SubjectAlternativeNames": { - "Match": { - "Exact": [ - "mymesh.local" - ] - } - }, - "Trust": { - "File": { - "CertificateChain": "path-to-certificate" - } - } - } - } - } - }, - "Backends": [ - { - "VirtualService": { - "VirtualServiceName": "service4.domain.local" - } - } - ], - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 3, - "IntervalMillis": 5000, - "Path": "/check-path3", - "Port": 8080, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 8080, - "Protocol": "http" - }, - "TLS": { - "Certificate": { - "SDS": { - "SecretName": "spiffe://domain.local/backend-service" - } - }, - "Mode": "STRICT", - "Validation": { - "SubjectAlternativeNames": { - "Match": { - "Exact": [ - "client.domain.local" - ] - } - }, - "Trust": { - "SDS": { - "SecretName": "spiffe://domain.local" - } - } - } - } - } - ], - "Logging": { - "AccessLog": { - "File": { - "Path": "/dev/stdout" - } - } - }, - "ServiceDiscovery": { - "DNS": { - "Hostname": "node4.domain.local", - "ResponseType": "ENDPOINTS" - } - } - }, - "VirtualNodeName": "meshstackmeshnode404B014E7" - } - }, - "meshgateway1B02387E8": { - "Type": "AWS::AppMesh::VirtualGateway", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Listeners": [ - { - "PortMapping": { - "Port": 8080, - "Protocol": "http" - } - } - ], - "Logging": { - "AccessLog": { - "File": { - "Path": "/dev/stdout" - } - } - } - }, - "VirtualGatewayName": "gateway1" - } - }, - "meshgateway1gateway1routehttpE8D6F433": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "HttpRoute": { - "Action": { - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Prefix": "/" - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routehttpBA921D42" - } - }, - "meshgateway1gateway1routehttp2B672D43F": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "HttpRoute": { - "Action": { - "Rewrite": { - "Hostname": { - "DefaultTargetHostname": "ENABLED" - }, - "Prefix": { - "DefaultPrefix": "DISABLED" - } - }, - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Headers": [ - { - "Invert": false, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Prefix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Suffix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Regex": "application/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Prefix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Suffix": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Regex": "application/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Content-Type" - } - ], - "Hostname": { - "Exact": "example.com" - }, - "Method": "POST", - "Prefix": "/", - "QueryParameters": [ - { - "Match": { - "Exact": "value" - }, - "Name": "query-field" - } - ] - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routehttp27F17263B" - } - }, - "meshgateway1gateway1routehttp2FD69C306": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Prefix": "/" - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routehttp255781963" - } - }, - "meshgateway1gateway1routehttp2225001508": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "Rewrite": { - "Path": { - "Exact": "/rewrittenpath" - } - }, - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Path": { - "Exact": "/exact" - } - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routehttp22BD49AE9D" - } - }, - "meshgateway1gateway1routehttp2376EB99D6": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Http2Route": { - "Action": { - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Path": { - "Regex": "regex" - } - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routehttp23E44F5774" - } - }, - "meshgateway1gateway1routegrpc76486062": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "GrpcRoute": { - "Action": { - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "ServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routegrpcCD4D891D" - } - }, - "meshgateway1gateway1routegrpc2FAC1FF36": { - "Type": "AWS::AppMesh::GatewayRoute", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "GrpcRoute": { - "Action": { - "Rewrite": { - "Hostname": { - "DefaultTargetHostname": "DISABLED" - } - }, - "Target": { - "VirtualService": { - "VirtualServiceName": { - "Fn::GetAtt": [ - "service6D174F83", - "VirtualServiceName" - ] - } - } - } - }, - "Match": { - "Hostname": { - "Exact": "example.com" - }, - "Metadata": [ - { - "Invert": false, - "Match": { - "Exact": "application/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Exact": "text/html" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Prefix": "application/" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Prefix": "text/" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Suffix": "/json" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Suffix": "/json+foobar" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Regex": "application/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": true, - "Match": { - "Regex": "text/.*" - }, - "Name": "Content-Type" - }, - { - "Invert": false, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Max-Forward" - }, - { - "Invert": true, - "Match": { - "Range": { - "End": 5, - "Start": 1 - } - }, - "Name": "Max-Forward" - } - ] - } - } - }, - "VirtualGatewayName": { - "Fn::GetAtt": [ - "meshgateway1B02387E8", - "VirtualGatewayName" - ] - }, - "GatewayRouteName": "meshstackmeshgateway1gateway1routegrpc2AE8379FD" - } - }, - "service6D174F83": { - "Type": "AWS::AppMesh::VirtualService", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Provider": { - "VirtualRouter": { - "VirtualRouterName": { - "Fn::GetAtt": [ - "meshrouter81B8087E", - "VirtualRouterName" - ] - } - } - } - }, - "VirtualServiceName": "service1.domain.local" - } - }, - "service27C65CF7D": { - "Type": "AWS::AppMesh::VirtualService", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": {}, - "VirtualServiceName": "service2.domain.local" - } - }, - "service3859EB104": { - "Type": "AWS::AppMesh::VirtualService", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": {}, - "VirtualServiceName": "service3.domain.local" - } - }, - "service4983B61EE": { - "Type": "AWS::AppMesh::VirtualService", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": {}, - "VirtualServiceName": "service4.domain.local" - } - }, - "gateway2BCE5C5E0": { - "Type": "AWS::AppMesh::VirtualGateway", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 2, - "IntervalMillis": 10000, - "Path": "/", - "Port": 443, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 443, - "Protocol": "http" - }, - "TLS": { - "Certificate": { - "File": { - "CertificateChain": "path/to/certChain", - "PrivateKey": "path/to/privateKey" - } - }, - "Mode": "STRICT" - } - } - ] - }, - "VirtualGatewayName": "meshstackgateway2BEC62D7C" - } - }, - "gateway3F9F16554": { - "Type": "AWS::AppMesh::VirtualGateway", - "Properties": { - "MeshName": { - "Fn::GetAtt": [ - "meshACDFE68E", - "MeshName" - ] - }, - "Spec": { - "BackendDefaults": { - "ClientPolicy": { - "TLS": { - "Certificate": { - "SDS": { - "SecretName": "secret_validation" - } - }, - "Validation": { - "Trust": { - "File": { - "CertificateChain": "path/to/certChain" - } - } - } - } - } - }, - "Listeners": [ - { - "HealthCheck": { - "HealthyThreshold": 2, - "IntervalMillis": 10000, - "Path": "/", - "Port": 443, - "Protocol": "http", - "TimeoutMillis": 2000, - "UnhealthyThreshold": 2 - }, - "PortMapping": { - "Port": 443, - "Protocol": "http" - }, - "TLS": { - "Certificate": { - "SDS": { - "SecretName": "secret_certificate" - } - }, - "Mode": "STRICT", - "Validation": { - "Trust": { - "File": { - "CertificateChain": "path/to/certChain" - } - } - } - } - } - ] - }, - "VirtualGatewayName": "meshstackgateway34EC5ED00" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr-public.expected.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr-public.expected.json deleted file mode 100644 index f790c8ae78487..0000000000000 --- a/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr-public.expected.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Resources": { - "Service1EDCC8134": { - "Type": "AWS::AppRunner::Service", - "Properties": { - "SourceConfiguration": { - "AuthenticationConfiguration": {}, - "ImageRepository": { - "ImageConfiguration": { - "Port": "8000" - }, - "ImageIdentifier": "public.ecr.aws/aws-containers/hello-app-runner:latest", - "ImageRepositoryType": "ECR_PUBLIC" - } - }, - "InstanceConfiguration": {} - } - } - }, - "Outputs": { - "URL1": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Service1EDCC8134", - "ServiceUrl" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr.expected.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr.expected.json deleted file mode 100644 index 107dc235584de..0000000000000 --- a/packages/@aws-cdk/aws-apprunner/test/integ.service-ecr.expected.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "Resources": { - "Service3AccessRole3ACBAAA0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "build.apprunner.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Service3AccessRoleDefaultPolicy57B9744E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Service3AccessRoleDefaultPolicy57B9744E", - "Roles": [ - { - "Ref": "Service3AccessRole3ACBAAA0" - } - ] - } - }, - "Service342D067F2": { - "Type": "AWS::AppRunner::Service", - "Properties": { - "SourceConfiguration": { - "AuthenticationConfiguration": { - "AccessRoleArn": { - "Fn::GetAtt": [ - "Service3AccessRole3ACBAAA0", - "Arn" - ] - } - }, - "ImageRepository": { - "ImageConfiguration": { - "Port": "8000" - }, - "ImageIdentifier": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:77284835684772d19c95f4f5a37e7618d5f9efc40db9321d44ac039db457b967" - ] - ] - }, - "ImageRepositoryType": "ECR" - } - }, - "InstanceConfiguration": {} - } - }, - "Service2AccessRole759CA73D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "build.apprunner.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Service2AccessRoleDefaultPolicy08C28479": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Service2AccessRoleDefaultPolicy08C28479", - "Roles": [ - { - "Ref": "Service2AccessRole759CA73D" - } - ] - } - }, - "Service2AB4D14D8": { - "Type": "AWS::AppRunner::Service", - "Properties": { - "SourceConfiguration": { - "AuthenticationConfiguration": { - "AccessRoleArn": { - "Fn::GetAtt": [ - "Service2AccessRole759CA73D", - "Arn" - ] - } - }, - "ImageRepository": { - "ImageConfiguration": { - "Port": "80" - }, - "ImageIdentifier": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:77284835684772d19c95f4f5a37e7618d5f9efc40db9321d44ac039db457b967" - ] - ] - }, - "ImageRepositoryType": "ECR" - } - }, - "InstanceConfiguration": {} - } - } - }, - "Outputs": { - "URL3": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Service342D067F2", - "ServiceUrl" - ] - } - ] - ] - } - }, - "URL2": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Service2AB4D14D8", - "ServiceUrl" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-github.expected.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-github.expected.json deleted file mode 100644 index a30841a30e91c..0000000000000 --- a/packages/@aws-cdk/aws-apprunner/test/integ.service-github.expected.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "Resources": { - "Service429949929": { - "Type": "AWS::AppRunner::Service", - "Properties": { - "SourceConfiguration": { - "AuthenticationConfiguration": { - "ConnectionArn": "MOCK" - }, - "CodeRepository": { - "CodeConfiguration": { - "ConfigurationSource": "REPOSITORY" - }, - "RepositoryUrl": "https://github.com/aws-containers/hello-app-runner", - "SourceCodeVersion": { - "Type": "BRANCH", - "Value": "main" - } - } - }, - "InstanceConfiguration": {} - } - }, - "Service5AD92B5A5": { - "Type": "AWS::AppRunner::Service", - "Properties": { - "SourceConfiguration": { - "AuthenticationConfiguration": { - "ConnectionArn": "MOCK" - }, - "CodeRepository": { - "CodeConfiguration": { - "CodeConfigurationValues": { - "BuildCommand": "yum install -y pycairo && pip install -r requirements.txt", - "Port": "8000", - "Runtime": "PYTHON_3", - "StartCommand": "python app.py" - }, - "ConfigurationSource": "API" - }, - "RepositoryUrl": "https://github.com/aws-containers/hello-app-runner", - "SourceCodeVersion": { - "Type": "BRANCH", - "Value": "main" - } - } - }, - "InstanceConfiguration": {} - } - } - }, - "Outputs": { - "URL4": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Service429949929", - "ServiceUrl" - ] - } - ] - ] - } - }, - "URL5": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Service5AD92B5A5", - "ServiceUrl" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json deleted file mode 100644 index 496d000a2d3b3..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json +++ /dev/null @@ -1,244 +0,0 @@ -[ - { - "Resources": { - "baseApiCDA4D43A": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "baseApi" - } - }, - "baseApiSchemaB12C7BB0": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "baseApiCDA4D43A", - "ApiId" - ] - }, - "Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" - } - }, - "baseApiDefaultApiKeyA3A0A16A": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "baseApiCDA4D43A", - "ApiId" - ] - } - }, - "DependsOn": [ - "baseApiSchemaB12C7BB0" - ] - } - }, - "Outputs": { - "ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68": { - "Value": { - "Fn::GetAtt": [ - "baseApiCDA4D43A", - "ApiId" - ] - }, - "Export": { - "Name": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - } - } - } - }, - { - "Resources": { - "ApidsServiceRoleADC7D124": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApidsServiceRoleDefaultPolicyE5E18D6D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestTable5769773A", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApidsServiceRoleDefaultPolicyE5E18D6D", - "Roles": [ - { - "Ref": "ApidsServiceRoleADC7D124" - } - ] - } - }, - "Apids0DB53FEA": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "Name": "ds", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "TestTable5769773A" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApidsServiceRoleADC7D124", - "Arn" - ] - } - } - }, - "ApidsQuerygetTestsResolver952F49EE": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "FieldName": "getTests", - "TypeName": "Query", - "DataSourceName": "ds", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "Apids0DB53FEA" - ] - }, - "ApidsMutationaddTestResolverBCF0400B": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "FieldName": "addTest", - "TypeName": "Mutation", - "DataSourceName": "ds", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "Apids0DB53FEA" - ] - }, - "TestTable5769773A": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "api2noneC88DB89F": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "Name": "none", - "Type": "NONE" - } - }, - "api2nonepipelinefunctionFunction2426F465": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "DataSourceName": "none", - "FunctionVersion": "2018-05-29", - "Name": "pipeline_function", - "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", - "ResponseMappingTemplate": "{\"version\":\"v1\"}" - }, - "DependsOn": [ - "api2noneC88DB89F" - ] - }, - "pipelineresolver843133EA": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::ImportValue": "baseStack:ExportsOutputFnGetAttbaseApiCDA4D43AApiId50287E68" - }, - "FieldName": "version", - "TypeName": "test", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "api2nonepipelinefunctionFunction2426F465", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", - "ResponseMappingTemplate": "{\"version\":\"v1\"}" - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json deleted file mode 100644 index c3c4e3e186912..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.expected.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "Resources": { - "LambdaAPID6A5A92B": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "LambdaAPI" - } - }, - "LambdaAPISchemaCC5CA3D2": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "Definition": "schema {\n query: Query\n mutation: Mutation\n}\n\ntype Query {\n getPost(id:ID!): Post\n allPosts: [Post]\n}\n\ntype Mutation {\n addPost(id: ID!, author: String!, title: String, content: String, url: String): Post!\n}\n\ntype Post {\n id: ID!\n author: String!\n title: String\n content: String\n url: String\n ups: Int\n downs: Int\n relatedPosts: [Post]\n}" - } - }, - "LambdaAPIDefaultApiKey15F6897D": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - } - }, - "DependsOn": [ - "LambdaAPISchemaCC5CA3D2" - ] - }, - "LambdaAPILambdaDSServiceRole21CACDF8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "LambdaAPILambdaDSServiceRoleDefaultPolicyFB1B9CE8": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "funcC3A0C2E2", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "funcC3A0C2E2", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaAPILambdaDSServiceRoleDefaultPolicyFB1B9CE8", - "Roles": [ - { - "Ref": "LambdaAPILambdaDSServiceRole21CACDF8" - } - ] - } - }, - "LambdaAPILambdaDSFD6DF39B": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "Name": "LambdaDS", - "Type": "AWS_LAMBDA", - "LambdaConfig": { - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "funcC3A0C2E2", - "Arn" - ] - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "LambdaAPILambdaDSServiceRole21CACDF8", - "Arn" - ] - } - } - }, - "LambdaAPILambdaDSQuerygetPostResolver12F6EC71": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "FieldName": "getPost", - "TypeName": "Query", - "DataSourceName": "LambdaDS", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"getPost\", \"arguments\": $utils.toJson($context.arguments)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "LambdaAPILambdaDSFD6DF39B", - "LambdaAPISchemaCC5CA3D2" - ] - }, - "LambdaAPILambdaDSQueryallPostsResolver8247596A": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "FieldName": "allPosts", - "TypeName": "Query", - "DataSourceName": "LambdaDS", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"allPosts\"}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "LambdaAPILambdaDSFD6DF39B", - "LambdaAPISchemaCC5CA3D2" - ] - }, - "LambdaAPILambdaDSMutationaddPostResolverDACB9777": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "FieldName": "addPost", - "TypeName": "Mutation", - "DataSourceName": "LambdaDS", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"Invoke\", \"payload\": { \"field\": \"addPost\", \"arguments\": $utils.toJson($context.arguments)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "LambdaAPILambdaDSFD6DF39B", - "LambdaAPISchemaCC5CA3D2" - ] - }, - "LambdaAPILambdaDSPostrelatedPostsResolverDE1B941A": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "LambdaAPID6A5A92B", - "ApiId" - ] - }, - "FieldName": "relatedPosts", - "TypeName": "Post", - "DataSourceName": "LambdaDS", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"BatchInvoke\", \"payload\": { \"field\": \"relatedPosts\", \"source\": $utils.toJson($context.source)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "LambdaAPILambdaDSFD6DF39B", - "LambdaAPISchemaCC5CA3D2" - ] - }, - "funcServiceRoleA96CCB44": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "funcC3A0C2E2": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73S3Bucket096530A6" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73S3VersionKeyCF8C25D4" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73S3VersionKeyCF8C25D4" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "funcServiceRoleA96CCB44", - "Arn" - ] - }, - "Handler": "lambda-tutorial.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "funcServiceRoleA96CCB44" - ] - } - }, - "Parameters": { - "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73S3Bucket096530A6": { - "Type": "String", - "Description": "S3 bucket for asset \"8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73\"" - }, - "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73S3VersionKeyCF8C25D4": { - "Type": "String", - "Description": "S3 key for asset version \"8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73\"" - }, - "AssetParameters8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73ArtifactHash60312028": { - "Type": "String", - "Description": "Artifact hash for asset \"8deae95d7935a4885bfc15a9af9fa85591ad93f3353790f242fca60881a6ec73\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json deleted file mode 100644 index 5a00755f91307..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "Resources": { - "ApiF70053CD": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "Integ_Test_APIKey" - } - }, - "ApiSchema510EECD7": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Definition": "type test {\n id: Int!\n version: String!\n}\n\ntype Query {\n getTests: [ test! ]\n}\n\ntype Mutation {\n addTest(version: String!): test!\n}" - } - }, - "ApiDefaultApiKeyF991C37B": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Expires": 1658053715 - }, - "DependsOn": [ - "ApiSchema510EECD7" - ] - }, - "ApitestDataSourceServiceRoleACBC3F3D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApitestDataSourceServiceRoleDefaultPolicy897CD912": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestTable5769773A", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApitestDataSourceServiceRoleDefaultPolicy897CD912", - "Roles": [ - { - "Ref": "ApitestDataSourceServiceRoleACBC3F3D" - } - ] - } - }, - "ApitestDataSource96AE54D5": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "testDataSource", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "TestTable5769773A" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApitestDataSourceServiceRoleACBC3F3D", - "Arn" - ] - } - } - }, - "ApitestDataSourceQuerygetTestsResolverA3BBB672": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getTests", - "TypeName": "Query", - "DataSourceName": "testDataSource", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiSchema510EECD7", - "ApitestDataSource96AE54D5" - ] - }, - "ApitestDataSourceMutationaddTestResolver36203D6B": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "addTest", - "TypeName": "Mutation", - "DataSourceName": "testDataSource", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApiSchema510EECD7", - "ApitestDataSource96AE54D5" - ] - }, - "TestTable5769773A": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json deleted file mode 100644 index f425d5be9a287..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.expected.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "Resources": { - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "InternalUserDatabaseEnabled": false, - "MasterUserOptions": { - "MasterUserARN": { - "Fn::GetAtt": [ - "User00B015A1", - "Arn" - ] - } - } - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true - }, - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "apiC8550315": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "api" - } - }, - "apiSchema0EA92056": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" - } - }, - "apiDefaultApiKey6AB8D7C4": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - } - }, - "DependsOn": [ - "apiSchema0EA92056" - ] - }, - "apidsServiceRoleBDB08107": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "apidsServiceRoleDefaultPolicy5634EFD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "es:ESHttpDelete", - "es:ESHttpGet", - "es:ESHttpHead", - "es:ESHttpPatch", - "es:ESHttpPost", - "es:ESHttpPut" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "apidsServiceRoleDefaultPolicy5634EFD0", - "Roles": [ - { - "Ref": "apidsServiceRoleBDB08107" - } - ] - } - }, - "apids4328272F": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "Name": "ds", - "Type": "AMAZON_ELASTICSEARCH", - "ElasticsearchConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "Endpoint": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "DomainEndpoint" - ] - } - ] - ] - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "apidsServiceRoleBDB08107", - "Arn" - ] - } - } - }, - "apidsQuerygetTestsResolver5C6FBB59": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "FieldName": "getTests", - "TypeName": "Query", - "DataSourceName": "ds", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", - "ResponseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" - }, - "DependsOn": [ - "apids4328272F", - "apiSchema0EA92056" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json deleted file mode 100644 index 2077eae3e3308..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json +++ /dev/null @@ -1,538 +0,0 @@ -{ - "Resources": { - "PoolD3F588B8": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserPoolName": "myPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ApiF70053CD": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "Name": "Integ_Test_IAM", - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "AWS_IAM" - } - ], - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "DefaultAction": "ALLOW", - "UserPoolId": { - "Ref": "PoolD3F588B8" - } - } - } - }, - "ApiSchema510EECD7": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Definition": "type test @aws_iam {\n id: String!\n version: String!\n}\n\ntype Query {\n getTest(id: String!): test\n getTests: [ test! ]\n @aws_iam \n}\n\ninput TestInput {\n version: String!\n}\n\ntype Mutation {\n addTest(input: TestInput!): test\n @aws_iam\n}\n" - } - }, - "ApidsServiceRoleADC7D124": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApidsServiceRoleDefaultPolicyE5E18D6D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestTable5769773A", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApidsServiceRoleDefaultPolicyE5E18D6D", - "Roles": [ - { - "Ref": "ApidsServiceRoleADC7D124" - } - ] - } - }, - "Apids0DB53FEA": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "testDataSource", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "TestTable5769773A" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApidsServiceRoleADC7D124", - "Arn" - ] - } - } - }, - "ApidsQuerygetTestResolverCCED7EC2": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getTest", - "TypeName": "Query", - "DataSourceName": "testDataSource", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "Apids0DB53FEA", - "ApiSchema510EECD7" - ] - }, - "ApidsQuerygetTestsResolver952F49EE": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getTests", - "TypeName": "Query", - "DataSourceName": "testDataSource", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "Apids0DB53FEA", - "ApiSchema510EECD7" - ] - }, - "ApidsMutationaddTestResolverBCF0400B": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "addTest", - "TypeName": "Mutation", - "DataSourceName": "testDataSource", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "Apids0DB53FEA", - "ApiSchema510EECD7" - ] - }, - "TestTable5769773A": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LambdaIAM687B49AF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "LambdaIAMDefaultPolicy96DEA124": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "appsync:graphql", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":appsync:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":apis/", - { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "/types/Query/fields/getTests" - ] - ] - } - }, - { - "Action": "appsync:GraphQL", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":appsync:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":apis/", - { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "/types/Mutation/fields/addTest" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":appsync:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":apis/", - { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "/types/test/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaIAMDefaultPolicy96DEA124", - "Roles": [ - { - "Ref": "LambdaIAM687B49AF" - } - ] - } - }, - "testQuery6695AADE": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3Bucket7A0FC067" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3VersionKeyCF9AAB81" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3VersionKeyCF9AAB81" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "LambdaIAM687B49AF", - "Arn" - ] - }, - "Environment": { - "Variables": { - "APPSYNC_ENDPOINT": { - "Fn::GetAtt": [ - "ApiF70053CD", - "GraphQLUrl" - ] - } - } - }, - "Handler": "iam-query.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "LambdaIAMDefaultPolicy96DEA124", - "LambdaIAM687B49AF" - ] - }, - "testFailServiceRole9FF22F85": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "testFail33CE01D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3Bucket7A0FC067" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3VersionKeyCF9AAB81" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3VersionKeyCF9AAB81" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "testFailServiceRole9FF22F85", - "Arn" - ] - }, - "Environment": { - "Variables": { - "APPSYNC_ENDPOINT": { - "Fn::GetAtt": [ - "ApiF70053CD", - "GraphQLUrl" - ] - } - } - }, - "Handler": "iam-query.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "testFailServiceRole9FF22F85" - ] - } - }, - "Parameters": { - "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3Bucket7A0FC067": { - "Type": "String", - "Description": "S3 bucket for asset \"f38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044\"" - }, - "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044S3VersionKeyCF9AAB81": { - "Type": "String", - "Description": "S3 key for asset version \"f38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044\"" - }, - "AssetParametersf38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044ArtifactHash2150188D": { - "Type": "String", - "Description": "Artifact hash for asset \"f38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json deleted file mode 100644 index 803b2f0226d72..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "Resources": { - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "InternalUserDatabaseEnabled": false, - "MasterUserOptions": { - "MasterUserARN": { - "Fn::GetAtt": [ - "User00B015A1", - "Arn" - ] - } - } - }, - "ClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "EncryptionAtRestOptions": { - "Enabled": true - }, - "EngineVersion": "OpenSearch_1.2", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "apiC8550315": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "api" - } - }, - "apiSchema0EA92056": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" - } - }, - "apiDefaultApiKey6AB8D7C4": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - } - }, - "DependsOn": [ - "apiSchema0EA92056" - ] - }, - "apidsServiceRoleBDB08107": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "apidsServiceRoleDefaultPolicy5634EFD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "es:ESHttpDelete", - "es:ESHttpGet", - "es:ESHttpHead", - "es:ESHttpPatch", - "es:ESHttpPost", - "es:ESHttpPut" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "apidsServiceRoleDefaultPolicy5634EFD0", - "Roles": [ - { - "Ref": "apidsServiceRoleBDB08107" - } - ] - } - }, - "apids4328272F": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "Name": "ds", - "Type": "AMAZON_OPENSEARCH_SERVICE", - "OpenSearchServiceConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "Endpoint": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "DomainEndpoint" - ] - } - ] - ] - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "apidsServiceRoleBDB08107", - "Arn" - ] - } - } - }, - "apidsQuerygetTestsResolver5C6FBB59": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "FieldName": "getTests", - "TypeName": "Query", - "DataSourceName": "ds", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", - "ResponseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" - }, - "DependsOn": [ - "apids4328272F", - "apiSchema0EA92056" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json deleted file mode 100644 index 37f1d635fd1a0..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "Resources": { - "codefirstapi1A3CC7D2": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "api" - } - }, - "codefirstapiSchema148B6CDE": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "codefirstapi1A3CC7D2", - "ApiId" - ] - }, - "Definition": "schema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\ninterface Node {\n created: String\n edited: String\n id: ID!\n}\ntype Planet {\n name: String\n diameter: Int\n rotationPeriod: Int\n orbitalPeriod: Int\n gravity: String\n population: [String]\n climates: [String]\n terrains: [String]\n surfaceWater: Float\n created: String\n edited: String\n id: ID!\n}\ntype Species implements Node {\n name: String\n classification: String\n designation: String\n averageHeight: Float\n averageLifespan: Int\n eyeColors: [String]\n hairColors: [String]\n skinColors: [String]\n language: String\n homeworld: Planet\n created: String\n edited: String\n id: ID!\n}\ntype Query {\n getPlanets: [Planet]\n}\ntype Mutation {\n addPlanet(name: String diameter: Int rotationPeriod: Int orbitalPeriod: Int gravity: String population: [String] climates: [String] terrains: [String] surfaceWater: Float): Planet\n}\ntype Subscription {\n addedPlanets(id: ID!): Planet\n @aws_subscribe(mutations: [\"addPlanet\"])\n}\ninput AwesomeInput {\n awesomeInput: String\n}\nenum Episodes {\n The_Phantom_Menace\n Attack_of_the_Clones\n Revenge_of_the_Sith\n A_New_Hope\n The_Empire_Strikes_Back\n Return_of_the_Jedi\n The_Force_Awakens\n The_Last_Jedi\n The_Rise_of_Skywalker\n}\nunion Union = Species | Planet\n" - } - }, - "codefirstapiDefaultApiKey89863A80": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "codefirstapi1A3CC7D2", - "ApiId" - ] - } - }, - "DependsOn": [ - "codefirstapiSchema148B6CDE" - ] - }, - "codefirstapiplanetsServiceRole2F4AA8E7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "codefirstapiplanetsServiceRoleDefaultPolicy76FE4F2C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "table8235A42E", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "codefirstapiplanetsServiceRoleDefaultPolicy76FE4F2C", - "Roles": [ - { - "Ref": "codefirstapiplanetsServiceRole2F4AA8E7" - } - ] - } - }, - "codefirstapiplanets0F6BB479": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "codefirstapi1A3CC7D2", - "ApiId" - ] - }, - "Name": "planets", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "table8235A42E" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "codefirstapiplanetsServiceRole2F4AA8E7", - "Arn" - ] - } - } - }, - "codefirstapiQuerygetPlanetsResolver54E13D9A": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "codefirstapi1A3CC7D2", - "ApiId" - ] - }, - "FieldName": "getPlanets", - "TypeName": "Query", - "DataSourceName": "planets", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "codefirstapiplanets0F6BB479", - "codefirstapiSchema148B6CDE" - ] - }, - "codefirstapiMutationaddPlanetResolver49A375A3": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "codefirstapi1A3CC7D2", - "ApiId" - ] - }, - "FieldName": "addPlanet", - "TypeName": "Mutation", - "DataSourceName": "planets", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $context.arguments)\n $util.qr($input.put(\"name\", $context.arguments.name))\n$util.qr($input.put(\"diameter\", $context.arguments.diameter))\n$util.qr($input.put(\"rotationPeriod\", $context.arguments.rotationPeriod))\n$util.qr($input.put(\"orbitalPeriod\", $context.arguments.orbitalPeriod))\n$util.qr($input.put(\"gravityPeriod\", $context.arguments.gravity))\n$util.qr($input.put(\"population\", $context.arguments.population))\n$util.qr($input.put(\"climates\", $context.arguments.climates))\n$util.qr($input.put(\"terrains\", $context.arguments.terrains))\n$util.qr($input.put(\"surfaceWater\", $context.arguments.surfaceWater))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "codefirstapiplanets0F6BB479", - "codefirstapiSchema148B6CDE" - ] - }, - "table8235A42E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json deleted file mode 100644 index ac78e134f2fd7..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json +++ /dev/null @@ -1,1012 +0,0 @@ -{ - "Resources": { - "PoolD3F588B8": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserPoolName": "myPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ApiF70053CD": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "Name": "demoapi", - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "API_KEY" - } - ], - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "DefaultAction": "ALLOW", - "UserPoolId": { - "Ref": "PoolD3F588B8" - } - } - } - }, - "ApiSchema510EECD7": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" - } - }, - "ApiDefaultApiKeyF991C37B": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - } - }, - "DependsOn": [ - "ApiSchema510EECD7" - ] - }, - "Apinone1F55F3F3": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "None", - "Type": "NONE" - } - }, - "ApinoneQuerygetServiceVersionResolver336A3C2C": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getServiceVersion", - "TypeName": "Query", - "DataSourceName": "None", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\":\"2017-02-28\"}", - "ResponseMappingTemplate": "{\"version\":\"v1\"}" - }, - "DependsOn": [ - "Apinone1F55F3F3", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsServiceRole76CAD539": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApicustomerDsServiceRoleDefaultPolicyF8E72AE7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CustomerTable260DCC08", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApicustomerDsServiceRoleDefaultPolicyF8E72AE7", - "Roles": [ - { - "Ref": "ApicustomerDsServiceRole76CAD539" - } - ] - } - }, - "ApicustomerDsFE73DAC5": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Customer", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "CustomerTable260DCC08" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApicustomerDsServiceRole76CAD539", - "Arn" - ] - } - } - }, - "ApicustomerDsQuerygetCustomersResolverA74C8A2E": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomers", - "TypeName": "Query", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsQuerygetCustomerResolver3649A130": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomer", - "TypeName": "Query", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsMutationaddCustomerResolver4DE5B517": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "addCustomer", - "TypeName": "Mutation", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsMutationsaveCustomerResolver241DD231": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "saveCustomer", - "TypeName": "Mutation", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($ctx.args.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "saveCustomerWithFirstOrder", - "TypeName": "Mutation", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.order)\n $util.qr($input.put(\"referral\", referral))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"order\" : $util.dynamodb.toDynamoDBJson($util.autoId()),\"customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "removeCustomer", - "TypeName": "Mutation", - "DataSourceName": "Customer", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"DeleteItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApicustomerDsFE73DAC5", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsServiceRoleCC2040C0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApiorderDsServiceRoleDefaultPolicy3315FCF4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - "/index/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApiorderDsServiceRoleDefaultPolicy3315FCF4", - "Roles": [ - { - "Ref": "ApiorderDsServiceRoleCC2040C0" - } - ] - } - }, - "ApiorderDsB50C8AAD": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Order", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "OrderTable416EB896" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApiorderDsServiceRoleCC2040C0", - "Arn" - ] - } - } - }, - "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersEq", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersEq", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersLt", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersLtResolver77468800": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersLt", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersLe", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersLeResolver836A0389": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersLe", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersGt", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersGt", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersGe", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersGe", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersFilter", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getCustomerOrdersBetween", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersFilter", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getOrderCustomersBetween", - "TypeName": "Query", - "DataSourceName": "Order", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", - "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" - }, - "DependsOn": [ - "ApiorderDsB50C8AAD", - "ApiSchema510EECD7" - ] - }, - "ApipaymentDsServiceRole0DAC58D6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApipaymentDsServiceRoleDefaultPolicy528E42B0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/PaymentTable" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", - "Roles": [ - { - "Ref": "ApipaymentDsServiceRole0DAC58D6" - } - ] - } - }, - "ApipaymentDs95C7AC36": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Payment", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": "PaymentTable" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApipaymentDsServiceRole0DAC58D6", - "Arn" - ] - } - } - }, - "ApipaymentDsQuerygetPaymentResolverD172BFC9": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "getPayment", - "TypeName": "Query", - "DataSourceName": "Payment", - "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApipaymentDs95C7AC36", - "ApiSchema510EECD7" - ] - }, - "ApipaymentDsMutationsavePaymentResolverE09FE5BB": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "savePayment", - "TypeName": "Mutation", - "DataSourceName": "Payment", - "Kind": "UNIT", - "RequestMappingTemplate": "\n #set($input = $ctx.args.payment)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "ResponseMappingTemplate": "$util.toJson($ctx.result)" - }, - "DependsOn": [ - "ApipaymentDs95C7AC36", - "ApiSchema510EECD7" - ] - }, - "ApidsServiceRoleADC7D124": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Apids0DB53FEA": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "http", - "Type": "HTTP", - "HttpConfig": { - "Endpoint": "https://aws.amazon.com/" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApidsServiceRoleADC7D124", - "Arn" - ] - } - } - }, - "ApidsMutationdoPostOnAwsResolver9583D8A3": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "FieldName": "doPostOnAws", - "TypeName": "Mutation", - "DataSourceName": "http", - "Kind": "UNIT", - "RequestMappingTemplate": "{\n \"version\": \"2018-05-29\",\n \"method\": \"POST\",\n # if full path is https://api.xxxxxxxxx.com/posts then resourcePath would be /posts\n \"resourcePath\": \"/path/123\",\n \"params\":{\n \"body\": $util.toJson($ctx.args),\n \"headers\":{\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"$ctx.request.headers.Authorization\"\n }\n }\n }", - "ResponseMappingTemplate": "\n ## Raise a GraphQL field error in case of a datasource invocation error\n #if($ctx.error)\n $util.error($ctx.error.message, $ctx.error.type)\n #end\n ## if the response status code is not 200, then return an error. Else return the body **\n #if($ctx.result.statusCode == 200)\n ## If response is 200, return the body.\n $ctx.result.body\n #else\n ## If response is not 200, append the response to error block.\n $utils.appendError($ctx.result.body, \"$ctx.result.statusCode\")\n #end\n " - }, - "DependsOn": [ - "Apids0DB53FEA", - "ApiSchema510EECD7" - ] - }, - "CustomerTable260DCC08": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "OrderTable416EB896": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "customer", - "KeyType": "HASH" - }, - { - "AttributeName": "order", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "customer", - "AttributeType": "S" - }, - { - "AttributeName": "order", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST", - "GlobalSecondaryIndexes": [ - { - "IndexName": "orderIndex", - "KeySchema": [ - { - "AttributeName": "order", - "KeyType": "HASH" - }, - { - "AttributeName": "customer", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PaymentTableE140D25E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.expected.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.expected.json deleted file mode 100644 index bfc35b8efc2f3..0000000000000 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.expected.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Resources": { - "AthenaWorkgroup": { - "Type": "AWS::Athena::WorkGroup", - "Properties": { - "Name": "HelloWorld", - "Description": "A WorkGroup", - "RecursiveDeleteOption": true, - "State": "ENABLED", - "Tags": [ - { - "Key": "key1", - "Value": "value1" - }, - { - "Key": "key2", - "Value": "value2" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json deleted file mode 100644 index f8514c807ed91..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.expected.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-autoscaling-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "MaxInstanceLifetime": 604800, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-lt.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-lt.expected.json deleted file mode 100644 index cb8ff4827b6fb..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-lt.expected.json +++ /dev/null @@ -1,582 +0,0 @@ -{ - "Resources": { - "MainLT4FC09097": { - "Type": "AWS::EC2::LaunchTemplate", - "Properties": { - "LaunchTemplateData": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.micro", - "TagSpecifications": [ - { - "ResourceType": "instance", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/MainLT" - } - ] - }, - { - "ResourceType": "volume", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/MainLT" - } - ] - } - ] - } - } - }, - "T4gLT8FF7D308": { - "Type": "AWS::EC2::LaunchTemplate", - "Properties": { - "LaunchTemplateData": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t4g.micro", - "TagSpecifications": [ - { - "ResourceType": "instance", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/T4gLT" - } - ] - }, - { - "ResourceType": "volume", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/T4gLT" - } - ] - } - ] - } - } - }, - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "AsgFromLTASG089B7C3A": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "10", - "MinSize": "0", - "DesiredCapacity": "5", - "LaunchTemplate": { - "LaunchTemplateId": { - "Ref": "MainLT4FC09097" - }, - "Version": { - "Fn::GetAtt": [ - "MainLT4FC09097", - "LatestVersionNumber" - ] - } - }, - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "AsgFromMipASG9EFCE2FC": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "10", - "MinSize": "0", - "DesiredCapacity": "5", - "MixedInstancesPolicy": { - "InstancesDistribution": { - "OnDemandPercentageAboveBaseCapacity": 50 - }, - "LaunchTemplate": { - "LaunchTemplateSpecification": { - "LaunchTemplateId": { - "Ref": "MainLT4FC09097" - }, - "Version": { - "Fn::GetAtt": [ - "MainLT4FC09097", - "LatestVersionNumber" - ] - } - }, - "Overrides": [ - { - "InstanceType": "t3.micro" - }, - { - "InstanceType": "t3a.micro" - }, - { - "InstanceType": "t4g.micro", - "LaunchTemplateSpecification": { - "LaunchTemplateId": { - "Ref": "T4gLT8FF7D308" - }, - "Version": { - "Fn::GetAtt": [ - "T4gLT8FF7D308", - "LatestVersionNumber" - ] - } - } - } - ] - } - }, - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "AsgFromMipWithoutDistributionASG4BF292F9": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "10", - "MinSize": "0", - "DesiredCapacity": "5", - "MixedInstancesPolicy": { - "LaunchTemplate": { - "LaunchTemplateSpecification": { - "LaunchTemplateId": { - "Ref": "MainLT4FC09097" - }, - "Version": { - "Fn::GetAtt": [ - "MainLT4FC09097", - "LatestVersionNumber" - ] - } - }, - "Overrides": [ - { - "InstanceType": "t3.micro" - }, - { - "InstanceType": "t3a.micro" - }, - { - "InstanceType": "t4g.micro", - "LaunchTemplateSpecification": { - "LaunchTemplateId": { - "Ref": "T4gLT8FF7D308" - }, - "Version": { - "Fn::GetAtt": [ - "T4gLT8FF7D308", - "LatestVersionNumber" - ] - } - } - } - ] - } - }, - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - }, - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-metrics-collections.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-metrics-collections.expected.json deleted file mode 100644 index ba27663a60ccd..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-metrics-collections.expected.json +++ /dev/null @@ -1,661 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ASGInstanceSecurityGroup0525485D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-asg-integ/ASG/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/ASG" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ASGInstanceRoleE263A41B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/ASG" - } - ] - } - }, - "ASGInstanceProfile0A2834D7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGLaunchConfigC00AF12B": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ASGInstanceProfile0A2834D7" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ASGInstanceSecurityGroup0525485D", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "ASGInstanceRoleE263A41B" - ] - }, - "ASG46ED3070": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ASGLaunchConfigC00AF12B" - }, - "MetricsCollection": [ - { - "Granularity": "1Minute" - }, - { - "Granularity": "1Minute", - "Metrics": [ - "GroupPendingInstances", - "GroupStandbyInstances", - "GroupTotalInstances" - ] - } - ], - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-asg-integ/ASG" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json deleted file mode 100644 index 185201fe1f69e..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.expected.json +++ /dev/null @@ -1,759 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-asg-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceSecurityGroupfromawscdkasgintegLBSecurityGroup33FBF9CC8076F0C574": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Port 80 LB to fleet", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "LoadBalancerNames": [ - { - "Ref": "LB8A12904C" - } - ], - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-asg-integ/Fleet" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-asg-integ/LB/SecurityGroup", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Default rule allow on 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LBSecurityGrouptoawscdkasgintegFleetInstanceSecurityGroup3CA66C0C808D3B5C07": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Port 80 LB to fleet", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancing::LoadBalancer", - "Properties": { - "Listeners": [ - { - "InstancePort": "80", - "InstanceProtocol": "http", - "LoadBalancerPort": "80", - "Protocol": "http" - } - ], - "CrossZone": true, - "HealthCheck": { - "HealthyThreshold": "2", - "Interval": "30", - "Target": "HTTP:80/", - "Timeout": "5", - "UnhealthyThreshold": "5" - }, - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - ] - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet3DefaultRouteA0D29D46" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json deleted file mode 100644 index 236be6f46be9e..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.expected.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-asg-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceSecurityGroupfromawscdkasgintegLBSecurityGroup33FBF9CC8076F0C574": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-asg-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-asg-integ/Fleet" - } - ], - "TargetGroupARNs": [ - { - "Ref": "LBListenerTargetGroupF04FCF6D" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "FleetScalingPolicyAModestLoad92829613": { - "Type": "AWS::AutoScaling::ScalingPolicy", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FleetASG3971DFE5" - }, - "PolicyType": "TargetTrackingScaling", - "TargetTrackingConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ALBRequestCountPerTarget", - "ResourceLabel": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::GetAtt": [ - "LBListenerTargetGroupF04FCF6D", - "TargetGroupFullName" - ] - } - ] - ] - } - }, - "TargetValue": 60 - } - }, - "DependsOn": [ - "LBListener49E825B4", - "LBListenerTargetGroupF04FCF6D" - ] - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awscdkasgintegLB91115691", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LBSecurityGrouptoawscdkasgintegFleetInstanceSecurityGroup3CA66C0C808D3B5C07": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetGroupF04FCF6D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBListenerTargetGroupF04FCF6D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "instance", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json deleted file mode 100644 index 304e554bf120d..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.expected.json +++ /dev/null @@ -1,521 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-autoscaling-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "FleetScheduledActionScaleUpInTheMorning87C49254": { - "Type": "AWS::AutoScaling::ScheduledAction", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FleetASG3971DFE5" - }, - "MinSize": 5, - "Recurrence": "0 8 * * *" - } - }, - "FleetScheduledActionScaleDownAtNight11A03803": { - "Type": "AWS::AutoScaling::ScheduledAction", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FleetASG3971DFE5" - }, - "MaxSize": 2, - "Recurrence": "0 20 * * *" - } - }, - "FleetScalingPolicyKeepCPUReasonable89F05216": { - "Type": "AWS::AutoScaling::ScalingPolicy", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FleetASG3971DFE5" - }, - "PolicyType": "TargetTrackingScaling", - "TargetTrackingConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ASGAverageCPUUtilization" - }, - "TargetValue": 50 - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json deleted file mode 100644 index 9a01de34d1d55..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.external-role.expected.json +++ /dev/null @@ -1,642 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ASGInstanceSecurityGroup0525485D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-iam-external-role/ASG/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-iam-external-role/ASG" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ASGInstanceProfile0A2834D7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - }, - "ASGLaunchConfigC00AF12B": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ASGInstanceProfile0A2834D7" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ASGInstanceSecurityGroup0525485D", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "Role1ABCC5F0" - ] - }, - "ASG46ED3070": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ASGLaunchConfigC00AF12B" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "integ-iam-external-role/ASG" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json deleted file mode 100644 index 54ccaf7b2e51a..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.role-target-hook.expected.json +++ /dev/null @@ -1,788 +0,0 @@ -{ - "Resources": { - "myVpcAuto1A4B61E2": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto" - } - ] - } - }, - "myVpcAutoPublicSubnet1Subnet3516098F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" - } - ] - } - }, - "myVpcAutoPublicSubnet1RouteTable3D618310": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" - } - ] - } - }, - "myVpcAutoPublicSubnet1RouteTableAssociationB3A6EFAC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet1RouteTable3D618310" - }, - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet1Subnet3516098F" - } - } - }, - "myVpcAutoPublicSubnet1DefaultRoute2791173D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet1RouteTable3D618310" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myVpcAutoIGW08055396" - } - }, - "DependsOn": [ - "myVpcAutoVPCGWEC42CD12" - ] - }, - "myVpcAutoPublicSubnet1EIP15D99CAF": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" - } - ] - } - }, - "myVpcAutoPublicSubnet1NATGatewayF3EA78A2": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet1Subnet3516098F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "myVpcAutoPublicSubnet1EIP15D99CAF", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet1" - } - ] - } - }, - "myVpcAutoPublicSubnet2Subnet297C7839": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" - } - ] - } - }, - "myVpcAutoPublicSubnet2RouteTable17ECF2AC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" - } - ] - } - }, - "myVpcAutoPublicSubnet2RouteTableAssociationE21B7B6C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet2RouteTable17ECF2AC" - }, - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet2Subnet297C7839" - } - } - }, - "myVpcAutoPublicSubnet2DefaultRouteE9454F16": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet2RouteTable17ECF2AC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myVpcAutoIGW08055396" - } - }, - "DependsOn": [ - "myVpcAutoVPCGWEC42CD12" - ] - }, - "myVpcAutoPublicSubnet2EIPA484FACE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" - } - ] - } - }, - "myVpcAutoPublicSubnet2NATGatewayF670624F": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet2Subnet297C7839" - }, - "AllocationId": { - "Fn::GetAtt": [ - "myVpcAutoPublicSubnet2EIPA484FACE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet2" - } - ] - } - }, - "myVpcAutoPublicSubnet3SubnetF68815E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" - } - ] - } - }, - "myVpcAutoPublicSubnet3RouteTableD3E0A17D": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" - } - ] - } - }, - "myVpcAutoPublicSubnet3RouteTableAssociationD4E51D66": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet3RouteTableD3E0A17D" - }, - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet3SubnetF68815E0" - } - } - }, - "myVpcAutoPublicSubnet3DefaultRouteE6596C40": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPublicSubnet3RouteTableD3E0A17D" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myVpcAutoIGW08055396" - } - }, - "DependsOn": [ - "myVpcAutoVPCGWEC42CD12" - ] - }, - "myVpcAutoPublicSubnet3EIP8D506EFA": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" - } - ] - } - }, - "myVpcAutoPublicSubnet3NATGatewayC06521CD": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "myVpcAutoPublicSubnet3SubnetF68815E0" - }, - "AllocationId": { - "Fn::GetAtt": [ - "myVpcAutoPublicSubnet3EIP8D506EFA", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PublicSubnet3" - } - ] - } - }, - "myVpcAutoPrivateSubnet1SubnetCF0D49B2": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet1" - } - ] - } - }, - "myVpcAutoPrivateSubnet1RouteTableDC61148B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet1" - } - ] - } - }, - "myVpcAutoPrivateSubnet1RouteTableAssociation9848EFFB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet1RouteTableDC61148B" - }, - "SubnetId": { - "Ref": "myVpcAutoPrivateSubnet1SubnetCF0D49B2" - } - } - }, - "myVpcAutoPrivateSubnet1DefaultRouteF007F5E7": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet1RouteTableDC61148B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "myVpcAutoPublicSubnet1NATGatewayF3EA78A2" - } - } - }, - "myVpcAutoPrivateSubnet2Subnet592674AC": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet2" - } - ] - } - }, - "myVpcAutoPrivateSubnet2RouteTableE10F6006": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet2" - } - ] - } - }, - "myVpcAutoPrivateSubnet2RouteTableAssociation05CC4CEB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet2RouteTableE10F6006" - }, - "SubnetId": { - "Ref": "myVpcAutoPrivateSubnet2Subnet592674AC" - } - } - }, - "myVpcAutoPrivateSubnet2DefaultRouteDA295DF0": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet2RouteTableE10F6006" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "myVpcAutoPublicSubnet2NATGatewayF670624F" - } - } - }, - "myVpcAutoPrivateSubnet3Subnet4C2A5EDE": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet3" - } - ] - } - }, - "myVpcAutoPrivateSubnet3RouteTable22C6C602": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto/PrivateSubnet3" - } - ] - } - }, - "myVpcAutoPrivateSubnet3RouteTableAssociation3A3751AE": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet3RouteTable22C6C602" - }, - "SubnetId": { - "Ref": "myVpcAutoPrivateSubnet3Subnet4C2A5EDE" - } - } - }, - "myVpcAutoPrivateSubnet3DefaultRouteAE484D6A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myVpcAutoPrivateSubnet3RouteTable22C6C602" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "myVpcAutoPublicSubnet3NATGatewayC06521CD" - } - } - }, - "myVpcAutoIGW08055396": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/myVpcAuto" - } - ] - } - }, - "myVpcAutoVPCGWEC42CD12": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - }, - "InternetGatewayId": { - "Ref": "myVpcAutoIGW08055396" - } - } - }, - "MyRoleF48FFE04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyRoleDefaultPolicyA36BE1DD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "topic2A4FB547F" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyRoleDefaultPolicyA36BE1DD", - "Roles": [ - { - "Ref": "MyRoleF48FFE04" - } - ] - } - }, - "topic69831491": { - "Type": "AWS::SNS::Topic" - }, - "topic2A4FB547F": { - "Type": "AWS::SNS::Topic" - }, - "ASGInstanceSecurityGroup0525485D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-role-target-hook/ASG/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/ASG" - } - ], - "VpcId": { - "Ref": "myVpcAuto1A4B61E2" - } - } - }, - "ASGInstanceRoleE263A41B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-role-target-hook/ASG" - } - ] - } - }, - "ASGInstanceProfile0A2834D7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGLaunchConfigC00AF12B": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ASGInstanceProfile0A2834D7" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ASGInstanceSecurityGroup0525485D", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "ASGInstanceRoleE263A41B" - ] - }, - "ASG46ED3070": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "HealthCheckType": "EC2", - "LaunchConfigurationName": { - "Ref": "ASGLaunchConfigC00AF12B" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "integ-role-target-hook/ASG" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "myVpcAutoPrivateSubnet1SubnetCF0D49B2" - }, - { - "Ref": "myVpcAutoPrivateSubnet2Subnet592674AC" - }, - { - "Ref": "myVpcAutoPrivateSubnet3Subnet4C2A5EDE" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "LCHookNoRoleNoTarget1144AD75": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "ASG46ED3070" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING" - } - }, - "LCHookNoRoleTargetRole35B4344D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "LCHookNoRoleTargetRoleDefaultPolicyFE681941": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "topic69831491" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LCHookNoRoleTargetRoleDefaultPolicyFE681941", - "Roles": [ - { - "Ref": "LCHookNoRoleTargetRole35B4344D" - } - ] - } - }, - "LCHookNoRoleTarget4EF682CF": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "ASG46ED3070" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "NotificationTargetARN": { - "Ref": "topic69831491" - }, - "RoleARN": { - "Fn::GetAtt": [ - "LCHookNoRoleTargetRole35B4344D", - "Arn" - ] - } - }, - "DependsOn": [ - "LCHookNoRoleTargetRoleDefaultPolicyFE681941", - "LCHookNoRoleTargetRole35B4344D" - ] - }, - "LCHookRoleTarget0ADB20B8": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "ASG46ED3070" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "NotificationTargetARN": { - "Ref": "topic2A4FB547F" - }, - "RoleARN": { - "Fn::GetAtt": [ - "MyRoleF48FFE04", - "Arn" - ] - } - }, - "DependsOn": [ - "MyRoleDefaultPolicyA36BE1DD", - "MyRoleF48FFE04" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.expected.json deleted file mode 100644 index 709737be069fe..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.expected.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-autoscaling-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "SpotPrice": "0.20", - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.warm-pool.expected.json b/packages/@aws-cdk/aws-autoscaling/test/integ.warm-pool.expected.json deleted file mode 100644 index 67ee9bf5bebd7..0000000000000 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.warm-pool.expected.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FleetInstanceSecurityGroupA8C3D7AD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-autoscaling-integ/Fleet/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FleetInstanceRoleA605DB82": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ] - } - }, - "FleetInstanceProfileC6192A66": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FleetInstanceRoleA605DB82" - } - ] - } - }, - "FleetLaunchConfig59F79D36": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FleetInstanceProfileC6192A66" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FleetInstanceSecurityGroupA8C3D7AD", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "FleetInstanceRoleA605DB82" - ] - }, - "FleetASG3971DFE5": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "AutoScalingGroupName": "ASG", - "LaunchConfigurationName": { - "Ref": "FleetLaunchConfig59F79D36" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-autoscaling-integ/Fleet" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "FleetWarmPoolB57F9BC1": { - "Type": "AWS::AutoScaling::WarmPool", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FleetASG3971DFE5" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-backup/test/integ.backup.expected.json b/packages/@aws-cdk/aws-backup/test/integ.backup.expected.json deleted file mode 100644 index 1ad2aefc7c46e..0000000000000 --- a/packages/@aws-cdk/aws-backup/test/integ.backup.expected.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "FileSystem": { - "Type": "AWS::EFS::FileSystem", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Vault23237E5B": { - "Type": "AWS::Backup::BackupVault", - "Properties": { - "BackupVaultName": "cdkbackupVaultC2A6D3CB" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PlanDAF4E53A": { - "Type": "AWS::Backup::BackupPlan", - "Properties": { - "BackupPlan": { - "BackupPlanName": "Plan", - "BackupPlanRule": [ - { - "Lifecycle": { - "DeleteAfterDays": 35 - }, - "RuleName": "Daily", - "ScheduleExpression": "cron(0 5 * * ? *)", - "TargetBackupVault": { - "Fn::GetAtt": [ - "Vault23237E5B", - "BackupVaultName" - ] - } - }, - { - "Lifecycle": { - "DeleteAfterDays": 90 - }, - "RuleName": "Weekly", - "ScheduleExpression": "cron(0 5 ? * SAT *)", - "TargetBackupVault": { - "Fn::GetAtt": [ - "Vault23237E5B", - "BackupVaultName" - ] - } - }, - { - "Lifecycle": { - "DeleteAfterDays": 1825, - "MoveToColdStorageAfterDays": 90 - }, - "RuleName": "Monthly5Year", - "ScheduleExpression": "cron(0 5 1 * ? *)", - "TargetBackupVault": { - "Fn::GetAtt": [ - "Vault23237E5B", - "BackupVaultName" - ] - } - } - ] - } - } - }, - "PlanSelectionRole6D10F4B7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "backup.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup" - ] - ] - } - ] - } - }, - "PlanSelectionF88CBC04": { - "Type": "AWS::Backup::BackupSelection", - "Properties": { - "BackupPlanId": { - "Fn::GetAtt": [ - "PlanDAF4E53A", - "BackupPlanId" - ] - }, - "BackupSelection": { - "IamRoleArn": { - "Fn::GetAtt": [ - "PlanSelectionRole6D10F4B7", - "Arn" - ] - }, - "ListOfTags": [ - { - "ConditionKey": "stage", - "ConditionType": "STRINGEQUALS", - "ConditionValue": "prod" - } - ], - "Resources": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":file-system/", - { - "Ref": "FileSystem" - } - ] - ] - } - ], - "SelectionName": "Selection" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch.expected.json b/packages/@aws-cdk/aws-batch/test/integ.batch.expected.json deleted file mode 100644 index 299b04e3f66db..0000000000000 --- a/packages/@aws-cdk/aws-batch/test/integ.batch.expected.json +++ /dev/null @@ -1,1826 +0,0 @@ -{ - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet3Subnet11B92D7C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableA3C00665": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableAssociationD102D1C4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - } - } - }, - "vpcPublicSubnet3DefaultRoute3F356A11": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet3EIP2C3B9D91": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3NATGateway82F6CA9E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet3EIP2C3B9D91", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcPrivateSubnet3Subnet985AC459": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTable24DA79A0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - } - }, - "vpcPrivateSubnet3DefaultRoute30C45F47": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet3NATGateway82F6CA9E" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "batch-stack/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "ec2launchtemplate": { - "Type": "AWS::EC2::LaunchTemplate", - "Properties": { - "LaunchTemplateData": { - "BlockDeviceMappings": [ - { - "DeviceName": "/dev/xvdcz", - "Ebs": { - "Encrypted": true, - "VolumeSize": 100, - "VolumeType": "gp2" - } - } - ] - }, - "LaunchTemplateName": "EC2LaunchTemplate" - } - }, - "batchunmanagedcomputeenvResourceServiceInstanceRoleCA40AF77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - } - }, - "batchunmanagedcomputeenvED550298": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "UNMANAGED", - "ServiceRole": { - "Fn::GetAtt": [ - "batchunmanagedcomputeenvResourceServiceInstanceRoleCA40AF77", - "Arn" - ] - }, - "State": "ENABLED" - } - }, - "batchdemandcomputeenvlaunchtemplateResourceSecurityGroup23599B84": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "batch-stack/batch-demand-compute-env-launch-template/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchdemandcomputeenvlaunchtemplateEcsInstanceRole24D4E799": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchdemandcomputeenvlaunchtemplateInstanceProfile2DEC3A97": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "batchdemandcomputeenvlaunchtemplateEcsInstanceRole24D4E799" - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchdemandcomputeenvlaunchtemplateResourceServiceInstanceRole76AD99CC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchdemandcomputeenvlaunchtemplateF8A5B233": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "AllocationStrategy": "BEST_FIT", - "InstanceRole": { - "Fn::GetAtt": [ - "batchdemandcomputeenvlaunchtemplateInstanceProfile2DEC3A97", - "Arn" - ] - }, - "InstanceTypes": [ - "optimal" - ], - "LaunchTemplate": { - "LaunchTemplateName": "EC2LaunchTemplate" - }, - "MaxvCpus": 256, - "MinvCpus": 0, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "batchdemandcomputeenvlaunchtemplateResourceSecurityGroup23599B84", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Tags": { - "compute-env-tag": "123XYZ" - }, - "Type": "EC2" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "batchdemandcomputeenvlaunchtemplateResourceServiceInstanceRole76AD99CC", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchspotcomputeenvResourceSecurityGroup07B09BF9": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "batch-stack/batch-spot-compute-env/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchspotcomputeenvEcsInstanceRoleE976826B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchspotcomputeenvInstanceProfileFA613AC2": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "batchspotcomputeenvEcsInstanceRoleE976826B" - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchspotcomputeenvResourceServiceInstanceRole8B0DF5A7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchspotcomputeenv2CE4DFD9": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "AllocationStrategy": "SPOT_CAPACITY_OPTIMIZED", - "BidPercentage": 80, - "InstanceRole": { - "Fn::GetAtt": [ - "batchspotcomputeenvInstanceProfileFA613AC2", - "Arn" - ] - }, - "InstanceTypes": [ - "optimal" - ], - "MaxvCpus": 256, - "MinvCpus": 0, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "batchspotcomputeenvResourceSecurityGroup07B09BF9", - "GroupId" - ] - } - ], - "SpotIamFleetRole": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/spotfleet.amazonaws.com/AWSServiceRoleForEC2SpotFleet" - ] - ] - }, - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Type": "SPOT" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "batchspotcomputeenvResourceServiceInstanceRole8B0DF5A7", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchjobqueueE3C528F2": { - "Type": "AWS::Batch::JobQueue", - "Properties": { - "ComputeEnvironmentOrder": [ - { - "ComputeEnvironment": { - "Ref": "batchunmanagedcomputeenvED550298" - }, - "Order": 1 - }, - { - "ComputeEnvironment": { - "Ref": "batchdemandcomputeenvlaunchtemplateF8A5B233" - }, - "Order": 2 - }, - { - "ComputeEnvironment": { - "Ref": "batchspotcomputeenv2CE4DFD9" - }, - "Order": 3 - } - ], - "Priority": 1, - "State": "ENABLED" - } - }, - "batchfargatecomputeenvResourceSecurityGroupE2963776": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "batch-stack/batch-fargate-compute-env/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchfargatecomputeenvResourceServiceInstanceRole94D7AA5F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchfargatecomputeenvE9C3FCA4": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "MaxvCpus": 256, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "batchfargatecomputeenvResourceSecurityGroupE2963776", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Type": "FARGATE" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "batchfargatecomputeenvResourceServiceInstanceRole94D7AA5F", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchfargatespotcomputeenvResourceSecurityGroup923D2390": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "batch-stack/batch-fargate-spot-compute-env/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchfargatespotcomputeenvResourceServiceInstanceRole6462BFB0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchfargatespotcomputeenv374749B0": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "MaxvCpus": 256, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "batchfargatespotcomputeenvResourceSecurityGroup923D2390", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Type": "FARGATE_SPOT" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "batchfargatespotcomputeenvResourceServiceInstanceRole6462BFB0", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "batchjobfargatequeue5A12983E": { - "Type": "AWS::Batch::JobQueue", - "Properties": { - "ComputeEnvironmentOrder": [ - { - "ComputeEnvironment": { - "Ref": "batchfargatecomputeenvE9C3FCA4" - }, - "Order": 1 - }, - { - "ComputeEnvironment": { - "Ref": "batchfargatespotcomputeenv374749B0" - }, - "Order": 2 - } - ], - "Priority": 1, - "State": "ENABLED" - } - }, - "batchjobrepo4C508C51": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "batchjobdeffromecrE0E30DAD": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "Image": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "batchjobrepo4C508C51", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "batchjobrepo4C508C51", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "batchjobrepo4C508C51" - }, - ":latest" - ] - ] - }, - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { - "Type": "VCPU", - "Value": "1" - }, - { - "Type": "MEMORY", - "Value": "4" - } - ] - }, - "PlatformCapabilities": [ - "EC2" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - }, - "batchjobdeffrom4007378D": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "Image": "docker/whalesay", - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { "Type": "VCPU", "Value": "1" }, - { "Type": "MEMORY", "Value": "4" } - ] - }, - "PlatformCapabilities": [ - "EC2" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - }, - "executionroleD9A39BE6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "batchjobdeffargate7FE30059": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "executionroleD9A39BE6", - "Arn" - ] - }, - "Image": "docker/whalesay", - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { - "Type": "VCPU", - "Value": "0.25" - }, - { - "Type": "MEMORY", - "Value": "512" - } - ] - }, - "PlatformCapabilities": [ - "FARGATE" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-chatbot/test/integ.chatbot-logretention.expected.json b/packages/@aws-cdk/aws-chatbot/test/integ.chatbot-logretention.expected.json deleted file mode 100644 index 894a8938f900f..0000000000000 --- a/packages/@aws-cdk/aws-chatbot/test/integ.chatbot-logretention.expected.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "Resources": { - "MySlackChannelConfigurationRole1D3F23AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "chatbot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MySlackChannelConfigurationRoleDefaultPolicyE4C1FA62": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Resource": "arn:aws:s3:::abc/xyz/123.txt" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MySlackChannelConfigurationRoleDefaultPolicyE4C1FA62", - "Roles": [ - { - "Ref": "MySlackChannelConfigurationRole1D3F23AE" - } - ] - } - }, - "MySlackChannelA8E0B56C": { - "Type": "AWS::Chatbot::SlackChannelConfiguration", - "Properties": { - "ConfigurationName": "test-channel", - "IamRoleArn": { - "Fn::GetAtt": [ - "MySlackChannelConfigurationRole1D3F23AE", - "Arn" - ] - }, - "SlackChannelId": "C0187JABUE9", - "SlackWorkspaceId": "T49239U4W", - "LoggingLevel": "NONE" - } - }, - "MySlackChannelLogRetention84AA443F": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": "/aws/chatbot/test-channel", - "LogGroupRegion": "us-east-1", - "RetentionInDays": 30 - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteRetentionPolicy", - "logs:PutRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs14.x", - "Code": { - "S3Bucket": { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Parameters": { - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B": { - "Type": "String", - "Description": "S3 bucket for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332": { - "Type": "String", - "Description": "S3 key for asset version \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665ArtifactHashF4A1E70E": { - "Type": "String", - "Description": "Artifact hash for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-chatbot/test/integ.chatbot.expected.json b/packages/@aws-cdk/aws-chatbot/test/integ.chatbot.expected.json deleted file mode 100644 index 1cf6a7afbdd1f..0000000000000 --- a/packages/@aws-cdk/aws-chatbot/test/integ.chatbot.expected.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "Resources": { - "MySlackChannelConfigurationRole1D3F23AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "chatbot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MySlackChannelConfigurationRoleDefaultPolicyE4C1FA62": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Resource": "arn:aws:s3:::abc/xyz/123.txt" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MySlackChannelConfigurationRoleDefaultPolicyE4C1FA62", - "Roles": [ - { - "Ref": "MySlackChannelConfigurationRole1D3F23AE" - } - ] - } - }, - "MySlackChannelA8E0B56C": { - "Type": "AWS::Chatbot::SlackChannelConfiguration", - "Properties": { - "ConfigurationName": "test-channel", - "IamRoleArn": { - "Fn::GetAtt": [ - "MySlackChannelConfigurationRole1D3F23AE", - "Arn" - ] - }, - "SlackChannelId": "C0187JABUE9", - "SlackWorkspaceId": "T49239U4W", - "LoggingLevel": "NONE" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/integ.cloud9.expected.json b/packages/@aws-cdk/aws-cloud9/test/integ.cloud9.expected.json deleted file mode 100644 index 86777d556cc3d..0000000000000 --- a/packages/@aws-cdk/aws-cloud9/test/integ.cloud9.expected.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "foo" - } - }, - "C9EnvF05FC3BE": { - "Type": "AWS::Cloud9::EnvironmentEC2", - "Properties": { - "InstanceType": "t2.micro", - "Repositories": [ - { - "PathComponent": "/foo", - "RepositoryUrl": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "CloneUrlHttp" - ] - } - } - ], - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - } - }, - "Outputs": { - "URL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "AWS::Region" - }, - ".console.aws.amazon.com/cloud9/ide/", - { - "Ref": "C9EnvF05FC3BE" - } - ] - ] - } - }, - "ARN": { - "Value": { - "Fn::GetAtt": [ - "C9EnvF05FC3BE", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.expected.json deleted file mode 100644 index 8c3fc43456cb2..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.expected.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "Resources": { - "CustomReflectCustomResourceProviderRoleB4B29AEC": { - "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" - } - ] - } - }, - "CustomReflectCustomResourceProviderHandler2E189D0B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2S3Bucket583D2319" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2S3VersionKey9E55A55A" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2S3VersionKey9E55A55A" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomReflectCustomResourceProviderRoleB4B29AEC", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": "veni vidi vici" - }, - "DependsOn": [ - "CustomReflectCustomResourceProviderRoleB4B29AEC" - ] - }, - "MyResource": { - "Type": "Custom::Reflect", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomReflectCustomResourceProviderHandler2E189D0B", - "Arn" - ] - }, - "physicalResourceId": "MyPhysicalReflectBack", - "attributes": { - "Attribute1": "foo", - "Attribute2": 1234 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2S3Bucket583D2319": { - "Type": "String", - "Description": "S3 bucket for asset \"f668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2\"" - }, - "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2S3VersionKey9E55A55A": { - "Type": "String", - "Description": "S3 key for asset version \"f668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2\"" - }, - "AssetParametersf668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2ArtifactHashD6C9265F": { - "Type": "String", - "Description": "Artifact hash for asset \"f668ac061a3c96c2a1ff8d441720965e8a44caf19c1c7efb7e648e51d0f742b2\"" - } - }, - "Outputs": { - "Ref": { - "Value": { - "Ref": "MyResource" - } - }, - "GetAttAttribute1": { - "Value": { - "Fn::GetAtt": [ - "MyResource", - "Attribute1" - ] - } - }, - "GetAttAttribute2": { - "Value": { - "Fn::GetAtt": [ - "MyResource", - "Attribute2" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.expected.json deleted file mode 100644 index d290134fa1cb6..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.expected.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "Resources": { - "SubscriberQueueC193DC66": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SubscriberQueuePolicy25A0799E": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic02C2D1254Ref" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - }, - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic1474E5389Ref" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - }, - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic22C710DC4Ref" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "SubscriberQueueC193DC66" - } - ] - } - }, - "SubscriberQueuenestedstackstestNestedStack1topic089C5EB1396F65087": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic02C2D1254Ref" - ] - }, - "Endpoint": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - } - }, - "SubscriberQueuenestedstackstestNestedStack1topic1150E1A929A2C267E": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic1474E5389Ref" - ] - }, - "Endpoint": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - } - }, - "SubscriberQueuenestedstackstestNestedStack1topic209B8719858511914": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Fn::GetAtt": [ - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52", - "Outputs.nestedstackstestNestedStack1topic22C710DC4Ref" - ] - }, - "Endpoint": { - "Fn::GetAtt": [ - "SubscriberQueueC193DC66", - "Arn" - ] - } - } - }, - "NestedStack1NestedStackNestedStack1NestedStackResource7E64AD52": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4S3Bucket06F505B9" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4S3VersionKey06BEDE93" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4S3VersionKey06BEDE93" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "TopicNamePrefix": "Prefix1", - "referencetonestedstackstestSubscriberQueue39409787Ref": { - "Ref": "SubscriberQueueC193DC66" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "NestedStack2NestedStackNestedStack2NestedStackResourceFDF82E43": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfS3BucketB322F951" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfS3VersionKeyAA9C5AF4" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfS3VersionKeyAA9C5AF4" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "TopicNamePrefix": "Prefix2" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4S3Bucket06F505B9": { - "Type": "String", - "Description": "S3 bucket for asset \"91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4\"" - }, - "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4S3VersionKey06BEDE93": { - "Type": "String", - "Description": "S3 key for asset version \"91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4\"" - }, - "AssetParameters91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4ArtifactHash407EE1C2": { - "Type": "String", - "Description": "Artifact hash for asset \"91169429f2b5b85501c7b1b9d7beeb80c9bb6f4891f4e600fcaf65a8817ce0f4\"" - }, - "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfS3BucketB322F951": { - "Type": "String", - "Description": "S3 bucket for asset \"0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22df\"" - }, - "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfS3VersionKeyAA9C5AF4": { - "Type": "String", - "Description": "S3 key for asset version \"0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22df\"" - }, - "AssetParameters0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22dfArtifactHash5D335705": { - "Type": "String", - "Description": "Artifact hash for asset \"0d0404717d8867c09534f2cf382e8e24531ff64a968afa2efd7f071ad65a22df\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.expected.json deleted file mode 100644 index 45b52a4c8016d..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.expected.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "Resources": { - "NestedNestedStackNestedNestedStackResourceDEFDAA4D": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabS3Bucket2E4E0318" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabS3VersionKeyF6AB1DF2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabS3VersionKeyF6AB1DF2" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetonestedstacksassetsAssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3BucketFE27EEBCRef": { - "Ref": "AssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3Bucket8C5997AB" - }, - "referencetonestedstacksassetsAssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3VersionKey24D35F02Ref": { - "Ref": "AssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3VersionKey81BEC7FB" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3Bucket8C5997AB": { - "Type": "String", - "Description": "S3 bucket for asset \"bbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51\"" - }, - "AssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51S3VersionKey81BEC7FB": { - "Type": "String", - "Description": "S3 key for asset version \"bbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51\"" - }, - "AssetParametersbbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51ArtifactHashB77349F4": { - "Type": "String", - "Description": "Artifact hash for asset \"bbe209afddb09a12327bab7a105e085758a29b769b5b4bf5b6320ac41b05fc51\"" - }, - "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabS3Bucket2E4E0318": { - "Type": "String", - "Description": "S3 bucket for asset \"7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aab\"" - }, - "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabS3VersionKeyF6AB1DF2": { - "Type": "String", - "Description": "S3 key for asset version \"7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aab\"" - }, - "AssetParameters7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aabArtifactHash63670210": { - "Type": "String", - "Description": "Artifact hash for asset \"7bd7ccfde94a4ad94f13971f10733ee01020eb6d7538b7a5c2b05966db2c0aab\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.expected.json deleted file mode 100644 index 8e1abf0743734..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.expected.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "Resources": { - "Level1ABBD39B3": { - "Type": "AWS::SNS::Topic" - }, - "Nested1NestedStackNested1NestedStackResourceCD0AD36B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703S3BucketD17502DC" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703S3VersionKeyA042251F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703S3VersionKeyA042251F" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetonestedstacksmultirefsLevel19FB2466DTopicName": { - "Fn::GetAtt": [ - "Level1ABBD39B3", - "TopicName" - ] - }, - "referencetonestedstacksmultirefsAssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3Bucket03F0C3B1Ref": { - "Ref": "AssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3Bucket58724FCA" - }, - "referencetonestedstacksmultirefsAssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3VersionKey5F9CF809Ref": { - "Ref": "AssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3VersionKey2CCE0573" - }, - "referencetonestedstacksmultirefsAssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3Bucket119ED767Ref": { - "Ref": "AssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3BucketAF9A3A0F" - }, - "referencetonestedstacksmultirefsAssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3VersionKeyDCF85FE2Ref": { - "Ref": "AssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3VersionKey2F85340C" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3Bucket58724FCA": { - "Type": "String", - "Description": "S3 bucket for asset \"495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3a\"" - }, - "AssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aS3VersionKey2CCE0573": { - "Type": "String", - "Description": "S3 key for asset version \"495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3a\"" - }, - "AssetParameters495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3aArtifactHashAE1436B7": { - "Type": "String", - "Description": "Artifact hash for asset \"495a6bc36c13a0adeb3778c921d18ac4a8205f5471108fcc199a291d14855c3a\"" - }, - "AssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3BucketAF9A3A0F": { - "Type": "String", - "Description": "S3 bucket for asset \"c2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441\"" - }, - "AssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441S3VersionKey2F85340C": { - "Type": "String", - "Description": "S3 key for asset version \"c2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441\"" - }, - "AssetParametersc2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441ArtifactHash5D93ED07": { - "Type": "String", - "Description": "Artifact hash for asset \"c2fbfb6df004b51bb870bd1f5cabda73830a59765a6c766aca0e906ec1e22441\"" - }, - "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703S3BucketD17502DC": { - "Type": "String", - "Description": "S3 bucket for asset \"2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703\"" - }, - "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703S3VersionKeyA042251F": { - "Type": "String", - "Description": "S3 key for asset version \"2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703\"" - }, - "AssetParameters2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703ArtifactHash8853E261": { - "Type": "String", - "Description": "Artifact hash for asset \"2fa66e9dea71b1e05ebeed281df124cbaca34247ae93c767a533b6346cc17703\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.expected.json deleted file mode 100644 index 0145629ff176e..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.expected.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "Resources": { - "NestedStackNestedStackNestedStackNestedStackResourceB70834FD": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856S3BucketDF3BC15F" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856S3VersionKey1BCA0E57" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856S3VersionKey1BCA0E57" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetonestedstacksmultiAssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3Bucket41B3528FRef": { - "Ref": "AssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3Bucket9165C850" - }, - "referencetonestedstacksmultiAssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3VersionKey2F819BA6Ref": { - "Ref": "AssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3VersionKey8C8E79CA" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3Bucket9165C850": { - "Type": "String", - "Description": "S3 bucket for asset \"e3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809d\"" - }, - "AssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dS3VersionKey8C8E79CA": { - "Type": "String", - "Description": "S3 key for asset version \"e3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809d\"" - }, - "AssetParameterse3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809dArtifactHash1839B0E9": { - "Type": "String", - "Description": "Artifact hash for asset \"e3410ccec04414535f1c8035ce0ea42f59eedf66d0e6d0eec8bc435c4a4e809d\"" - }, - "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856S3BucketDF3BC15F": { - "Type": "String", - "Description": "S3 bucket for asset \"686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856\"" - }, - "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856S3VersionKey1BCA0E57": { - "Type": "String", - "Description": "S3 key for asset version \"686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856\"" - }, - "AssetParameters686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856ArtifactHash9043932C": { - "Type": "String", - "Description": "Artifact hash for asset \"686794a6d724e01e517bba15106edebf9db8d4bb309f0c60d5ff55a11db4a856\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-nested-export-to-sibling.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-nested-export-to-sibling.expected.json deleted file mode 100644 index 115a1f9130ae3..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-nested-export-to-sibling.expected.json +++ /dev/null @@ -1,108 +0,0 @@ -[ - { - "Resources": { - "NestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219S3BucketF628ECFB" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219S3VersionKey0E649F42" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219S3VersionKey0E649F42" - } - ] - } - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ExportsOutputFnGetAttNestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305BOutputsStack1NestedUnderStack1TopicInNestedUnderStack136BDF841TopicNameD753D416": { - "Value": { - "Fn::GetAtt": [ - "NestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305B", - "Outputs.Stack1NestedUnderStack1TopicInNestedUnderStack136BDF841TopicName" - ] - }, - "Export": { - "Name": "Stack1:ExportsOutputFnGetAttNestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305BOutputsStack1NestedUnderStack1TopicInNestedUnderStack136BDF841TopicNameD753D416" - } - } - }, - "Parameters": { - "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219S3BucketF628ECFB": { - "Type": "String", - "Description": "S3 bucket for asset \"5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219\"" - }, - "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219S3VersionKey0E649F42": { - "Type": "String", - "Description": "S3 key for asset version \"5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219\"" - }, - "AssetParameters5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219ArtifactHash37AA0C4D": { - "Type": "String", - "Description": "Artifact hash for asset \"5bbe5621d9656843b414db3e449d8c562b0b27bb293ef6999180dc5198c70219\"" - } - } - }, - { - "Resources": { - "TopicInStack27FD9238C": { - "Type": "AWS::SNS::Topic", - "Properties": { - "DisplayName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "-", - { - "Fn::ImportValue": "Stack1:ExportsOutputFnGetAttNestedUnderStack1NestedStackNestedUnderStack1NestedStackResourceF616305BOutputsStack1NestedUnderStack1TopicInNestedUnderStack136BDF841TopicNameD753D416" - } - ] - } - ] - } - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.expected.json deleted file mode 100644 index 299d5005eff0f..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.expected.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - } - }, - "Outputs": { - "ExportsOutputFnGetAttMyTopic86869434TopicNameFCC96FA2": { - "Value": { - "Fn::GetAtt": [ - "MyTopic86869434", - "TopicName" - ] - }, - "Export": { - "Name": "nest-stacks-refs1-producer:ExportsOutputFnGetAttMyTopic86869434TopicNameFCC96FA2" - } - } - } - }, - { - "Resources": { - "Nested1NestedStackNested1NestedStackResourceCD0AD36B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46S3BucketE30948C8" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46S3VersionKeyDEA9E5AE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46S3VersionKeyDEA9E5AE" - } - ] - } - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46S3BucketE30948C8": { - "Type": "String", - "Description": "S3 bucket for asset \"f780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46\"" - }, - "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46S3VersionKeyDEA9E5AE": { - "Type": "String", - "Description": "S3 key for asset version \"f780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46\"" - }, - "AssetParametersf780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46ArtifactHashFCB5E601": { - "Type": "String", - "Description": "Artifact hash for asset \"f780d24543a81dc89296e718fbad166c6cc0223026f7a142a0ad9cb21de3ac46\"" - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.expected.json deleted file mode 100644 index c6e818da02313..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.expected.json +++ /dev/null @@ -1,116 +0,0 @@ -[ - { - "Resources": { - "Nested1NestedStackNested1NestedStackResourceCD0AD36B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883S3Bucket88569758" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883S3VersionKey2661E5B6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883S3VersionKey2661E5B6" - } - ] - } - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ExportsOutputFnGetAttNested1NestedStackNested1NestedStackResourceCD0AD36BOutputsnestedstacksrefs2parentwithproducerNested1MyTopic9E26C363TopicNameF4BCEDAF": { - "Value": { - "Fn::GetAtt": [ - "Nested1NestedStackNested1NestedStackResourceCD0AD36B", - "Outputs.nestedstacksrefs2parentwithproducerNested1MyTopic9E26C363TopicName" - ] - }, - "Export": { - "Name": "nested-stacks-refs2-parent-with-producer:ExportsOutputFnGetAttNested1NestedStackNested1NestedStackResourceCD0AD36BOutputsnestedstacksrefs2parentwithproducerNested1MyTopic9E26C363TopicNameF4BCEDAF" - } - } - }, - "Parameters": { - "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883S3Bucket88569758": { - "Type": "String", - "Description": "S3 bucket for asset \"89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883\"" - }, - "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883S3VersionKey2661E5B6": { - "Type": "String", - "Description": "S3 key for asset version \"89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883\"" - }, - "AssetParameters89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883ArtifactHashF75589EB": { - "Type": "String", - "Description": "Artifact hash for asset \"89ace718d1ec985253be4d688a4632c5f15e28247cedbf99a756c83096315883\"" - } - } - }, - { - "Resources": { - "ConsumerTopic6F402371": { - "Type": "AWS::SNS::Topic", - "Properties": { - "DisplayName": { - "Fn::Join": [ - "", - [ - "Consuming ", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "-", - { - "Fn::ImportValue": "nested-stacks-refs2-parent-with-producer:ExportsOutputFnGetAttNested1NestedStackNested1NestedStackResourceCD0AD36BOutputsnestedstacksrefs2parentwithproducerNested1MyTopic9E26C363TopicNameF4BCEDAF" - } - ] - } - ] - } - ] - ] - } - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.expected.json b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.expected.json deleted file mode 100644 index 2ef738be2c023..0000000000000 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.expected.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "Resources": { - "Nested1NestedStackNested1NestedStackResourceCD0AD36B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aS3Bucket3AC5D089" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aS3VersionKeyB0263A92" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aS3VersionKeyB0263A92" - } - ] - } - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Nested2NestedStackNested2NestedStackResource877A1112": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583S3Bucket72E4418F" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583S3VersionKeyC46A55B6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583S3VersionKeyC46A55B6" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetonestedstacksrefs3siblingsNested1NestedStackNested1NestedStackResourceE58B6825Outputsnestedstacksrefs3siblingsNested1MyTopic12458558TopicName": { - "Fn::GetAtt": [ - "Nested1NestedStackNested1NestedStackResourceCD0AD36B", - "Outputs.nestedstacksrefs3siblingsNested1MyTopic12458558TopicName" - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aS3Bucket3AC5D089": { - "Type": "String", - "Description": "S3 bucket for asset \"008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9a\"" - }, - "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aS3VersionKeyB0263A92": { - "Type": "String", - "Description": "S3 key for asset version \"008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9a\"" - }, - "AssetParameters008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9aArtifactHashEF790DCB": { - "Type": "String", - "Description": "Artifact hash for asset \"008e281fb3039601b8fbef60e255afe78cb00a09611d1aa7342f56328aef7d9a\"" - }, - "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583S3Bucket72E4418F": { - "Type": "String", - "Description": "S3 bucket for asset \"2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583\"" - }, - "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583S3VersionKeyC46A55B6": { - "Type": "String", - "Description": "S3 key for asset version \"2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583\"" - }, - "AssetParameters2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583ArtifactHashDF52341B": { - "Type": "String", - "Description": "Artifact hash for asset \"2e7ce09a9e0721d268d734287b72d071ed542a05451e3b53dfcb5ae4e76cc583\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.http-origin.expected.json b/packages/@aws-cdk/aws-cloudfront-origins/test/integ.http-origin.expected.json deleted file mode 100644 index 26050089a2cd3..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.http-origin.expected.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "Resources": { - "Distribution830FAC52": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "cloudfronthttporiginDistributionOrigin162B02709", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only", - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "www.example.com", - "Id": "cloudfronthttporiginDistributionOrigin162B02709" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.load-balancer-origin.expected.json b/packages/@aws-cdk/aws-cloudfront-origins/test/integ.load-balancer-origin.expected.json deleted file mode 100644 index 2b239913260ba..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.load-balancer-origin.expected.json +++ /dev/null @@ -1,443 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cloudfront-load-balancer-origin/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB cloudfrontloadbalanceroriginLB8CFBA9DF", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Distribution830FAC52": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "cloudfrontloadbalanceroriginDistributionOrigin1BCC75186", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only", - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - }, - "Id": "cloudfrontloadbalanceroriginDistributionOrigin1BCC75186" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.origin-group.expected.json b/packages/@aws-cdk/aws-cloudfront-origins/test/integ.origin-group.expected.json deleted file mode 100644 index ecd2096329404..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.origin-group.expected.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Principal": { - "CanonicalUser": { - "Fn::GetAtt": [ - "DistributionOrigin1S3Origin5F5C0696", - "S3CanonicalUserId" - ] - } - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DistributionOrigin1S3Origin5F5C0696": { - "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", - "Properties": { - "CloudFrontOriginAccessIdentityConfig": { - "Comment": "Identity for cloudfrontorigingroupDistributionOrigin137659A54" - } - } - }, - "Distribution830FAC52": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "CacheBehaviors": [ - { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "PathPattern": "/api", - "TargetOriginId": "cloudfrontorigingroupDistributionOriginGroup10B57F1D1", - "ViewerProtocolPolicy": "allow-all" - } - ], - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "cloudfrontorigingroupDistributionOriginGroup10B57F1D1", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "OriginGroups": { - "Items": [ - { - "FailoverCriteria": { - "StatusCodes": { - "Items": [ - 500, - 502, - 503, - 504 - ], - "Quantity": 4 - } - }, - "Id": "cloudfrontorigingroupDistributionOriginGroup10B57F1D1", - "Members": { - "Items": [ - { - "OriginId": "cloudfrontorigingroupDistributionOrigin137659A54" - }, - { - "OriginId": "cloudfrontorigingroupDistributionOrigin2CCE5D500" - } - ], - "Quantity": 2 - } - } - ], - "Quantity": 1 - }, - "Origins": [ - { - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "cloudfrontorigingroupDistributionOrigin137659A54", - "S3OriginConfig": { - "OriginAccessIdentity": { - "Fn::Join": [ - "", - [ - "origin-access-identity/cloudfront/", - { - "Ref": "DistributionOrigin1S3Origin5F5C0696" - } - ] - ] - } - } - }, - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only", - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "www.example.com", - "Id": "cloudfrontorigingroupDistributionOrigin2CCE5D500" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin-oai.expected.json b/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin-oai.expected.json deleted file mode 100644 index 0f0d9e291dc77..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin-oai.expected.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Principal": { - "CanonicalUser": { - "Fn::GetAtt": [ - "OriginAccessIdentityDF1E3CAC", - "S3CanonicalUserId" - ] - } - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "OriginAccessIdentityDF1E3CAC": { - "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", - "Properties": { - "CloudFrontOriginAccessIdentityConfig": { - "Comment": "Identity for bucket provided by test" - } - } - }, - "Distribution830FAC52": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "cloudfronts3originoaiDistributionOrigin1516C5A91", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "cloudfronts3originoaiDistributionOrigin1516C5A91", - "S3OriginConfig": { - "OriginAccessIdentity": { - "Fn::Join": [ - "", - [ - "origin-access-identity/cloudfront/", - { - "Ref": "OriginAccessIdentityDF1E3CAC" - } - ] - ] - } - } - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin.expected.json b/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin.expected.json deleted file mode 100644 index 25461aa9cf7de..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront-origins/test/integ.s3-origin.expected.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Principal": { - "CanonicalUser": { - "Fn::GetAtt": [ - "DistributionOrigin1S3Origin5F5C0696", - "S3CanonicalUserId" - ] - } - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DistributionOrigin1S3Origin5F5C0696": { - "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", - "Properties": { - "CloudFrontOriginAccessIdentityConfig": { - "Comment": "Identity for cloudfronts3originDistributionOrigin1741C4E95" - } - } - }, - "Distribution830FAC52": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "cloudfronts3originDistributionOrigin1741C4E95", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "cloudfronts3originDistributionOrigin1741C4E95", - "S3OriginConfig": { - "OriginAccessIdentity": { - "Fn::Join": [ - "", - [ - "origin-access-identity/cloudfront/", - { - "Ref": "DistributionOrigin1S3Origin5F5C0696" - } - ] - ] - } - } - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json deleted file mode 100644 index 5bdfba44e3ae1..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AnAmazingWebsiteProbablyCFDistribution47E3983B": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Logging": { - "Bucket": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "IncludeCookies": true, - "Prefix": "test-prefix" - }, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "https-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "brelandm.a2z.com", - "Id": "origin1", - "OriginCustomHeaders": [ - { - "HeaderName": "X-Custom-Header", - "HeaderValue": "somevalue" - } - ] - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - }, - "AnAmazingWebsiteProbably2LoggingBucket222F7CE9": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "AES256" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AnAmazingWebsiteProbably2CFDistribution7C1CCD12": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Logging": { - "Bucket": { - "Fn::GetAtt": [ - "AnAmazingWebsiteProbably2LoggingBucket222F7CE9", - "RegionalDomainName" - ] - }, - "IncludeCookies": false - }, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "https-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "brelandm.a2z.com", - "Id": "origin1", - "OriginCustomHeaders": [ - { - "HeaderName": "X-Custom-Header", - "HeaderValue": "somevalue" - } - ] - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom-s3.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom-s3.expected.json deleted file mode 100644 index c5a63febc279a..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom-s3.expected.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "WebsiteConfiguration": { - "ErrorDocument": "404.html", - "IndexDocument": "index.html" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Principal": { - "AWS": "*" - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DistributionCFDistribution882A7313": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "http-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Fn::GetAtt": [ - "Bucket83908E77", - "WebsiteURL" - ] - } - ] - } - ] - }, - "Id": "origin1" - } - ], - "PriceClass": "PriceClass_200", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom.expected.json deleted file mode 100644 index 5943d0d822d3c..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-custom.expected.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "Resources": { - "AnAmazingWebsiteProbablyCFDistribution47E3983B": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "https-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "brelandm.a2z.com", - "Id": "origin1", - "OriginCustomHeaders": [ - { - "HeaderName": "X-Custom-Header", - "HeaderValue": "somevalue" - } - ] - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-empty-root.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-empty-root.expected.json deleted file mode 100644 index 9b20011d6a9a1..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-empty-root.expected.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "Resources": { - "AnAmazingWebsiteProbablyCFDistribution47E3983B": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "https-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "brelandm.a2z.com", - "Id": "origin1", - "OriginCustomHeaders": [ - { - "HeaderName": "X-Custom-Header", - "HeaderValue": "somevalue" - } - ] - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-failover.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-failover.expected.json deleted file mode 100644 index acbb600866f7e..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-failover.expected.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "Resources": { - "bucket1D4C77784": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "bucket231DE1803": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DistributionCFDistribution882A7313": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "OriginGroup1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "OriginGroups": { - "Items": [ - { - "FailoverCriteria": { - "StatusCodes": { - "Items": [ - 500 - ], - "Quantity": 1 - } - }, - "Id": "OriginGroup1", - "Members": { - "Items": [ - { - "OriginId": "origin1" - }, - { - "OriginId": "originSecondary1" - } - ], - "Quantity": 2 - } - } - ], - "Quantity": 1 - }, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "bucket231DE1803", - "RegionalDomainName" - ] - }, - "Id": "originSecondary1", - "S3OriginConfig": {} - }, - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "bucket1D4C77784", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - }, - "Outputs": { - "DistributionDomainName": { - "Value": { - "Fn::GetAtt": [ - "DistributionCFDistribution882A7313", - "DomainName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-geo-restrictions.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-geo-restrictions.expected.json deleted file mode 100644 index 5fc5a888c4c11..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-geo-restrictions.expected.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyDistributionCFDistributionDE147309": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "Restrictions": { - "GeoRestriction": { - "Locations": [ - "US", - "GB" - ], - "RestrictionType": "whitelist" - } - }, - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-ipv6-disabled.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-ipv6-disabled.expected.json deleted file mode 100644 index 30bc881df48f3..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-ipv6-disabled.expected.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyDistributionCFDistributionDE147309": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": false, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-key-group.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-key-group.expected.json deleted file mode 100644 index 45191bad86cff..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-key-group.expected.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "Resources": { - "AwesomePublicKeyED3E7F55": { - "Type": "AWS::CloudFront::PublicKey", - "Properties": { - "PublicKeyConfig": { - "CallerReference": "c88e460888c5762c9c47ac0cdc669370d787fb2d9f", - "EncodedKey": "-----BEGIN PUBLIC KEY-----\n MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAudf8/iNkQgdvjEdm6xYS\n JAyxd/kGTbJfQNg9YhInb7TSm0dGu0yx8yZ3fnpmxuRPqJIlaVr+fT4YRl71gEYa\n dlhHmnVegyPNjP9dNqZ7zwNqMEPOPnS/NOHbJj1KYKpn1f8pPNycQ5MQCntKGnSj\n 6fc+nbcC0joDvGz80xuy1W4hLV9oC9c3GT26xfZb2jy9MVtA3cppNuTwqrFi3t6e\n 0iGpraxZlT5wewjZLpQkngqYr6s3aucPAZVsGTEYPo4nD5mswmtZOm+tgcOrivtD\n /3sD/qZLQ6c5siqyS8aTraD6y+VXugujfarTU65IeZ6QAUbLMsWuZOIi5Jn8zAwx\n NQIDAQAB\n -----END PUBLIC KEY-----\n ", - "Name": "awscdkcloudfrontcustomAwesomePublicKey0E83393B" - } - } - }, - "AwesomeKeyGroup3EF8348B": { - "Type": "AWS::CloudFront::KeyGroup", - "Properties": { - "KeyGroupConfig": { - "Items": [ - { - "Ref": "AwesomePublicKeyED3E7F55" - } - ], - "Name": "awscdkcloudfrontcustomAwesomeKeyGroup73FD4DCA" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-lambda-association.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-lambda-association.expected.json deleted file mode 100644 index d8528288e52d0..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-lambda-association.expected.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LambdaServiceRoleA8ED4D3B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "edgelambda.amazonaws.com", - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaD247545B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaServiceRoleA8ED4D3B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaServiceRoleA8ED4D3B" - ] - }, - "LambdaVersionFA49E61E": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "LambdaD247545B" - } - } - }, - "MyDistributionCFDistributionDE147309": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "LambdaFunctionAssociations": [ - { - "EventType": "origin-request", - "LambdaFunctionARN": { - "Ref": "LambdaVersionFA49E61E" - } - } - ], - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.expected.json deleted file mode 100644 index 72ed767994cc0..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.expected.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::cloudfront:user/CloudFront Origin Access Identity ", - { - "Ref": "OAI" - } - ] - ] - } - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "OAI": { - "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", - "Properties": { - "CloudFrontOriginAccessIdentityConfig": { - "Comment": "Allows CloudFront to reach the bucket!" - } - } - }, - "DistributionCFDistribution882A7313": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": { - "OriginAccessIdentity": { - "Fn::Join": [ - "", - [ - "origin-access-identity/cloudfront/", - { - "Ref": "OAI" - } - ] - ] - } - } - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - }, - "Outputs": { - "DistributionDomainName": { - "Value": { - "Fn::GetAtt": [ - "DistributionCFDistribution882A7313", - "DomainName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-security-policy.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-security-policy.expected.json deleted file mode 100644 index 068f2e3492856..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-security-policy.expected.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "Resources": { - "AnAmazingWebsiteProbablyCFDistribution47E3983B": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "Aliases": [ - "test.test.com" - ], - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "CustomOriginConfig": { - "HTTPPort": 80, - "HTTPSPort": 443, - "OriginKeepaliveTimeout": 5, - "OriginProtocolPolicy": "https-only", - "OriginReadTimeout": 30, - "OriginSSLProtocols": [ - "TLSv1.2" - ] - }, - "DomainName": "brelandm.a2z.com", - "Id": "origin1", - "OriginCustomHeaders": [ - { - "HeaderName": "X-Custom-Header", - "HeaderValue": "somevalue" - } - ] - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "AcmCertificateArn": "arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d", - "MinimumProtocolVersion": "TLSv1", - "SslSupportMethod": "sni-only" - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront.expected.json deleted file mode 100644 index acadf8baf6866..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront.expected.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyDistributionCFDistributionDE147309": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-basic.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-basic.expected.json deleted file mode 100644 index 504433198d635..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-basic.expected.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Resources": { - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "integdistributionbasicDistOrigin151B53FF1", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionbasicDistOrigin151B53FF1" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json deleted file mode 100644 index fb0c6b3543bd0..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "Resources": { - "MyDistLoggingBucket9B8976BC": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "AES256" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyDistDB88FD9A": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "Comment": "a test", - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "integdistributionextensiveMyDistOrigin185F089B3", - "ViewerProtocolPolicy": "allow-all" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Logging": { - "Bucket": { - "Fn::GetAtt": [ - "MyDistLoggingBucket9B8976BC", - "RegionalDomainName" - ] - }, - "IncludeCookies": true, - "Prefix": "logs/" - }, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionextensiveMyDistOrigin185F089B3", - "OriginShield": { - "Enabled": true, - "OriginShieldRegion": "us-west-2" - } - } - ], - "PriceClass": "PriceClass_100", - "Restrictions": { - "GeoRestriction": { - "Locations": [ - "US", - "GB" - ], - "RestrictionType": "whitelist" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-function.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-function.expected.json deleted file mode 100644 index cc3517ea5897b..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-function.expected.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "Resources": { - "Function76856677": { - "Type": "AWS::CloudFront::Function", - "Properties": { - "Name": "eu-west-1integdistributionfunctionFunctionDCD62A02", - "AutoPublish": true, - "FunctionCode": "function handler(event) { return event.request }", - "FunctionConfig": { - "Comment": "eu-west-1integdistributionfunctionFunctionDCD62A02", - "Runtime": "cloudfront-js-1.0" - } - } - }, - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", - "Compress": true, - "FunctionAssociations": [ - { - "EventType": "viewer-request", - "FunctionARN": { - "Fn::GetAtt": [ - "Function76856677", - "FunctionARN" - ] - } - } - ], - "TargetOriginId": "integdistributionfunctionDistOrigin1D1E9DF17", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionfunctionDistOrigin1D1E9DF17" - } - ] - } - } - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "Function76856677", - "FunctionARN" - ] - } - }, - "FunctionStage": { - "Value": { - "Fn::GetAtt": [ - "Function76856677", - "Stage" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-key-group.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-key-group.expected.json deleted file mode 100644 index afae558dee709..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-key-group.expected.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "Resources": { - "MyPublicKey78071F3D": { - "Type": "AWS::CloudFront::PublicKey", - "Properties": { - "PublicKeyConfig": { - "CallerReference": "c8752fac3fe06fc93f3fbd12d7e0282d8967409e4d", - "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAudf8/iNkQgdvjEdm6xYS\nJAyxd/kGTbJfQNg9YhInb7TSm0dGu0yx8yZ3fnpmxuRPqJIlaVr+fT4YRl71gEYa\ndlhHmnVegyPNjP9dNqZ7zwNqMEPOPnS/NOHbJj1KYKpn1f8pPNycQ5MQCntKGnSj\n6fc+nbcC0joDvGz80xuy1W4hLV9oC9c3GT26xfZb2jy9MVtA3cppNuTwqrFi3t6e\n0iGpraxZlT5wewjZLpQkngqYr6s3aucPAZVsGTEYPo4nD5mswmtZOm+tgcOrivtD\n/3sD/qZLQ6c5siqyS8aTraD6y+VXugujfarTU65IeZ6QAUbLMsWuZOIi5Jn8zAwx\nNQIDAQAB\n-----END PUBLIC KEY-----", - "Name": "integdistributionkeygroupMyPublicKeyC0F3B115" - } - } - }, - "MyKeyGroupAF22FD35": { - "Type": "AWS::CloudFront::KeyGroup", - "Properties": { - "KeyGroupConfig": { - "Items": [ - { - "Ref": "MyPublicKey78071F3D" - } - ], - "Name": "integdistributionkeygroupMyKeyGroupF179E01A" - } - } - }, - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", - "Compress": true, - "TargetOriginId": "integdistributionkeygroupDistOrigin1B9677703", - "TrustedKeyGroups": [ - { - "Ref": "MyKeyGroupAF22FD35" - } - ], - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionkeygroupDistOrigin1B9677703" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json deleted file mode 100644 index 6558d75227882..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda-cross-region.expected.json +++ /dev/null @@ -1,387 +0,0 @@ -[ - { - "Resources": { - "LambdaArnReaderAB4FC772": { - "Type": "Custom::CrossRegionStringParameterReader", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A", - "Arn" - ] - }, - "Region": "us-east-1", - "ParameterName": "/cdk/EdgeFunctionArn/eu-west-1/integ-distribution-lambda-cross-region/Lambda", - "RefreshToken": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825": { - "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", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:us-east-1:", - { - "Ref": "AWS::AccountId" - }, - ":parameter/cdk/EdgeFunctionArn/*" - ] - ] - }, - "Action": [ - "ssm:GetParameter" - ] - } - ] - } - } - ] - } - }, - "CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aS3BucketA88C096E" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aS3VersionKeyF63BD825" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aS3VersionKeyF63BD825" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomCrossRegionStringParameterReaderCustomResourceProviderRole71CD6825" - ] - }, - "Lambda2ArnReader5ACFBE1F": { - "Type": "Custom::CrossRegionStringParameterReader", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCrossRegionStringParameterReaderCustomResourceProviderHandler65B5F33A", - "Arn" - ] - }, - "Region": "us-east-1", - "ParameterName": "/cdk/EdgeFunctionArn/eu-west-1/integ-distribution-lambda-cross-region/Lambda2", - "RefreshToken": "Lambda2CurrentVersion72012B74da2ca4572056a1112d9804f75b5b7491" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", - "Compress": true, - "LambdaFunctionAssociations": [ - { - "EventType": "origin-request", - "LambdaFunctionARN": { - "Fn::GetAtt": [ - "LambdaArnReaderAB4FC772", - "FunctionArn" - ] - } - }, - { - "EventType": "origin-response", - "LambdaFunctionARN": { - "Fn::GetAtt": [ - "Lambda2ArnReader5ACFBE1F", - "FunctionArn" - ] - } - } - ], - "TargetOriginId": "integdistributionlambdacrossregionDistOrigin167A054D5", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionlambdacrossregionDistOrigin167A054D5" - } - ] - } - } - } - }, - "Parameters": { - "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aS3BucketA88C096E": { - "Type": "String", - "Description": "S3 bucket for asset \"e718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376a\"" - }, - "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aS3VersionKeyF63BD825": { - "Type": "String", - "Description": "S3 key for asset version \"e718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376a\"" - }, - "AssetParameterse718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376aArtifactHashE4754D11": { - "Type": "String", - "Description": "Artifact hash for asset \"e718f39096261b3e336dd6d896baabf1049bb1938cb1865de1b5e576cb57376a\"" - } - } - }, - { - "Resources": { - "LambdaServiceRoleA8ED4D3B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "edgelambda.amazonaws.com", - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaD247545B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaServiceRoleA8ED4D3B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaServiceRoleA8ED4D3B" - ] - }, - "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "LambdaD247545B" - } - } - }, - "LambdaParameterCDCFFB68": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": { - "Ref": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" - }, - "Name": "/cdk/EdgeFunctionArn/eu-west-1/integ-distribution-lambda-cross-region/Lambda" - } - }, - "LambdaAliaslive79C8A712": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "LambdaD247545B" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d", - "Version" - ] - }, - "Name": "live" - } - } - } - }, - { - "Resources": { - "Lambda2ServiceRole31A072E1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "edgelambda.amazonaws.com", - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Lambda217CFB423": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "Lambda2ServiceRole31A072E1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "Lambda2ServiceRole31A072E1" - ] - }, - "Lambda2CurrentVersion72012B74da2ca4572056a1112d9804f75b5b7491": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "Lambda217CFB423" - } - } - }, - "Lambda2Parameter3444E17A": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": { - "Ref": "Lambda2CurrentVersion72012B74da2ca4572056a1112d9804f75b5b7491" - }, - "Name": "/cdk/EdgeFunctionArn/eu-west-1/integ-distribution-lambda-cross-region/Lambda2" - } - }, - "Lambda2Aliaslive77F6085F": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "Lambda217CFB423" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "Lambda2CurrentVersion72012B74da2ca4572056a1112d9804f75b5b7491", - "Version" - ] - }, - "Name": "live" - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda.expected.json deleted file mode 100644 index 301d18dd22920..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-lambda.expected.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "Resources": { - "LambdaServiceRoleA8ED4D3B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "edgelambda.amazonaws.com", - "lambda.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaD247545B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaServiceRoleA8ED4D3B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaServiceRoleA8ED4D3B" - ] - }, - "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "LambdaD247545B" - } - } - }, - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", - "Compress": true, - "LambdaFunctionAssociations": [ - { - "EventType": "origin-request", - "LambdaFunctionARN": { - "Ref": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" - } - } - ], - "TargetOriginId": "integdistributionlambdaDistOrigin133A13098", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionlambdaDistOrigin133A13098" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json deleted file mode 100644 index a09b1d2e38f09..0000000000000 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "Resources": { - "CachePolicy26D8A535": { - "Type": "AWS::CloudFront::CachePolicy", - "Properties": { - "CachePolicyConfig": { - "DefaultTTL": 86400, - "MaxTTL": 31536000, - "MinTTL": 0, - "Name": "ACustomCachePolicy", - "ParametersInCacheKeyAndForwardedToOrigin": { - "CookiesConfig": { - "CookieBehavior": "none" - }, - "EnableAcceptEncodingBrotli": false, - "EnableAcceptEncodingGzip": false, - "HeadersConfig": { - "HeaderBehavior": "none" - }, - "QueryStringsConfig": { - "QueryStringBehavior": "none" - } - } - } - } - }, - "OriginRequestPolicy3EFDB4FA": { - "Type": "AWS::CloudFront::OriginRequestPolicy", - "Properties": { - "OriginRequestPolicyConfig": { - "CookiesConfig": { - "CookieBehavior": "none" - }, - "HeadersConfig": { - "HeaderBehavior": "allViewerAndWhitelistCloudFront", - "Headers": [ - "CloudFront-Forwarded-Proto" - ] - }, - "Name": "ACustomOriginRequestPolicy", - "QueryStringsConfig": { - "QueryStringBehavior": "none" - } - } - } - }, - "ResponseHeadersPolicy13DBF9E0": { - "Type": "AWS::CloudFront::ResponseHeadersPolicy", - "Properties": { - "ResponseHeadersPolicyConfig": { - "CorsConfig": { - "AccessControlAllowCredentials": false, - "AccessControlAllowHeaders": { - "Items": [ - "X-Custom-Header-1", - "X-Custom-Header-2" - ] - }, - "AccessControlAllowMethods": { - "Items": [ - "GET", - "POST" - ] - }, - "AccessControlAllowOrigins": { - "Items": [ - "*" - ] - }, - "AccessControlExposeHeaders": { - "Items": [ - "X-Custom-Header-1", - "X-Custom-Header-2" - ] - }, - "AccessControlMaxAgeSec": 600, - "OriginOverride": true - }, - "Name": "ACustomResponseHeadersPolicy" - } - } - }, - "DistB3B78991": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "CachePolicyId": { - "Ref": "CachePolicy26D8A535" - }, - "Compress": true, - "OriginRequestPolicyId": { - "Ref": "OriginRequestPolicy3EFDB4FA" - }, - "ResponseHeadersPolicyId": { - "Ref": "ResponseHeadersPolicy13DBF9E0" - }, - "TargetOriginId": "integdistributionpoliciesDistOrigin17849EF2C", - "ViewerProtocolPolicy": "allow-all" - }, - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "CustomOriginConfig": { - "OriginProtocolPolicy": "https-only" - }, - "DomainName": "www.example.com", - "Id": "integdistributionpoliciesDistOrigin17849EF2C" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-supplied-bucket.lit.expected.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-supplied-bucket.lit.expected.json deleted file mode 100644 index f8a12f1430107..0000000000000 --- a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-supplied-bucket.lit.expected.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "LambdaFunctionServiceRoleC555A460": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaFunctionBF21E41F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = {}" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaFunctionServiceRoleC555A460", - "Arn" - ] - }, - "Handler": "hello.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaFunctionServiceRoleC555A460" - ] - }, - "S3486F821D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "S3Policy2E4AA1D6": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "S3486F821D" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "S3486F821D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "S3486F821D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "s3:GetBucketAcl", - "Effect": "Allow", - "Principal": { - "Service": "cloudtrail.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "S3486F821D", - "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": [ - "S3486F821D", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "S3AutoDeleteObjectsCustomResource5A4102C9": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "S3486F821D" - } - }, - "DependsOn": [ - "S3Policy2E4AA1D6" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Trail022F0CF2": { - "Type": "AWS::CloudTrail::Trail", - "Properties": { - "IsLogging": true, - "S3BucketName": { - "Ref": "S3486F821D" - }, - "EnableLogFileValidation": true, - "EventSelectors": [ - { - "DataResources": [ - { - "Type": "AWS::Lambda::Function", - "Values": [ - { - "Fn::GetAtt": [ - "LambdaFunctionBF21E41F", - "Arn" - ] - } - ] - } - ] - }, - { - "DataResources": [ - { - "Type": "AWS::S3::Object", - "Values": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/" - ] - ] - } - ] - } - ] - } - ], - "IncludeGlobalServiceEvents": true, - "IsMultiRegionTrail": true - }, - "DependsOn": [ - "S3Policy2E4AA1D6" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail.lit.expected.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail.lit.expected.json deleted file mode 100644 index 10acbfff90f7f..0000000000000 --- a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail.lit.expected.json +++ /dev/null @@ -1,426 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "TopicBFC7AF6E": { - "Type": "AWS::SNS::Topic" - }, - "TopicPolicyA1747468": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "cloudtrail.amazonaws.com" - }, - "Resource": { - "Ref": "TopicBFC7AF6E" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "TopicBFC7AF6E" - } - ] - } - }, - "LambdaFunctionServiceRoleC555A460": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaFunctionBF21E41F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = {}" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaFunctionServiceRoleC555A460", - "Arn" - ] - }, - "Handler": "hello.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaFunctionServiceRoleC555A460" - ] - }, - "TrailS30071F172": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TrailS3PolicyE42170FE": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "TrailS30071F172" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "TrailS30071F172", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TrailS30071F172", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "s3:GetBucketAcl", - "Effect": "Allow", - "Principal": { - "Service": "cloudtrail.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "TrailS30071F172", - "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": [ - "TrailS30071F172", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Trail022F0CF2": { - "Type": "AWS::CloudTrail::Trail", - "Properties": { - "IsLogging": true, - "S3BucketName": { - "Ref": "TrailS30071F172" - }, - "EnableLogFileValidation": true, - "EventSelectors": [ - { - "DataResources": [ - { - "Type": "AWS::Lambda::Function", - "Values": [ - { - "Fn::GetAtt": [ - "LambdaFunctionBF21E41F", - "Arn" - ] - } - ] - } - ] - }, - { - "DataResources": [ - { - "Type": "AWS::S3::Object", - "Values": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/" - ] - ] - } - ] - } - ] - } - ], - "IncludeGlobalServiceEvents": true, - "IsMultiRegionTrail": true, - "SnsTopicName": { - "Fn::GetAtt": [ - "TopicBFC7AF6E", - "TopicName" - ] - } - }, - "DependsOn": [ - "TrailS3PolicyE42170FE" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-and-dashboard.expected.json b/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-and-dashboard.expected.json deleted file mode 100644 index b4dcfedc90bac..0000000000000 --- a/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-and-dashboard.expected.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "Resources": { - "queue": { - "Type": "AWS::SQS::Queue" - }, - "Alarm7103F465": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "DatapointsToAlarm": 2, - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Average", - "Threshold": 100 - } - }, - "DashCCD7F836": { - "Type": "AWS::CloudWatch::Dashboard", - "Properties": { - "DashboardBody": { - "Fn::Join": [ - "", - [ - "{\"start\":\"-9H\",\"end\":\"2018-12-17T06:00:00.000Z\",\"periodOverride\":\"inherit\",\"widgets\":[{\"type\":\"text\",\"width\":6,\"height\":2,\"x\":0,\"y\":0,\"properties\":{\"markdown\":\"# This is my dashboard\"}},{\"type\":\"text\",\"width\":6,\"height\":2,\"x\":6,\"y\":0,\"properties\":{\"markdown\":\"you like?\"}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":2,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Messages in queue\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"annotations\":{\"alarms\":[\"", - { - "Fn::GetAtt": [ - "Alarm7103F465", - "Arn" - ] - }, - "\"]},\"yAxis\":{}}},{\"type\":\"alarm\",\"width\":6,\"height\":3,\"x\":0,\"y\":8,\"properties\":{\"title\":\"Firing alarms\",\"alarms\":[\"", - { - "Fn::GetAtt": [ - "Alarm7103F465", - "Arn" - ] - }, - "\"]}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":11,\"properties\":{\"view\":\"timeSeries\",\"title\":\"More messages in queue with alarm annotation\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\"]],\"annotations\":{\"horizontal\":[{\"label\":\"ApproximateNumberOfMessagesVisible >= 100 for 2 datapoints within 15 minutes\",\"value\":100,\"yAxis\":\"left\"}]},\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":3,\"x\":0,\"y\":17,\"properties\":{\"view\":\"singleValue\",\"title\":\"Current messages in queue\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\"]]}},{\"type\":\"log\",\"width\":6,\"height\":6,\"x\":0,\"y\":20,\"properties\":{\"view\":\"table\",\"title\":\"Errors in my log group\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"query\":\"SOURCE 'my-log-group' | fields @message\\n | filter @message like /Error/\"}},{\"type\":\"log\",\"width\":6,\"height\":6,\"x\":0,\"y\":26,\"properties\":{\"view\":\"bar\",\"title\":\"Errors in my log group - bar\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"query\":\"SOURCE 'my-log-group' | fields @message\\n | filter @message like /Error/\"}},{\"type\":\"log\",\"width\":6,\"height\":6,\"x\":0,\"y\":32,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Errors in my log group - line\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"query\":\"SOURCE 'my-log-group' | fields @message\\n | filter @message like /Error/\",\"stacked\":false}},{\"type\":\"log\",\"width\":6,\"height\":6,\"x\":0,\"y\":38,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Errors in my log group - stacked\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"query\":\"SOURCE 'my-log-group' | fields @message\\n | filter @message like /Error/\",\"stacked\":true}},{\"type\":\"log\",\"width\":6,\"height\":6,\"x\":0,\"y\":44,\"properties\":{\"view\":\"pie\",\"title\":\"Errors in my log group - pie\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"query\":\"SOURCE 'my-log-group' | fields @message\\n | filter @message like /Error/\"}},{\"type\":\"metric\",\"width\":6,\"height\":3,\"x\":0,\"y\":50,\"properties\":{\"view\":\"singleValue\",\"title\":\"Sent message size\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/SQS\",\"SentMessageSize\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\"]],\"singleValueFullPrecision\":false}},{\"type\":\"metric\",\"width\":6,\"height\":3,\"x\":0,\"y\":53,\"properties\":{\"view\":\"singleValue\",\"title\":\"Sent message size with full precision\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/SQS\",\"SentMessageSize\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\"]],\"singleValueFullPrecision\":true}},{\"type\":\"custom\",\"width\":6,\"height\":6,\"x\":0,\"y\":56,\"properties\":{\"endpoint\":\"arn:aws:lambda:us-west-2:123456789012:function:my-function\",\"title\":\"My custom alarm\",\"updateOn\":{\"refresh\":true,\"resize\":true,\"timeRange\":true}}}]}" - ] - ] - }, - "DashboardName": "MyCustomDashboardName" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-with-label.expected.json b/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-with-label.expected.json deleted file mode 100644 index 6ac734ed6e534..0000000000000 --- a/packages/@aws-cdk/aws-cloudwatch/test/integ.alarm-with-label.expected.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "Resources": { - "Alarm1F9009D71": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "Metrics": [ - { - "Id": "m1", - "Label": "Metric [AVG: ${AVG}]", - "MetricStat": { - "Metric": { - "MetricName": "Metric", - "Namespace": "CDK/Test" - }, - "Period": 300, - "Stat": "Average" - }, - "ReturnData": true - } - ], - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "Threshold": 100 - } - }, - "Alarm2A7122E13": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "Metrics": [ - { - "Id": "m1", - "Label": "Metric [AVG: ${AVG}]", - "MetricStat": { - "Metric": { - "MetricName": "Metric", - "Namespace": "CDK/Test" - }, - "Period": 300, - "Stat": "Average" - }, - "ReturnData": true - } - ], - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "Threshold": 100 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/test/integ.composite-alarm.expected.json b/packages/@aws-cdk/aws-cloudwatch/test/integ.composite-alarm.expected.json deleted file mode 100644 index 614707db2a7d7..0000000000000 --- a/packages/@aws-cdk/aws-cloudwatch/test/integ.composite-alarm.expected.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "Resources": { - "Alarm1F9009D71": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "MetricName": "Metric", - "Namespace": "CDK/Test", - "Period": 300, - "Statistic": "Average", - "Threshold": 100 - } - }, - "Alarm2A7122E13": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "MetricName": "Metric", - "Namespace": "CDK/Test", - "Period": 300, - "Statistic": "Average", - "Threshold": 1000 - } - }, - "Alarm32341D8D9": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "MetricName": "Metric", - "Namespace": "CDK/Test", - "Period": 300, - "Statistic": "Average", - "Threshold": 10000 - } - }, - "Alarm4671832C8": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "MetricName": "Metric", - "Namespace": "CDK/Test", - "Period": 300, - "Statistic": "Average", - "Threshold": 100000 - } - }, - "Alarm548383B2F": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "AlarmName": "Alarm with space in name", - "MetricName": "Metric", - "Namespace": "CDK/Test", - "Period": 300, - "Statistic": "Average", - "Threshold": 100000 - } - }, - "CompositeAlarmF4C3D082": { - "Type": "AWS::CloudWatch::CompositeAlarm", - "Properties": { - "AlarmName": "CompositeAlarmIntegrationTestCompositeAlarm742D2FBA", - "AlarmRule": { - "Fn::Join": [ - "", - [ - "(((ALARM(\"", - { - "Fn::GetAtt": [ - "Alarm1F9009D71", - "Arn" - ] - }, - "\") OR OK(\"", - { - "Fn::GetAtt": [ - "Alarm2A7122E13", - "Arn" - ] - }, - "\") OR ALARM(\"", - { - "Fn::GetAtt": [ - "Alarm32341D8D9", - "Arn" - ] - }, - "\") OR ALARM(\"", - { - "Fn::GetAtt": [ - "Alarm548383B2F", - "Arn" - ] - }, - "\")) AND (NOT (INSUFFICIENT_DATA(\"", - { - "Fn::GetAtt": [ - "Alarm4671832C8", - "Arn" - ] - }, - "\")))) OR FALSE)" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/test/integ.math-alarm-and-dashboard.expected.json b/packages/@aws-cdk/aws-cloudwatch/test/integ.math-alarm-and-dashboard.expected.json deleted file mode 100644 index 9d6d0b5b1c4bc..0000000000000 --- a/packages/@aws-cdk/aws-cloudwatch/test/integ.math-alarm-and-dashboard.expected.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "Resources": { - "queue": { - "Type": "AWS::SQS::Queue" - }, - "Alarm7103F465": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "Metrics": [ - { - "Expression": "m1+m2", - "Id": "expr_1", - "Label": "Total Messages" - }, - { - "Id": "m1", - "Label": "Visible Messages", - "MetricStat": { - "Metric": { - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS" - }, - "Period": 60, - "Stat": "Average" - }, - "ReturnData": false - }, - { - "Id": "m2", - "Label": "NotVisible Messages", - "MetricStat": { - "Metric": { - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesNotVisible", - "Namespace": "AWS/SQS" - }, - "Period": 60, - "Stat": "Average" - }, - "ReturnData": false - } - ], - "Threshold": 100 - } - }, - "DashCCD7F836": { - "Type": "AWS::CloudWatch::Dashboard", - "Properties": { - "DashboardBody": { - "Fn::Join": [ - "", - [ - "{\"widgets\":[{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Total messages in queue\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"annotations\":{\"alarms\":[\"", - { - "Fn::GetAtt": [ - "Alarm7103F465", - "Arn" - ] - }, - "\"]},\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":6,\"properties\":{\"view\":\"timeSeries\",\"title\":\"More total messages in queue with alarm annotation\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[{\"label\":\"Total Messages\",\"expression\":\"m1+m2\",\"period\":60}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"Visible Messages\",\"period\":60,\"visible\":false,\"id\":\"m1\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"NotVisible Messages\",\"period\":60,\"visible\":false,\"id\":\"m2\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"Visible Messages\",\"period\":10,\"yAxis\":\"right\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"NotVisible Messages\",\"period\":30,\"yAxis\":\"right\"}]],\"annotations\":{\"horizontal\":[{\"label\":\"Total Messages >= 100 for 3 datapoints within 3 minutes\",\"value\":100,\"yAxis\":\"left\"}]},\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":12,\"properties\":{\"view\":\"pie\",\"title\":\"Percentage of messages in each queue as pie chart\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"Visible Messages\",\"period\":10}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"NotVisible Messages\",\"period\":30}]],\"yAxis\":{},\"setPeriodToTimeRange\":true}},{\"type\":\"metric\",\"width\":6,\"height\":3,\"x\":0,\"y\":18,\"properties\":{\"view\":\"singleValue\",\"title\":\"Current total messages in queue\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[{\"label\":\"Total Messages\",\"expression\":\"m1+m2\",\"period\":60}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"Visible Messages\",\"period\":60,\"visible\":false,\"id\":\"m1\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"", - { - "Fn::GetAtt": [ - "queue", - "QueueName" - ] - }, - "\",{\"label\":\"NotVisible Messages\",\"period\":60,\"visible\":false,\"id\":\"m2\"}]]}}]}" - ] - ] - }, - "DashboardName": "MyMathExpressionDashboardName" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.aws-deep-learning-container-build-image.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.aws-deep-learning-container-build-image.expected.json deleted file mode 100644 index 64a8873d3f1d4..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.aws-deep-learning-container-build-image.expected.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "Resources": { - "ProjectRole4CCB274E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ProjectRoleDefaultPolicy7F29461B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "ProjectC78D97AD" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Fn::FindInMap": [ - "DlcRepositoryAccountMap", - { - "Ref": "AWS::Region" - }, - "value" - ] - }, - ":repository/mxnet-training" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ProjectRoleDefaultPolicy7F29461B", - "Roles": [ - { - "Ref": "ProjectRole4CCB274E" - } - ] - } - }, - "ProjectC78D97AD": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_LARGE", - "Image": { - "Fn::Join": [ - "", - [ - { - "Fn::FindInMap": [ - "DlcRepositoryAccountMap", - { - "Ref": "AWS::Region" - }, - "value" - ] - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/mxnet-training:1.4.1-gpu-py36-cu100-ubuntu16.04" - ] - ] - }, - "ImagePullCredentialsType": "SERVICE_ROLE", - "PrivilegedMode": false, - "Type": "LINUX_GPU_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ProjectRole4CCB274E", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - }, - "Mappings": { - "DlcRepositoryAccountMap": { - "ap-east-1": { - "value": "871362719292" - }, - "ap-northeast-1": { - "value": "763104351884" - }, - "ap-northeast-2": { - "value": "763104351884" - }, - "ap-south-1": { - "value": "763104351884" - }, - "ap-southeast-1": { - "value": "763104351884" - }, - "ap-southeast-2": { - "value": "763104351884" - }, - "ca-central-1": { - "value": "763104351884" - }, - "cn-north-1": { - "value": "727897471807" - }, - "cn-northwest-1": { - "value": "727897471807" - }, - "eu-central-1": { - "value": "763104351884" - }, - "eu-north-1": { - "value": "763104351884" - }, - "eu-west-1": { - "value": "763104351884" - }, - "eu-west-2": { - "value": "763104351884" - }, - "eu-west-3": { - "value": "763104351884" - }, - "me-south-1": { - "value": "217643126080" - }, - "sa-east-1": { - "value": "763104351884" - }, - "us-east-1": { - "value": "763104351884" - }, - "us-east-2": { - "value": "763104351884" - }, - "us-west-1": { - "value": "763104351884" - }, - "us-west-2": { - "value": "763104351884" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json deleted file mode 100644 index 7190b590998a0..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.caching.expected.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "Resources": { - "CacheBucket41D9D0B0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CacheBucket41D9D0B0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CacheBucket41D9D0B0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"build\": {\n \"commands\": [\n \"echo Hello\"\n ]\n },\n \"cache\": {\n \"paths\": [\n \"/root/.cache/pip/**/*\"\n ]\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Location": { - "Fn::Join": [ - "/", - [ - { - "Ref": "CacheBucket41D9D0B0" - }, - { - "Ref": "AWS::NoValue" - } - ] - ] - }, - "Type": "S3" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.defaults.expected.json deleted file mode 100644 index 03af104a5737e..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.expected.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json deleted file mode 100644 index efa59865ec87f..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.defaults.lit.expected.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "MyProject39F7B0AE" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.expected.json deleted file mode 100644 index da248213507b9..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.expected.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "Parameters": { - "MyImageImageName953AD232": { - "Type": "String", - "Description": "ECR repository name and tag asset \"test-codebuild-docker-asset/MyImage\"" - }, - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeS3Bucket92AB06B6": { - "Type": "String", - "Description": "S3 bucket for asset \"test-codebuild-docker-asset/AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c/Code\"" - }, - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeS3VersionKey393B7276": { - "Type": "String", - "Description": "S3 key for asset version \"test-codebuild-docker-asset/AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c/Code\"" - } - }, - "Resources": { - "MyImageAdoptRepository6CA902F6": { - "Type": "Custom::ECRAdoptedRepository", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c52BE89E9", - "Arn" - ] - }, - "RepositoryName": { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - ":", - { - "Ref": "MyImageImageName953AD232" - } - ] - } - ] - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:GetDownloadUrlForLayer", - "ecr:BatchGetImage", - "ecr:BatchCheckLayerAvailability" - ], - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - }, - "Sid": "CodeBuild" - } - ], - "Version": "2012-10-17" - } - } - }, - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleD788AA17": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleDefaultPolicy6BC8737C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:GetRepositoryPolicy", - "ecr:SetRepositoryPolicy", - "ecr:DeleteRepository", - "ecr:ListImages", - "ecr:BatchDeleteImage" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - ":", - { - "Ref": "MyImageImageName953AD232" - } - ] - } - ] - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleDefaultPolicy6BC8737C", - "Roles": [ - { - "Ref": "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleD788AA17" - } - ] - } - }, - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c52BE89E9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeS3Bucket92AB06B6" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeS3VersionKey393B7276" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeS3VersionKey393B7276" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "handler.handler", - "Role": { - "Fn::GetAtt": [ - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleD788AA17", - "Arn" - ] - }, - "Runtime": "nodejs10.x", - "Timeout": 300 - }, - "DependsOn": [ - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleD788AA17", - "AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cServiceRoleDefaultPolicy6BC8737C" - ] - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/", - { - "Fn::GetAtt": [ - "MyImageAdoptRepository6CA902F6", - "RepositoryName" - ] - } - ] - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/", - { - "Fn::GetAtt": [ - "MyImageAdoptRepository6CA902F6", - "RepositoryName" - ] - } - ] - ] - } - ] - } - ] - }, - ".amazonaws.com/", - { - "Fn::GetAtt": [ - "MyImageAdoptRepository6CA902F6", - "RepositoryName" - ] - }, - ":", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Ref": "MyImageImageName953AD232" - } - ] - } - ] - } - ] - ] - }, - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - } - } - } - } -} diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json deleted file mode 100644 index e11ff97797ce9..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.docker-asset.lit.expected.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:73ee9c3cafd103104e2a42ee76961a90a2410d0dcad42110343c5fd85ad6db78" - ] - ] - }, - "ImagePullCredentialsType": "SERVICE_ROLE", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.docker-registry.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.docker-registry.lit.expected.json deleted file mode 100644 index 1a5332128c23a..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.docker-registry.lit.expected.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:aws:secretsmanager:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":secret:my-secrets-123456" - ] - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "my-registry/my-repo", - "ImagePullCredentialsType": "SERVICE_ROLE", - "PrivilegedMode": false, - "RegistryCredential": { - "Credential": { - "Fn::Join": [ - "", - [ - "arn:aws:secretsmanager:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":secret:my-secrets-123456" - ] - ] - }, - "CredentialProvider": "SECRETS_MANAGER" - }, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.ecr.lit.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.ecr.lit.expected.json deleted file mode 100644 index b4596c6b80c9c..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.ecr.lit.expected.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyRepoF4F48043" - }, - ":v1.0" - ] - ] - }, - "ImagePullCredentialsType": "SERVICE_ROLE", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.github-webhook-batch.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.github-webhook-batch.expected.json deleted file mode 100644 index 81549a1ec5147..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.github-webhook-batch.expected.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProjectBatchServiceRole6B35CF0E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectBatchServiceRoleDefaultPolicy7A0E5721": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:RetryBuild", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyProject39F7B0AE", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectBatchServiceRoleDefaultPolicy7A0E5721", - "Roles": [ - { - "Ref": "MyProjectBatchServiceRole6B35CF0E" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "Location": "https://github.com/aws/aws-cdk.git", - "ReportBuildStatus": false, - "Type": "GITHUB" - }, - "BuildBatchConfig": { - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectBatchServiceRole6B35CF0E", - "Arn" - ] - } - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "Triggers": { - "BuildType": "BUILD_BATCH", - "FilterGroups": [ - [ - { - "Pattern": "PUSH", - "Type": "EVENT" - } - ] - ], - "Webhook": true - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json deleted file mode 100644 index 162a000a260a3..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.github.expected.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "Location": "https://github.com/aws/aws-cdk.git", - "ReportBuildStatus": false, - "Type": "GITHUB" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json deleted file mode 100644 index 026dd626f1f23..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-bucket.expected.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/path/to/my/source.zip" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_LARGE", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "Location": { - "Fn::Join": [ - "", - [ - { - "Ref": "MyBucketF68F3FF0" - }, - "/path/to/my/source.zip" - ] - ] - }, - "Type": "S3" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json deleted file mode 100644 index 5183f984b8274..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-buildspec-artifacts.expected.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "ArtifactIdentifier": "AddArtifact1", - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "NamespaceType": "NONE", - "OverrideArtifactName": true, - "Packaging": "ZIP", - "Path": "another/path", - "Type": "S3" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\"\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json deleted file mode 100644 index c34c157a0999a..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-file-system-location.expected.json +++ /dev/null @@ -1,460 +0,0 @@ -{ - "Resources": { - "MyVPCAFB07A31": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC" - } - ] - } - }, - "MyVPCPublicSubnet1Subnet0C75866A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1RouteTable538A9511": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1RouteTableAssociation8A950D8E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPublicSubnet1RouteTable538A9511" - }, - "SubnetId": { - "Ref": "MyVPCPublicSubnet1Subnet0C75866A" - } - } - }, - "MyVPCPublicSubnet1DefaultRouteAF81AA9B": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPublicSubnet1RouteTable538A9511" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVPCIGW30AB6DD6" - } - }, - "DependsOn": [ - "MyVPCVPCGWE6F260E1" - ] - }, - "MyVPCPublicSubnet1EIP5EB6147D": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1NATGateway838228A5": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVPCPublicSubnet1Subnet0C75866A" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVPCPublicSubnet1EIP5EB6147D", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1Subnet641543F4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PrivateSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1RouteTable133BD901": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC/PrivateSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1RouteTableAssociation85DFBFBB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPrivateSubnet1RouteTable133BD901" - }, - "SubnetId": { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - } - }, - "MyVPCPrivateSubnet1DefaultRouteA8EE6636": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPrivateSubnet1RouteTable133BD901" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVPCPublicSubnet1NATGateway838228A5" - } - } - }, - "MyVPCIGW30AB6DD6": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-file-system-locations/MyVPC" - } - ] - } - }, - "MyVPCVPCGWE6F260E1": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "InternetGatewayId": { - "Ref": "MyVPCIGW30AB6DD6" - } - } - }, - "SecurityGroup1F554B36F": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Example", - "GroupName": "Jane", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "MyVPCAFB07A31" - } - } - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:CreateNetworkInterfacePermission", - "Condition": { - "StringEquals": { - "ec2:Subnet": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - ] - ] - } - ], - "ec2:AuthorizedService": "codebuild.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":network-interface/*" - ] - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": true, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\"\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "FileSystemLocations": [ - { - "Identifier": "myidentifier", - "Location": { - "Fn::Join": [ - "", - [ - "fs-c8d04839.efs.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com:/mnt" - ] - ] - }, - "MountOptions": "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2", - "MountPoint": "/media", - "Type": "EFS" - } - ], - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "SecurityGroup1F554B36F", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - ], - "VpcId": { - "Ref": "MyVPCAFB07A31" - } - } - }, - "DependsOn": [ - "MyProjectPolicyDocument646EE0F2" - ] - }, - "MyProjectPolicyDocument646EE0F2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeDhcpOptions", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectPolicyDocument646EE0F2", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-logging.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-logging.expected.json deleted file mode 100644 index 0f90560191381..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-logging.expected.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "Resources": { - "LogingGroupE599B53B": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LoggingBucket1E5A6F3B": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ProjectRole4CCB274E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ProjectRoleDefaultPolicy7F29461B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "LoggingBucket1E5A6F3B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "LoggingBucket1E5A6F3B", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "LogingGroupE599B53B", - "Arn" - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "ProjectC78D97AD" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ProjectRoleDefaultPolicy7F29461B", - "Roles": [ - { - "Ref": "ProjectRole4CCB274E" - } - ] - } - }, - "ProjectC78D97AD": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ProjectRole4CCB274E", - "Arn" - ] - }, - "Source": { - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "LogsConfig": { - "CloudWatchLogs": { - "GroupName": { - "Ref": "LogingGroupE599B53B" - }, - "Status": "ENABLED" - }, - "S3Logs": { - "Location": { - "Ref": "LoggingBucket1E5A6F3B" - }, - "Status": "ENABLED" - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-notification.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-notification.expected.json deleted file mode 100644 index 5a75c6e491764..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-notification.expected.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "Resources": { - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "MyProject39F7B0AE" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Nothing to do!\\\"\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "MyProjectNotifyOnBuildSucceeded225C467F": { - "Type": "AWS::CodeStarNotifications::NotificationRule", - "Properties": { - "DetailType": "FULL", - "EventTypeIds": [ - "codebuild-project-build-state-succeeded" - ], - "Name": "awscdkcodebuildprojectvpcMyProjectNotifyOnBuildSucceeded3BC28121", - "Resource": { - "Fn::GetAtt": [ - "MyProject39F7B0AE", - "Arn" - ] - }, - "Targets": [ - { - "TargetAddress": { - "Ref": "MyTopic86869434" - }, - "TargetType": "SNS" - } - ] - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyTopicPolicy12A5EC17": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "codestar-notifications.amazonaws.com" - }, - "Resource": { - "Ref": "MyTopic86869434" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "MyTopic86869434" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json deleted file mode 100644 index 9b8aff476278c..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-secondary-sources-artifacts.expected.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\"\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "SecondaryArtifacts": [ - { - "ArtifactIdentifier": "AddArtifact1", - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Name": "name", - "NamespaceType": "BUILD_ID", - "Packaging": "ZIP", - "Path": "another/path", - "Type": "S3" - } - ], - "SecondarySources": [ - { - "Location": { - "Fn::Join": [ - "", - [ - { - "Ref": "MyBucketF68F3FF0" - }, - "/some/path" - ] - ] - }, - "SourceIdentifier": "AddSource1", - "Type": "S3" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json deleted file mode 100644 index 1ce67e3c882e0..0000000000000 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.expected.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "Resources": { - "MyVPCAFB07A31": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC" - } - ] - } - }, - "MyVPCPublicSubnet1Subnet0C75866A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1RouteTable538A9511": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1RouteTableAssociation8A950D8E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPublicSubnet1RouteTable538A9511" - }, - "SubnetId": { - "Ref": "MyVPCPublicSubnet1Subnet0C75866A" - } - } - }, - "MyVPCPublicSubnet1DefaultRouteAF81AA9B": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPublicSubnet1RouteTable538A9511" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVPCIGW30AB6DD6" - } - }, - "DependsOn": [ - "MyVPCVPCGWE6F260E1" - ] - }, - "MyVPCPublicSubnet1EIP5EB6147D": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPublicSubnet1NATGateway838228A5": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVPCPublicSubnet1Subnet0C75866A" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVPCPublicSubnet1EIP5EB6147D", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PublicSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1Subnet641543F4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PrivateSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1RouteTable133BD901": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC/PrivateSubnet1" - } - ] - } - }, - "MyVPCPrivateSubnet1RouteTableAssociation85DFBFBB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPrivateSubnet1RouteTable133BD901" - }, - "SubnetId": { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - } - }, - "MyVPCPrivateSubnet1DefaultRouteA8EE6636": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVPCPrivateSubnet1RouteTable133BD901" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVPCPublicSubnet1NATGateway838228A5" - } - } - }, - "MyVPCIGW30AB6DD6": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codebuild-project-vpc/MyVPC" - } - ] - } - }, - "MyVPCVPCGWE6F260E1": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVPCAFB07A31" - }, - "InternetGatewayId": { - "Ref": "MyVPCIGW30AB6DD6" - } - } - }, - "SecurityGroup1F554B36F": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Example", - "GroupName": "Bob", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "MyVPCAFB07A31" - } - } - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:CreateNetworkInterfacePermission", - "Condition": { - "StringEquals": { - "ec2:Subnet": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - ] - ] - } - ], - "ec2:AuthorizedService": "codebuild.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":network-interface/*" - ] - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Nothing to do!\\\"\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "SecurityGroup1F554B36F", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "MyVPCPrivateSubnet1Subnet641543F4" - } - ], - "VpcId": { - "Ref": "MyVPCAFB07A31" - } - } - }, - "DependsOn": [ - "MyProjectPolicyDocument646EE0F2" - ] - }, - "MyProjectPolicyDocument646EE0F2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeDhcpOptions", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectPolicyDocument646EE0F2", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset-zip.expected.json b/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset-zip.expected.json deleted file mode 100644 index 168622d89ca47..0000000000000 --- a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset-zip.expected.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "aws-cdk-codecommit-repo-contents-zip-file", - "Code": { - "S3": { - "Bucket": { - "Ref": "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18S3Bucket361A4B4D" - }, - "Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18S3VersionKeyFDE2007C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18S3VersionKeyFDE2007C" - } - ] - } - ] - } - ] - ] - } - } - } - } - } - }, - "Parameters": { - "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18S3Bucket361A4B4D": { - "Type": "String", - "Description": "S3 bucket for asset \"ea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18\"" - }, - "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18S3VersionKeyFDE2007C": { - "Type": "String", - "Description": "S3 key for asset version \"ea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18\"" - }, - "AssetParametersea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18ArtifactHash21ADA702": { - "Type": "String", - "Description": "Artifact hash for asset \"ea7c70c09e0d23ef6105931ee931effc8b607184343aebf5e45e972807b3fc18\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset.expected.json b/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset.expected.json deleted file mode 100644 index 715f117d295ed..0000000000000 --- a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-code-asset.expected.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "aws-cdk-codecommit-repo-contents-assets", - "Code": { - "S3": { - "Bucket": { - "Ref": "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3S3BucketD4E005C8" - }, - "Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3S3VersionKey52BCEABD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3S3VersionKey52BCEABD" - } - ] - } - ] - } - ] - ] - } - } - } - } - } - }, - "Parameters": { - "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3S3BucketD4E005C8": { - "Type": "String", - "Description": "S3 bucket for asset \"32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3\"" - }, - "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3S3VersionKey52BCEABD": { - "Type": "String", - "Description": "S3 key for asset version \"32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3\"" - }, - "AssetParameters32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3ArtifactHash1A78403B": { - "Type": "String", - "Description": "Artifact hash for asset \"32b8e8a8b79a84deb31e4d456dbcf3e40937f201633ae38c9e90e15b82084ae3\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-events.expected.json b/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-events.expected.json deleted file mode 100644 index 8538146e0a777..0000000000000 --- a/packages/@aws-cdk/aws-codecommit/test/integ.codecommit-events.expected.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "aws-cdk-codecommit-events" - } - }, - "RepoOnReferenceCreatedF1C66FF1": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0" - } - ] - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/test/integ.repository-notification.expected.json b/packages/@aws-cdk/aws-codecommit/test/integ.repository-notification.expected.json deleted file mode 100644 index c2f386ccebe0e..0000000000000 --- a/packages/@aws-cdk/aws-codecommit/test/integ.repository-notification.expected.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "Resources": { - "MyCodecommitRepository26DB372B": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "my-test-repository" - } - }, - "MyCodecommitRepositoryNotifyOnPullRequestCreated4CAB0621": { - "Type": "AWS::CodeStarNotifications::NotificationRule", - "Properties": { - "DetailType": "FULL", - "EventTypeIds": [ - "codecommit-repository-pull-request-created" - ], - "Name": "decommitMyCodecommitRepositoryNotifyOnPullRequestCreated65969BCB", - "Resource": { - "Fn::GetAtt": [ - "MyCodecommitRepository26DB372B", - "Arn" - ] - }, - "Targets": [ - { - "TargetAddress": { - "Ref": "MyTopic86869434" - }, - "TargetType": "SNS" - } - ] - } - }, - "MyCodecommitRepositoryNotifyOnPullRequestMerged80574FED": { - "Type": "AWS::CodeStarNotifications::NotificationRule", - "Properties": { - "DetailType": "FULL", - "EventTypeIds": [ - "codecommit-repository-pull-request-merged" - ], - "Name": "odecommitMyCodecommitRepositoryNotifyOnPullRequestMergedF426197C", - "Resource": { - "Fn::GetAtt": [ - "MyCodecommitRepository26DB372B", - "Arn" - ] - }, - "Targets": [ - { - "TargetAddress": { - "Ref": "MyTopic86869434" - }, - "TargetType": "SNS" - } - ] - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyTopicPolicy12A5EC17": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "codestar-notifications.amazonaws.com" - }, - "Resource": { - "Ref": "MyTopic86869434" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "MyTopic86869434" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.expected.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.expected.json deleted file mode 100644 index 1686127fc7771..0000000000000 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.expected.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "Resources": { - "HandlerServiceRoleFCDC14AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Handler886CB40B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3S3BucketD9AF62D9" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3S3VersionKey3ACE0CAC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3S3VersionKey3ACE0CAC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "HandlerServiceRoleFCDC14AE", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HandlerServiceRoleFCDC14AE" - ] - }, - "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "Handler886CB40B" - } - } - }, - "Alias325C5727": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "Handler886CB40B" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6", - "Version" - ] - }, - "Name": "alias" - }, - "UpdatePolicy": { - "CodeDeployLambdaAliasUpdate": { - "ApplicationName": { - "Ref": "BlueGreenDeploymentApplication36C892C0" - }, - "DeploymentGroupName": { - "Ref": "BlueGreenDeployment5C188134" - }, - "BeforeAllowTrafficHook": { - "Ref": "PreHook8B53F672" - }, - "AfterAllowTrafficHook": { - "Ref": "PostHookF2E49B30" - } - } - } - }, - "PreHookServiceRoleC724B9BA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PreHookServiceRoleDefaultPolicy65358F76": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codedeploy:PutLifecycleEventHookExecutionStatus", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentgroup:", - { - "Ref": "BlueGreenDeploymentApplication36C892C0" - }, - "/", - { - "Ref": "BlueGreenDeployment5C188134" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PreHookServiceRoleDefaultPolicy65358F76", - "Roles": [ - { - "Ref": "PreHookServiceRoleC724B9BA" - } - ] - } - }, - "PreHook8B53F672": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1S3Bucket1D1783A4" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1S3VersionKey88595F37" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1S3VersionKey88595F37" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "PreHookServiceRoleC724B9BA", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "PreHookServiceRoleDefaultPolicy65358F76", - "PreHookServiceRoleC724B9BA" - ] - }, - "PostHookServiceRoleE8A6AAC2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PostHookServiceRoleDefaultPolicy82AEE758": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codedeploy:PutLifecycleEventHookExecutionStatus", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentgroup:", - { - "Ref": "BlueGreenDeploymentApplication36C892C0" - }, - "/", - { - "Ref": "BlueGreenDeployment5C188134" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PostHookServiceRoleDefaultPolicy82AEE758", - "Roles": [ - { - "Ref": "PostHookServiceRoleE8A6AAC2" - } - ] - } - }, - "PostHookF2E49B30": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cS3Bucket7EF62972" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cS3VersionKeyBF9A490E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cS3VersionKeyBF9A490E" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "PostHookServiceRoleE8A6AAC2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "PostHookServiceRoleDefaultPolicy82AEE758", - "PostHookServiceRoleE8A6AAC2" - ] - }, - "BlueGreenErrors60C27452": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanThreshold", - "EvaluationPeriods": 1, - "Dimensions": [ - { - "Name": "FunctionName", - "Value": { - "Ref": "Handler886CB40B" - } - }, - { - "Name": "Resource", - "Value": { - "Fn::Join": [ - "", - [ - { - "Ref": "Handler886CB40B" - }, - ":alias" - ] - ] - } - } - ], - "MetricName": "Errors", - "Namespace": "AWS/Lambda", - "Period": 300, - "Statistic": "Sum", - "Threshold": 1 - } - }, - "BlueGreenDeploymentApplication36C892C0": { - "Type": "AWS::CodeDeploy::Application", - "Properties": { - "ComputePlatform": "Lambda" - } - }, - "BlueGreenDeploymentServiceRole225851FB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "codedeploy.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSCodeDeployRoleForLambdaLimited" - ] - ] - } - ] - } - }, - "BlueGreenDeploymentServiceRoleDefaultPolicy7008FB0A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PostHookF2E49B30", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PreHook8B53F672", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PostHookF2E49B30", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PreHook8B53F672", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BlueGreenDeploymentServiceRoleDefaultPolicy7008FB0A", - "Roles": [ - { - "Ref": "BlueGreenDeploymentServiceRole225851FB" - } - ] - } - }, - "BlueGreenDeployment5C188134": { - "Type": "AWS::CodeDeploy::DeploymentGroup", - "Properties": { - "ApplicationName": { - "Ref": "BlueGreenDeploymentApplication36C892C0" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "BlueGreenDeploymentServiceRole225851FB", - "Arn" - ] - }, - "AlarmConfiguration": { - "Alarms": [ - { - "Name": { - "Ref": "BlueGreenErrors60C27452" - } - } - ], - "Enabled": true - }, - "AutoRollbackConfiguration": { - "Enabled": true, - "Events": [ - "DEPLOYMENT_FAILURE", - "DEPLOYMENT_STOP_ON_ALARM" - ] - }, - "DeploymentConfigName": "CodeDeployDefault.LambdaLinear10PercentEvery1Minute", - "DeploymentStyle": { - "DeploymentOption": "WITH_TRAFFIC_CONTROL", - "DeploymentType": "BLUE_GREEN" - } - } - } - }, - "Parameters": { - "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3S3BucketD9AF62D9": { - "Type": "String", - "Description": "S3 bucket for asset \"edb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3\"" - }, - "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3S3VersionKey3ACE0CAC": { - "Type": "String", - "Description": "S3 key for asset version \"edb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3\"" - }, - "AssetParametersedb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3ArtifactHash20E29DAB": { - "Type": "String", - "Description": "Artifact hash for asset \"edb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3\"" - }, - "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1S3Bucket1D1783A4": { - "Type": "String", - "Description": "S3 bucket for asset \"87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1\"" - }, - "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1S3VersionKey88595F37": { - "Type": "String", - "Description": "S3 key for asset version \"87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1\"" - }, - "AssetParameters87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1ArtifactHash38509A01": { - "Type": "String", - "Description": "Artifact hash for asset \"87da351d4c9de5eead78cb80dde66bcbb6c42c418c3368747f32a4e9c013a2e1\"" - }, - "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cS3Bucket7EF62972": { - "Type": "String", - "Description": "S3 bucket for asset \"93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963c\"" - }, - "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cS3VersionKeyBF9A490E": { - "Type": "String", - "Description": "S3 key for asset version \"93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963c\"" - }, - "AssetParameters93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963cArtifactHashBF6C1240": { - "Type": "String", - "Description": "Artifact hash for asset \"93dbd8c02dbfca9077c9d83cb6d3a94659988c7d143988da4a554033a58f963c\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/test/server/integ.deployment-group.expected.json b/packages/@aws-cdk/aws-codedeploy/test/server/integ.deployment-group.expected.json deleted file mode 100644 index fc56b0069796a..0000000000000 --- a/packages/@aws-cdk/aws-codedeploy/test/server/integ.deployment-group.expected.json +++ /dev/null @@ -1,887 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ASGInstanceSecurityGroup0525485D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-codedeploy-server-dg/ASG/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/ASG" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ASGInstanceRoleE263A41B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codedeploy-server-dg/ASG" - } - ] - } - }, - "ASGInstanceRoleDefaultPolicy7636D8BF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::aws-codedeploy-", - { - "Ref": "AWS::Region" - }, - "/latest/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::aws-codedeploy-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ASGInstanceRoleDefaultPolicy7636D8BF", - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGInstanceProfile0A2834D7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGLaunchConfigC00AF12B": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "m5.large", - "IamInstanceProfile": { - "Ref": "ASGInstanceProfile0A2834D7" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ASGInstanceSecurityGroup0525485D", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset +e\nPKG_CMD=`which yum 2>/dev/null`\nset -e\nif [ -z \"$PKG_CMD\" ]; then\nPKG_CMD=apt-get\nelse\nPKG_CMD=yum\nfi\n$PKG_CMD update -y\nset +e\n$PKG_CMD install -y ruby2.0\nRUBY2_INSTALL=$?\nset -e\nif [ $RUBY2_INSTALL -ne 0 ]; then\n$PKG_CMD install -y ruby\nfi\nAWS_CLI_PACKAGE_NAME=awscli\nif [ \"$PKG_CMD\" = \"yum\" ]; then\nAWS_CLI_PACKAGE_NAME=aws-cli\nfi\n$PKG_CMD install -y $AWS_CLI_PACKAGE_NAME\nTMP_DIR=`mktemp -d`\ncd $TMP_DIR\naws s3 cp s3://aws-codedeploy-", - { - "Ref": "AWS::Region" - }, - "/latest/install . --region ", - { - "Ref": "AWS::Region" - }, - "\nchmod +x ./install\n./install auto\nrm -fr $TMP_DIR" - ] - ] - } - } - }, - "DependsOn": [ - "ASGInstanceRoleDefaultPolicy7636D8BF", - "ASGInstanceRoleE263A41B" - ] - }, - "ASG46ED3070": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ASGLaunchConfigC00AF12B" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-codedeploy-server-dg/ASG" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ELBSecurityGroupF148FD2E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-codedeploy-server-dg/ELB/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Default rule allow on 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ELBF276B85D": { - "Type": "AWS::ElasticLoadBalancing::LoadBalancer", - "Properties": { - "Listeners": [ - { - "InstancePort": "80", - "InstanceProtocol": "http", - "LoadBalancerPort": "80", - "Protocol": "http" - } - ], - "CrossZone": true, - "Scheme": "internal", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ELBSecurityGroupF148FD2E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - } - }, - "Alarm1F9009D71": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "MetricName": "Errors", - "Namespace": "my.namespace", - "Period": 300, - "Statistic": "Average", - "Threshold": 1 - } - }, - "CodeDeployGroupApplication13EFBDA6": { - "Type": "AWS::CodeDeploy::Application", - "Properties": { - "ComputePlatform": "Server" - } - }, - "CodeDeployGroupRole1D304F7A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "codedeploy.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSCodeDeployRole" - ] - ] - } - ] - } - }, - "CodeDeployGroup58220FC8": { - "Type": "AWS::CodeDeploy::DeploymentGroup", - "Properties": { - "ApplicationName": { - "Ref": "CodeDeployGroupApplication13EFBDA6" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "CodeDeployGroupRole1D304F7A", - "Arn" - ] - }, - "AlarmConfiguration": { - "Alarms": [ - { - "Name": { - "Ref": "Alarm1F9009D71" - } - } - ], - "Enabled": true - }, - "AutoScalingGroups": [ - { - "Ref": "ASG46ED3070" - } - ], - "DeploymentConfigName": "CodeDeployDefault.AllAtOnce", - "DeploymentStyle": { - "DeploymentOption": "WITH_TRAFFIC_CONTROL" - }, - "LoadBalancerInfo": { - "ElbInfoList": [ - { - "Name": { - "Ref": "ELBF276B85D" - } - } - ] - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group.expected.json b/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group.expected.json deleted file mode 100644 index 3fed466911a4f..0000000000000 --- a/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group.expected.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "Resources": { - "MyProfilingGroup829F0507": { - "Type": "AWS::CodeGuruProfiler::ProfilingGroup", - "Properties": { - "ProfilingGroupName": "ProfilerGroupIntegrationTestMyProfilingGroup81DA69A3" - } - }, - "PublishAppRole9FEBD682": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PublishAppRoleDefaultPolicyCA1E15C3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codeguru-profiler:ConfigureAgent", - "codeguru-profiler:PostAgentProfile" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyProfilingGroup829F0507", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PublishAppRoleDefaultPolicyCA1E15C3", - "Roles": [ - { - "Ref": "PublishAppRole9FEBD682" - } - ] - } - }, - "ReadAppRole52FE6317": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ReadAppRoleDefaultPolicy4BB8955C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codeguru-profiler:DescribeProfilingGroup", - "codeguru-profiler:GetProfile" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyProfilingGroup829F0507", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ReadAppRoleDefaultPolicy4BB8955C", - "Roles": [ - { - "Ref": "ReadAppRole52FE6317" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/integ.stacksets.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/integ.stacksets.expected.json deleted file mode 100644 index 2623f0aae9246..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/integ.stacksets.expected.json +++ /dev/null @@ -1,860 +0,0 @@ -{ - "Resources": { - "ArtifactBucket7410C9EF": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ArtifactBucketPolicy4B4B7752": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "ArtifactBucket7410C9EF" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "ArtifactBucketAutoDeleteObjectsCustomResource0BB47FD6": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "ArtifactBucket7410C9EF" - } - }, - "DependsOn": [ - "ArtifactBucketPolicy4B4B7752" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "ArtifactBucket7410C9EF" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineCfnInstancesCodePipelineActionRole289FD062", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineCfnStackSetCodePipelineActionRole9EA256DB", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3Bucket3C8B9651" - }, - "S3ObjectKey": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3VersionKeyD144071F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3VersionKeyD144071F" - } - ] - } - ] - } - ] - ] - } - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormationStackSet", - "Version": "1" - }, - "Configuration": { - "StackSetName": "TestStackSet", - "TemplatePath": "SourceArtifact::template.yaml", - "DeploymentTargets": "1111,2222", - "Regions": "us-east-1,eu-west-1", - "PermissionModel": "SELF_MANAGED", - "AdministrationRoleArn": { - "Fn::GetAtt": [ - "PipelineCfnStackSetStackSetAdministrationRoleAE2E9C50", - "Arn" - ] - } - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "StackSet", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineCfnStackSetCodePipelineActionRole9EA256DB", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormationStackInstances", - "Version": "1" - }, - "Configuration": { - "StackSetName": "TestStackSet", - "DeploymentTargets": "1111,2222", - "Regions": "us-east-1,eu-west-1" - }, - "Name": "Instances", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineCfnInstancesCodePipelineActionRole289FD062", - "Arn" - ] - }, - "RunOrder": 2 - } - ], - "Name": "Cfn" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "ArtifactBucket7410C9EF" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3Bucket3C8B9651" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3VersionKeyD144071F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3VersionKeyD144071F" - } - ] - } - ] - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3Bucket3C8B9651" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - }, - "PipelineCfnStackSetCodePipelineActionRole9EA256DB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineCfnStackSetCodePipelineActionRoleDefaultPolicyE5B66E2C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudformation:CreateStackInstances", - "cloudformation:CreateStackSet", - "cloudformation:DescribeStackSet", - "cloudformation:DescribeStackSetOperation", - "cloudformation:ListStackInstances", - "cloudformation:UpdateStackSet" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stackset/TestStackSet:*" - ] - ] - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineCfnStackSetStackSetAdministrationRoleAE2E9C50", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineCfnStackSetCodePipelineActionRoleDefaultPolicyE5B66E2C", - "Roles": [ - { - "Ref": "PipelineCfnStackSetCodePipelineActionRole9EA256DB" - } - ] - } - }, - "PipelineCfnStackSetStackSetAdministrationRoleAE2E9C50": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringLike": { - "aws:SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:*:", - { - "Ref": "AWS::AccountId" - }, - ":stackset/*" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineCfnStackSetStackSetAdministrationRoleDefaultPolicy55145C4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::*:role/AWSCloudFormationStackSetExecutionRole" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineCfnStackSetStackSetAdministrationRoleDefaultPolicy55145C4E", - "Roles": [ - { - "Ref": "PipelineCfnStackSetStackSetAdministrationRoleAE2E9C50" - } - ] - } - }, - "PipelineCfnInstancesCodePipelineActionRole289FD062": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineCfnInstancesCodePipelineActionRoleDefaultPolicy38A9673E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudformation:CreateStackInstances", - "cloudformation:CreateStackSet", - "cloudformation:DescribeStackSet", - "cloudformation:DescribeStackSetOperation", - "cloudformation:ListStackInstances", - "cloudformation:UpdateStackSet" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stackset/TestStackSet:*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineCfnInstancesCodePipelineActionRoleDefaultPolicy38A9673E", - "Roles": [ - { - "Ref": "PipelineCfnInstancesCodePipelineActionRole289FD062" - } - ] - } - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3Bucket3C8B9651": { - "Type": "String", - "Description": "S3 bucket for asset \"5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2\"" - }, - "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2S3VersionKeyD144071F": { - "Type": "String", - "Description": "S3 key for asset version \"5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2\"" - }, - "AssetParameters5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2ArtifactHashA83BA1E9": { - "Type": "String", - "Description": "Artifact hash for asset \"5bcf205623ea5b34a1944fea4c9982e835555e710235ae6f60172097737302e2\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.expected.json deleted file mode 100644 index bf53693d1bacc..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.expected.json +++ /dev/null @@ -1,840 +0,0 @@ -{ - "Resources": { - "TemplateRepo2326F199": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "template-repo" - } - }, - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinecloudformationpipeline7dbde619", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineDeployApproveChangesCodePipelineActionRole5AA6E21B", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineDeployExecuteChangesCodePipelineActionRole6AA2756F", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineDeployPrepareChangesCodePipelineActionRole41931444", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "TemplateRepo2326F199", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": true - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "OurStack", - "Capabilities": "CAPABILITY_NAMED_IAM", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployPrepareChangesRoleD28C853C", - "Arn" - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "StagedChangeSet", - "TemplatePath": "SourceArtifact::template.yaml" - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "PrepareChanges", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployPrepareChangesCodePipelineActionRole41931444", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Name": "ApproveChanges", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployApproveChangesCodePipelineActionRole5AA6E21B", - "Arn" - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "OurStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "StagedChangeSet" - }, - "Name": "ExecuteChanges", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployExecuteChangesCodePipelineActionRole6AA2756F", - "Arn" - ] - }, - "RunOrder": 3 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TemplateRepo2326F199", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - }, - "PipelineDeployPrepareChangesCodePipelineActionRole41931444": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployPrepareChangesCodePipelineActionRoleDefaultPolicyAD3C24A3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineDeployPrepareChangesRoleD28C853C", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "cloudformation:CreateChangeSet", - "cloudformation:DeleteChangeSet", - "cloudformation:DescribeChangeSet", - "cloudformation:DescribeStacks" - ], - "Condition": { - "StringEqualsIfExists": { - "cloudformation:ChangeSetName": "StagedChangeSet" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/OurStack/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployPrepareChangesCodePipelineActionRoleDefaultPolicyAD3C24A3", - "Roles": [ - { - "Ref": "PipelineDeployPrepareChangesCodePipelineActionRole41931444" - } - ] - } - }, - "PipelineDeployPrepareChangesRoleD28C853C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployPrepareChangesRoleDefaultPolicy8CDCCD73": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployPrepareChangesRoleDefaultPolicy8CDCCD73", - "Roles": [ - { - "Ref": "PipelineDeployPrepareChangesRoleD28C853C" - } - ] - } - }, - "PipelineDeployApproveChangesCodePipelineActionRole5AA6E21B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployExecuteChangesCodePipelineActionRole6AA2756F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployExecuteChangesCodePipelineActionRoleDefaultPolicy70764525": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudformation:DescribeChangeSet", - "cloudformation:DescribeStacks", - "cloudformation:ExecuteChangeSet" - ], - "Condition": { - "StringEqualsIfExists": { - "cloudformation:ChangeSetName": "StagedChangeSet" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/OurStack/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployExecuteChangesCodePipelineActionRoleDefaultPolicy70764525", - "Roles": [ - { - "Ref": "PipelineDeployExecuteChangesCodePipelineActionRole6AA2756F" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json deleted file mode 100644 index d4ee615d4b1bf..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.expected.json +++ /dev/null @@ -1,1654 +0,0 @@ -{ - "Resources": { - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBuildCDKBuildCodePipelineActionRole15F4B424", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineBuildLambdaBuildCodePipelineActionRole2DAE39E9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineDeployLambdaCFNDeployCodePipelineActionRoleF8A74488", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCdkCodeSourceCodePipelineActionRole237947B8", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceLambdaCodeSourceCodePipelineActionRole4E89EF60", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "CdkCodeRepo7D2EC742", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "CdkCode_Source", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_CdkCode_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCdkCodeSourceCodePipelineActionRole237947B8", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "LambdaCodeRepoE08DD409", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "LambdaCode_Source", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_LambdaCode_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceLambdaCodeSourceCodePipelineActionRole4E89EF60", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "CdkBuildProject9382C38D" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_CdkCode_Source" - } - ], - "Name": "CDK_Build", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_CDK_Build" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildCDKBuildCodePipelineActionRole15F4B424", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "LambdaBuildProject7E2DAB11" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_LambdaCode_Source" - } - ], - "Name": "Lambda_Build", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_Lambda_Build" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildLambdaBuildCodePipelineActionRole2DAE39E9", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "LambdaStackDeployedName", - "Capabilities": "CAPABILITY_NAMED_IAM", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployLambdaCFNDeployRole89CA1043", - "Arn" - ] - }, - "ParameterOverrides": "{\"LambdaLambdaSourceBucketNameParameter159473FC\":{\"Fn::GetArtifactAtt\":[\"Artifact_Build_Lambda_Build\",\"BucketName\"]},\"LambdaLambdaSourceObjectKeyParameter06573F1D\":{\"Fn::GetArtifactAtt\":[\"Artifact_Build_Lambda_Build\",\"ObjectKey\"]}}", - "ActionMode": "CREATE_UPDATE", - "TemplatePath": "Artifact_Build_CDK_Build::LambdaStack.template.yaml" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Build_Lambda_Build" - }, - { - "Name": "Artifact_Build_CDK_Build" - } - ], - "Name": "Lambda_CFN_Deploy", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployLambdaCFNDeployCodePipelineActionRoleF8A74488", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCdkCodeSourceCodePipelineActionRole237947B8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicy219D4917": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CdkCodeRepo7D2EC742", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicy219D4917", - "Roles": [ - { - "Ref": "PipelineSourceCdkCodeSourceCodePipelineActionRole237947B8" - } - ] - } - }, - "PipelineSourceLambdaCodeSourceCodePipelineActionRole4E89EF60": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceLambdaCodeSourceCodePipelineActionRoleDefaultPolicyAD234A91": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "LambdaCodeRepoE08DD409", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceLambdaCodeSourceCodePipelineActionRoleDefaultPolicyAD234A91", - "Roles": [ - { - "Ref": "PipelineSourceLambdaCodeSourceCodePipelineActionRole4E89EF60" - } - ] - } - }, - "PipelineEventsRole46BEEA7C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineEventsRoleDefaultPolicyFF4FCCE0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineEventsRoleDefaultPolicyFF4FCCE0", - "Roles": [ - { - "Ref": "PipelineEventsRole46BEEA7C" - } - ] - } - }, - "PipelineBuildCDKBuildCodePipelineActionRole15F4B424": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildCDKBuildCodePipelineActionRoleDefaultPolicyE350F3F9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CdkBuildProject9382C38D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildCDKBuildCodePipelineActionRoleDefaultPolicyE350F3F9", - "Roles": [ - { - "Ref": "PipelineBuildCDKBuildCodePipelineActionRole15F4B424" - } - ] - } - }, - "PipelineBuildLambdaBuildCodePipelineActionRole2DAE39E9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildLambdaBuildCodePipelineActionRoleDefaultPolicy3CA005F2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "LambdaBuildProject7E2DAB11", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildLambdaBuildCodePipelineActionRoleDefaultPolicy3CA005F2", - "Roles": [ - { - "Ref": "PipelineBuildLambdaBuildCodePipelineActionRole2DAE39E9" - } - ] - } - }, - "PipelineDeployLambdaCFNDeployCodePipelineActionRoleF8A74488": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployLambdaCFNDeployCodePipelineActionRoleDefaultPolicy54A1AB67": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineDeployLambdaCFNDeployRole89CA1043", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "cloudformation:CreateStack", - "cloudformation:DescribeStack*", - "cloudformation:GetStackPolicy", - "cloudformation:GetTemplate*", - "cloudformation:SetStackPolicy", - "cloudformation:UpdateStack", - "cloudformation:ValidateTemplate" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/LambdaStackDeployedName/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployLambdaCFNDeployCodePipelineActionRoleDefaultPolicy54A1AB67", - "Roles": [ - { - "Ref": "PipelineDeployLambdaCFNDeployCodePipelineActionRoleF8A74488" - } - ] - } - }, - "PipelineDeployLambdaCFNDeployRole89CA1043": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployLambdaCFNDeployRoleDefaultPolicyE83FD793": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployLambdaCFNDeployRoleDefaultPolicyE83FD793", - "Roles": [ - { - "Ref": "PipelineDeployLambdaCFNDeployRole89CA1043" - } - ] - } - }, - "CdkCodeRepo7D2EC742": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "CdkCodeRepo" - } - }, - "CdkCodeRepoPipelineStackPipeline9DB740AFEventRule97707F9A": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "CdkCodeRepo7D2EC742", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "LambdaCodeRepoE08DD409": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "LambdaCodeRepo" - } - }, - "LambdaCodeRepoPipelineStackPipeline9DB740AFEventRule2C34743D": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "LambdaCodeRepoE08DD409", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "CdkBuildProjectRoleE0B6FEB0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CdkBuildProjectRoleDefaultPolicy3C7ECB00": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "CdkBuildProject9382C38D" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "CdkBuildProject9382C38D" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "CdkBuildProject9382C38D" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CdkBuildProjectRoleDefaultPolicy3C7ECB00", - "Roles": [ - { - "Ref": "CdkBuildProjectRoleE0B6FEB0" - } - ] - } - }, - "CdkBuildProject9382C38D": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/nodejs:10.1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "CdkBuildProjectRoleE0B6FEB0", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": \"npm install\"\n },\n \"build\": {\n \"commands\": [\n \"npm run build\",\n \"npm run cdk synth LambdaStack -- -o .\"\n ]\n }\n },\n \"artifacts\": {\n \"files\": \"LambdaStack.template.yaml\"\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - }, - "LambdaBuildProjectRoleD0C4F982": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "LambdaBuildProjectRoleDefaultPolicyA3A66624": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "LambdaBuildProject7E2DAB11" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "LambdaBuildProject7E2DAB11" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "LambdaBuildProject7E2DAB11" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaBuildProjectRoleDefaultPolicyA3A66624", - "Roles": [ - { - "Ref": "LambdaBuildProjectRoleD0C4F982" - } - ] - } - }, - "LambdaBuildProject7E2DAB11": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/nodejs:10.1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "LambdaBuildProjectRoleD0C4F982", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": \"npm install\"\n },\n \"build\": {\n \"commands\": \"npm run build\"\n }\n },\n \"artifacts\": {\n \"files\": [\n \"index.js\",\n \"node_modules/**/*\"\n ]\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.expected.json deleted file mode 100644 index 4cc240b809647..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.expected.json +++ /dev/null @@ -1,894 +0,0 @@ -{ - "Resources": { - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinelambdapipeline87a4b3d3", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineLambdaCodePipelineActionRoleC6032822", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "PipelineBucketB967BD35" - }, - "S3ObjectKey": "key", - "PollForSourceChanges": false - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Invoke", - "Owner": "AWS", - "Provider": "Lambda", - "Version": "1" - }, - "Configuration": { - "FunctionName": { - "Ref": "LambdaFun98622869" - } - }, - "Name": "Lambda", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineLambdaCodePipelineActionRoleC6032822", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Lambda" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - }, - "PipelineEventsRole46BEEA7C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineEventsRoleDefaultPolicyFF4FCCE0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineEventsRoleDefaultPolicyFF4FCCE0", - "Roles": [ - { - "Ref": "PipelineEventsRole46BEEA7C" - } - ] - } - }, - "PipelineLambdaCodePipelineActionRoleC6032822": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineLambdaCodePipelineActionRoleDefaultPolicyFEE90F93": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:ListFunctions", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "LambdaFun98622869", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "LambdaFun98622869", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineLambdaCodePipelineActionRoleDefaultPolicyFEE90F93", - "Roles": [ - { - "Ref": "PipelineLambdaCodePipelineActionRoleC6032822" - } - ] - } - }, - "PipelineBucketB967BD35": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineBucketawscdkcodepipelinelambdaPipeline87A4B3D3SourceEventRulekey23D3C004": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.s3" - ], - "detail-type": [ - "AWS API Call via CloudTrail" - ], - "detail": { - "resources": { - "ARN": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - "eventName": [ - "CompleteMultipartUpload", - "CopyObject", - "PutObject" - ], - "requestParameters": { - "bucketName": [ - { - "Ref": "PipelineBucketB967BD35" - } - ], - "key": [ - "key" - ] - } - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "CloudTrailS310CD22F2": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "CloudTrailS3PolicyEA49A03E": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "CloudTrailS310CD22F2" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "CloudTrailS310CD22F2", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CloudTrailS310CD22F2", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "s3:GetBucketAcl", - "Effect": "Allow", - "Principal": { - "Service": "cloudtrail.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "CloudTrailS310CD22F2", - "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": [ - "CloudTrailS310CD22F2", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CloudTrailA62D711D": { - "Type": "AWS::CloudTrail::Trail", - "Properties": { - "IsLogging": true, - "S3BucketName": { - "Ref": "CloudTrailS310CD22F2" - }, - "EnableLogFileValidation": true, - "EventSelectors": [ - { - "DataResources": [ - { - "Type": "AWS::S3::Object", - "Values": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - } - ], - "IncludeManagementEvents": false, - "ReadWriteType": "WriteOnly" - } - ], - "IncludeGlobalServiceEvents": true, - "IsMultiRegionTrail": true - }, - "DependsOn": [ - "CloudTrailS3PolicyEA49A03E" - ] - }, - "LambdaFunServiceRoleF0979767": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaFunServiceRoleDefaultPolicy217FED83": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codepipeline:PutJobFailureResult", - "codepipeline:PutJobSuccessResult" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaFunServiceRoleDefaultPolicy217FED83", - "Roles": [ - { - "Ref": "LambdaFunServiceRoleF0979767" - } - ] - } - }, - "LambdaFun98622869": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\n exports.handler = function () {\n console.log(\"Hello, world!\");\n };\n " - }, - "Role": { - "Fn::GetAtt": [ - "LambdaFunServiceRoleF0979767", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "LambdaFunServiceRoleDefaultPolicy217FED83", - "LambdaFunServiceRoleF0979767" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.expected.json deleted file mode 100644 index 8546b2ea0e96d..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.expected.json +++ /dev/null @@ -1,451 +0,0 @@ -{ - "Resources": { - "PipelineBucketB967BD35": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinealexadeploypipeline961107f5", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "PipelineBucketB967BD35" - }, - "S3ObjectKey": "key" - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "ThirdParty", - "Provider": "AlexaSkillsKit", - "Version": "1" - }, - "Configuration": { - "ClientId": "clientId", - "ClientSecret": "clientSecret", - "RefreshToken": "refreshToken", - "SkillId": "amzn1.ask.skill.12345678-1234-1234-1234-123456789012" - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "DeploySkill", - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.expected.json deleted file mode 100644 index e84918465e0f5..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.expected.json +++ /dev/null @@ -1,491 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployCodePipelineActionRole31B1904C", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceS3CodePipelineActionRole9F003087", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "some/path" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceS3CodePipelineActionRole9F003087", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "aws-cdk-codepipeline-cross-region-deploy-stack", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployRole9CC99B3F", - "Arn" - ] - }, - "ActionMode": "CREATE_UPDATE", - "TemplatePath": "Artifact_Source_S3::template.yml" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "CFN_Deploy", - "Region": "us-west-2", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployCodePipelineActionRole31B1904C", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "CFN" - } - ], - "ArtifactStores": [ - { - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - }, - "Region": "us-west-2" - } - ] - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceS3CodePipelineActionRole9F003087": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceS3CodePipelineActionRoleDefaultPolicyF838EE0B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceS3CodePipelineActionRoleDefaultPolicyF838EE0B", - "Roles": [ - { - "Ref": "MyPipelineSourceS3CodePipelineActionRole9F003087" - } - ] - } - }, - "MyPipelineCFNCFNDeployCodePipelineActionRole31B1904C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineCFNCFNDeployCodePipelineActionRoleDefaultPolicyD67537CB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployRole9CC99B3F", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "cloudformation:CreateStack", - "cloudformation:DescribeStack*", - "cloudformation:GetStackPolicy", - "cloudformation:GetTemplate*", - "cloudformation:SetStackPolicy", - "cloudformation:UpdateStack", - "cloudformation:ValidateTemplate" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:us-west-2:", - { - "Ref": "AWS::AccountId" - }, - ":stack/aws-cdk-codepipeline-cross-region-deploy-stack/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineCFNCFNDeployCodePipelineActionRoleDefaultPolicyD67537CB", - "Roles": [ - { - "Ref": "MyPipelineCFNCFNDeployCodePipelineActionRole31B1904C" - } - ] - } - }, - "MyPipelineCFNCFNDeployRole9CC99B3F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineCFNCFNDeployRoleDefaultPolicy65876BA0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineCFNCFNDeployRoleDefaultPolicy65876BA0", - "Roles": [ - { - "Ref": "MyPipelineCFNCFNDeployRole9CC99B3F" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.expected.json deleted file mode 100644 index d1f15ddedf6f4..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.expected.json +++ /dev/null @@ -1,494 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ActionRole60B0EDF7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ActionRoleDefaultPolicyCA33BE56": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:*", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployRole9CC99B3F", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "cloudformation:CreateStack", - "cloudformation:DescribeStack*", - "cloudformation:GetStackPolicy", - "cloudformation:GetTemplate*", - "cloudformation:SetStackPolicy", - "cloudformation:UpdateStack", - "cloudformation:ValidateTemplate" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/aws-cdk-codepipeline-cross-region-deploy-stack/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ActionRoleDefaultPolicyCA33BE56", - "Roles": [ - { - "Ref": "ActionRole60B0EDF7" - } - ] - } - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ActionRole60B0EDF7", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceS3CodePipelineActionRole9F003087", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "some/path" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceS3CodePipelineActionRole9F003087", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "aws-cdk-codepipeline-cross-region-deploy-stack", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineCFNCFNDeployRole9CC99B3F", - "Arn" - ] - }, - "ActionMode": "CREATE_UPDATE", - "TemplatePath": "Artifact_Source_S3::template.yml" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "CFN_Deploy", - "RoleArn": { - "Fn::GetAtt": [ - "ActionRole60B0EDF7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "CFN" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceS3CodePipelineActionRole9F003087": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceS3CodePipelineActionRoleDefaultPolicyF838EE0B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceS3CodePipelineActionRoleDefaultPolicyF838EE0B", - "Roles": [ - { - "Ref": "MyPipelineSourceS3CodePipelineActionRole9F003087" - } - ] - } - }, - "MyPipelineCFNCFNDeployRole9CC99B3F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineCFNCFNDeployRoleDefaultPolicy65876BA0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineCFNCFNDeployRoleDefaultPolicy65876BA0", - "Roles": [ - { - "Ref": "MyPipelineCFNCFNDeployRole9CC99B3F" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.expected.json deleted file mode 100644 index 689aa0a10542c..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.expected.json +++ /dev/null @@ -1,787 +0,0 @@ -{ - "Resources": { - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinecloudformationpipeline7dbde619", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineCFNDeployCFNCodePipelineActionRole444CF5DD", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceAdditionalSourceCodePipelineActionRole0897461A", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "PipelineBucketB967BD35" - }, - "S3ObjectKey": "key" - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "PipelineBucketB967BD35" - }, - "S3ObjectKey": "additional/key" - }, - "Name": "AdditionalSource", - "OutputArtifacts": [ - { - "Name": "AdditionalArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceAdditionalSourceCodePipelineActionRole0897461A", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "IntegTest-TestActionStack", - "RoleArn": { - "Fn::GetAtt": [ - "CfnChangeSetRole6F05F6FC", - "Arn" - ] - }, - "ParameterOverrides": "{\"BucketName\":{\"Fn::GetArtifactAtt\":[\"SourceArtifact\",\"BucketName\"]},\"ObjectKey\":{\"Fn::GetArtifactAtt\":[\"SourceArtifact\",\"ObjectKey\"]},\"Url\":{\"Fn::GetArtifactAtt\":[\"AdditionalArtifact\",\"URL\"]},\"OtherParam\":{\"Fn::GetParam\":[\"SourceArtifact\",\"params.json\",\"OtherParam\"]}}", - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "ChangeSetIntegTest", - "TemplatePath": "SourceArtifact::test.yaml" - }, - "InputArtifacts": [ - { - "Name": "AdditionalArtifact" - }, - { - "Name": "SourceArtifact" - } - ], - "Name": "DeployCFN", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineCFNDeployCFNCodePipelineActionRole444CF5DD", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "CFN" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - }, - "PipelineSourceAdditionalSourceCodePipelineActionRole0897461A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceAdditionalSourceCodePipelineActionRoleDefaultPolicy9B326CCB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/additional/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceAdditionalSourceCodePipelineActionRoleDefaultPolicy9B326CCB", - "Roles": [ - { - "Ref": "PipelineSourceAdditionalSourceCodePipelineActionRole0897461A" - } - ] - } - }, - "PipelineCFNDeployCFNCodePipelineActionRole444CF5DD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineCFNDeployCFNCodePipelineActionRoleDefaultPolicy9C068517": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CfnChangeSetRole6F05F6FC", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "cloudformation:CreateChangeSet", - "cloudformation:DeleteChangeSet", - "cloudformation:DescribeChangeSet", - "cloudformation:DescribeStacks" - ], - "Condition": { - "StringEqualsIfExists": { - "cloudformation:ChangeSetName": "ChangeSetIntegTest" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/IntegTest-TestActionStack/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineCFNDeployCFNCodePipelineActionRoleDefaultPolicy9C068517", - "Roles": [ - { - "Ref": "PipelineCFNDeployCFNCodePipelineActionRole444CF5DD" - } - ] - } - }, - "PipelineBucketB967BD35": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CfnChangeSetRole6F05F6FC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.expected.json deleted file mode 100644 index 43d50d461ead0..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.expected.json +++ /dev/null @@ -1,549 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "MyIntegTestTempRepo" - } - }, - "MyRepoawscdkcodepipelinecodebuildbatchPipeline674F06D4EventRuleD3DE52E7": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - }, - { - "Action": [ - "codebuild:BatchGetBuildBatches", - "codebuild:StartBuildBatch", - "codebuild:StopBuildBatch" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBuildProject30DB9D6E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "MyBuildProject30DB9D6E" - }, - "BatchEnabled": "true" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_Source" - } - ], - "Name": "Build", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineEventsRole46BEEA7C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineEventsRoleDefaultPolicyFF4FCCE0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineEventsRoleDefaultPolicyFF4FCCE0", - "Roles": [ - { - "Ref": "PipelineEventsRole46BEEA7C" - } - ] - } - }, - "MyBuildProjectRole6B7E2258": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyBuildProjectRoleDefaultPolicy5604AA87": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyBuildProjectRoleDefaultPolicy5604AA87", - "Roles": [ - { - "Ref": "MyBuildProjectRole6B7E2258" - } - ] - } - }, - "MyBuildProject30DB9D6E": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyBuildProjectRole6B7E2258", - "Arn" - ] - }, - "Source": { - "Type": "CODEPIPELINE" - }, - "BuildBatchConfig": { - "ServiceRole": { - "Fn::GetAtt": [ - "MyBuildProjectBatchServiceRole531F3056", - "Arn" - ] - } - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "MyBuildProjectBatchServiceRole531F3056": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyBuildProjectBatchServiceRoleDefaultPolicy816785FC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:RetryBuild", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBuildProject30DB9D6E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyBuildProjectBatchServiceRoleDefaultPolicy816785FC", - "Roles": [ - { - "Ref": "MyBuildProjectBatchServiceRole531F3056" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json deleted file mode 100644 index c6216fb43bc54..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json +++ /dev/null @@ -1,604 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "MyIntegTestTempRepo" - } - }, - "MyRepoawscdkcodepipelinecodebuildmultipleinputsoutputsPipeline314D3A85EventRule9F75D675": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path" - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBuildProject30DB9D6E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "Source1", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_Source1" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "some/path" - }, - "Name": "Source2", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_Source2" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "MyBuildProject30DB9D6E" - }, - "PrimarySource": "Artifact_Source_Source1" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_Source1" - }, - { - "Name": "Artifact_Source_Source2" - } - ], - "Name": "Build1", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_Build1_1" - }, - { - "Name": "Artifact_Build_Build1_2" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Test", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "MyBuildProject30DB9D6E" - }, - "PrimarySource": "Artifact_Source_Source2" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_Source2" - }, - { - "Name": "Artifact_Source_Source1" - } - ], - "Name": "Build2", - "OutputArtifacts": [ - { - "Name": "CustomOutput2" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineEventsRole46BEEA7C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineEventsRoleDefaultPolicyFF4FCCE0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineEventsRoleDefaultPolicyFF4FCCE0", - "Roles": [ - { - "Ref": "PipelineEventsRole46BEEA7C" - } - ] - } - }, - "MyBuildProjectRole6B7E2258": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyBuildProjectRoleDefaultPolicy5604AA87": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyBuildProjectRoleDefaultPolicy5604AA87", - "Roles": [ - { - "Ref": "MyBuildProjectRole6B7E2258" - } - ] - } - }, - "MyBuildProject30DB9D6E": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyBuildProjectRole6B7E2258", - "Arn" - ] - }, - "Source": { - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json deleted file mode 100644 index b6e3478c077c7..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.expected.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "my-repo" - } - }, - "MyBuildProjectRole6B7E2258": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyBuildProjectRoleDefaultPolicy5604AA87": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyBuildProject30DB9D6E" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "ssm:GetParameters", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/param_store" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyBuildProjectRoleDefaultPolicy5604AA87", - "Roles": [ - { - "Ref": "MyBuildProjectRole6B7E2258" - } - ] - } - }, - "MyBuildProject30DB9D6E": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyBuildProjectRole6B7E2258", - "Arn" - ] - }, - "Source": { - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - } - }, - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinecodecommitcodebuildpipeline9540e1f5", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelinebuildCodePipelineActionRole11BCD4FF", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinebuildtestCodePipelineActionRole467D0DFA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinesourceCodePipelineActionRoleB7E0306A", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": true - }, - "Name": "source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelinesourceCodePipelineActionRoleB7E0306A", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "MyBuildProject30DB9D6E" - }, - "EnvironmentVariables": "[{\"name\":\"TEST_ENV_VARIABLE\",\"type\":\"PLAINTEXT\",\"value\":\"test env variable value\"},{\"name\":\"PARAM_STORE_VARIABLE\",\"type\":\"PARAMETER_STORE\",\"value\":\"param_store\"}]" - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "build", - "OutputArtifacts": [ - { - "Name": "Artifact_build_build" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelinebuildCodePipelineActionRole11BCD4FF", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Test", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "MyBuildProject30DB9D6E" - } - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "test", - "RoleArn": { - "Fn::GetAtt": [ - "PipelinebuildtestCodePipelineActionRole467D0DFA", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "build" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelinesourceCodePipelineActionRoleB7E0306A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinesourceCodePipelineActionRoleDefaultPolicy9E69DE83": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinesourceCodePipelineActionRoleDefaultPolicy9E69DE83", - "Roles": [ - { - "Ref": "PipelinesourceCodePipelineActionRoleB7E0306A" - } - ] - } - }, - "PipelinebuildCodePipelineActionRole11BCD4FF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinebuildCodePipelineActionRoleDefaultPolicyDC80DBC3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBuildProject30DB9D6E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinebuildCodePipelineActionRoleDefaultPolicyDC80DBC3", - "Roles": [ - { - "Ref": "PipelinebuildCodePipelineActionRole11BCD4FF" - } - ] - } - }, - "PipelinebuildtestCodePipelineActionRole467D0DFA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinebuildtestCodePipelineActionRoleDefaultPolicy319EA326": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBuildProject30DB9D6E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinebuildtestCodePipelineActionRoleDefaultPolicy319EA326", - "Roles": [ - { - "Ref": "PipelinebuildtestCodePipelineActionRole467D0DFA" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.expected.json deleted file mode 100644 index 4b563e55092f9..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.expected.json +++ /dev/null @@ -1,601 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "my-repo" - } - }, - "MyRepoawscdkcodepipelinecodecommitPipelineF780CA18EventRuleC207C969": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineEventsRole46BEEA7C", - "Arn" - ] - } - } - ] - } - }, - "PipelineArtifactsBucketEncryptionKey01D58D69": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias5C510EEE": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinecodecommitpipelinef780ca18", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucket22248F97": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyD4F9712A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelinebuildmanualCodePipelineActionRoleE3306AB0", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinesourceCodePipelineActionRoleB7E0306A", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelinesourceCodePipelineActionRoleB7E0306A", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Name": "manual", - "RoleArn": { - "Fn::GetAtt": [ - "PipelinebuildmanualCodePipelineActionRoleE3306AB0", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "build" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelinesourceCodePipelineActionRoleB7E0306A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinesourceCodePipelineActionRoleDefaultPolicy9E69DE83": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucket22248F97", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKey01D58D69", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinesourceCodePipelineActionRoleDefaultPolicy9E69DE83", - "Roles": [ - { - "Ref": "PipelinesourceCodePipelineActionRoleB7E0306A" - } - ] - } - }, - "PipelineEventsRole46BEEA7C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineEventsRoleDefaultPolicyFF4FCCE0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "PipelineC660917D" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineEventsRoleDefaultPolicyFF4FCCE0", - "Roles": [ - { - "Ref": "PipelineEventsRole46BEEA7C" - } - ] - } - }, - "PipelinebuildmanualCodePipelineActionRoleE3306AB0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.expected.json deleted file mode 100644 index 3693be3cc42a8..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.expected.json +++ /dev/null @@ -1,479 +0,0 @@ -{ - "Resources": { - "CodeDeployPipelineIntegTest9F618D61": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "CodeDeployPipelineIntegTest9F618D61" - }, - "S3ObjectKey": "application.zip" - }, - "Name": "S3Source", - "OutputArtifacts": [ - { - "Name": "SourceOutput" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CodeDeployToECS", - "Version": "1" - }, - "Configuration": { - "ApplicationName": "IntegTestDeployApp", - "DeploymentGroupName": "IntegTestDeploymentGroup", - "TaskDefinitionTemplateArtifact": "SourceOutput", - "TaskDefinitionTemplatePath": "task-definition-test.json", - "AppSpecTemplateArtifact": "SourceOutput", - "AppSpecTemplatePath": "appspec-test.json", - "Image1ArtifactName": "SourceOutput", - "Image1ContainerName": "PLACEHOLDER" - }, - "InputArtifacts": [ - { - "Name": "SourceOutput" - } - ], - "Name": "CodeDeploy", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "CodeDeployPipelineIntegTest9F618D61" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3SourceCodePipelineActionRoleDefaultPolicy352A3912": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/application.zip" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3SourceCodePipelineActionRoleDefaultPolicy352A3912", - "Roles": [ - { - "Ref": "PipelineSourceS3SourceCodePipelineActionRole8DE11A40" - } - ] - } - }, - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployCodeDeployCodePipelineActionRoleDefaultPolicy7B34E673": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codedeploy:GetApplication", - "codedeploy:GetApplicationRevision", - "codedeploy:RegisterApplicationRevision" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":application:IntegTestDeployApp" - ] - ] - } - }, - { - "Action": [ - "codedeploy:CreateDeployment", - "codedeploy:GetDeployment" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentgroup:IntegTestDeployApp/IntegTestDeploymentGroup" - ] - ] - } - }, - { - "Action": "codedeploy:GetDeploymentConfig", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentconfig:CodeDeployDefault.ECSAllAtOnce" - ] - ] - } - }, - { - "Action": "ecs:RegisterTaskDefinition", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Condition": { - "StringEqualsIfExists": { - "iam:PassedToService": [ - "ecs-tasks.amazonaws.com" - ] - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployCodeDeployCodePipelineActionRoleDefaultPolicy7B34E673", - "Roles": [ - { - "Ref": "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.expected.json deleted file mode 100644 index 2908540d6e921..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.expected.json +++ /dev/null @@ -1,557 +0,0 @@ -{ - "Resources": { - "CodeDeployApplicationE587C27C": { - "Type": "AWS::CodeDeploy::Application", - "Properties": { - "ApplicationName": "IntegTestDeployApp", - "ComputePlatform": "Server" - } - }, - "CustomDeployConfig52EEBC13": { - "Type": "AWS::CodeDeploy::DeploymentConfig", - "Properties": { - "MinimumHealthyHosts": { - "Type": "HOST_COUNT", - "Value": 0 - } - } - }, - "CodeDeployGroupRole1D304F7A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "codedeploy.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSCodeDeployRole" - ] - ] - } - ] - } - }, - "CodeDeployGroup58220FC8": { - "Type": "AWS::CodeDeploy::DeploymentGroup", - "Properties": { - "ApplicationName": { - "Ref": "CodeDeployApplicationE587C27C" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "CodeDeployGroupRole1D304F7A", - "Arn" - ] - }, - "AutoRollbackConfiguration": { - "Enabled": true, - "Events": [ - "DEPLOYMENT_FAILURE" - ] - }, - "DeploymentConfigName": { - "Ref": "CustomDeployConfig52EEBC13" - }, - "DeploymentGroupName": "IntegTestDeploymentGroup" - } - }, - "CodeDeployPipelineIntegTest9F618D61": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "CodeDeployPipelineIntegTest9F618D61" - }, - "S3ObjectKey": "application.zip" - }, - "Name": "S3Source", - "OutputArtifacts": [ - { - "Name": "SourceOutput" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CodeDeploy", - "Version": "1" - }, - "Configuration": { - "ApplicationName": { - "Ref": "CodeDeployApplicationE587C27C" - }, - "DeploymentGroupName": { - "Ref": "CodeDeployGroup58220FC8" - } - }, - "InputArtifacts": [ - { - "Name": "SourceOutput" - } - ], - "Name": "CodeDeploy", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "CodeDeployPipelineIntegTest9F618D61" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceS3SourceCodePipelineActionRole8DE11A40": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3SourceCodePipelineActionRoleDefaultPolicy352A3912": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/application.zip" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3SourceCodePipelineActionRoleDefaultPolicy352A3912", - "Roles": [ - { - "Ref": "PipelineSourceS3SourceCodePipelineActionRole8DE11A40" - } - ] - } - }, - "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployCodeDeployCodePipelineActionRoleDefaultPolicy7B34E673": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codedeploy:GetApplicationRevision", - "codedeploy:RegisterApplicationRevision" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":application:", - { - "Ref": "CodeDeployApplicationE587C27C" - } - ] - ] - } - }, - { - "Action": [ - "codedeploy:CreateDeployment", - "codedeploy:GetDeployment" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentgroup:", - { - "Ref": "CodeDeployApplicationE587C27C" - }, - "/", - { - "Ref": "CodeDeployGroup58220FC8" - } - ] - ] - } - }, - { - "Action": "codedeploy:GetDeploymentConfig", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codedeploy:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":deploymentconfig:", - { - "Ref": "CustomDeployConfig52EEBC13" - } - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CodeDeployPipelineIntegTest9F618D61", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployCodeDeployCodePipelineActionRoleDefaultPolicy7B34E673", - "Roles": [ - { - "Ref": "PipelineDeployCodeDeployCodePipelineActionRoleFA7F8EEF" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.expected.json deleted file mode 100644 index 6436188227e18..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.expected.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineApproveManualApprovalCodePipelineActionRole9E338F01", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceECRSourceCodePipelineActionRole4C6714EE", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "ECR", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Ref": "MyEcrRepo767466D0" - } - }, - "Name": "ECR_Source", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_ECR_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceECRSourceCodePipelineActionRole4C6714EE", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Name": "ManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineApproveManualApprovalCodePipelineActionRole9E338F01", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Approve" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceECRSourceCodePipelineActionRole4C6714EE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceECRSourceCodePipelineActionRoleDefaultPolicy7646B7FE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecr:DescribeImages", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyEcrRepo767466D0", - "Arn" - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceECRSourceCodePipelineActionRoleDefaultPolicy7646B7FE", - "Roles": [ - { - "Ref": "MyPipelineSourceECRSourceCodePipelineActionRole4C6714EE" - } - ] - } - }, - "MyPipelineEventsRoleFAB99F32": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineEventsRoleDefaultPolicyF045F033": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyPipelineAED38ECF" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineEventsRoleDefaultPolicyF045F033", - "Roles": [ - { - "Ref": "MyPipelineEventsRoleFAB99F32" - } - ] - } - }, - "MyPipelineApproveManualApprovalCodePipelineActionRole9E338F01": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyEcrRepo767466D0": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyEcrRepoawscdkcodepipelineecrsourceMyPipeline63CF3194SourceEventRule911FDB6D": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.ecr" - ], - "detail-type": [ - "AWS API Call via CloudTrail" - ], - "detail": { - "requestParameters": { - "repositoryName": [ - { - "Ref": "MyEcrRepo767466D0" - } - ], - "imageTag": [ - "latest" - ] - }, - "eventName": [ - "PutImage" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyPipelineAED38ECF" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineEventsRoleFAB99F32", - "Arn" - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json deleted file mode 100644 index 067cd58ef2d4d..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json +++ /dev/null @@ -1,1049 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-codepipeline-ecs-deploy/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcrRepoBB83A592": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "Container" - } - ], - "Cpu": "256", - "Family": "awscdkcodepipelineecsdeployTaskDefCF95BCAC", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "FargateServiceAC2B3B85": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup0A0E79CB", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "FargateServiceSecurityGroup0A0E79CB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-codepipeline-ecs-deploy/FargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EcsProjectRoleE2F0E9D2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EcsProjectRoleDefaultPolicy1A8C91E0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "EcsProject54EFDCA6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "EcsProject54EFDCA6" - } - ] - ] - } - ] - }, - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:CompleteLayerUpload", - "ecr:GetDownloadUrlForLayer", - "ecr:InitiateLayerUpload", - "ecr:PutImage", - "ecr:UploadLayerPart" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcrRepoBB83A592", - "Arn" - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsProjectRoleDefaultPolicy1A8C91E0", - "Roles": [ - { - "Ref": "EcsProjectRoleE2F0E9D2" - } - ] - } - }, - "EcsProject54EFDCA6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "REPOSITORY_URI", - "Type": "PLAINTEXT", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "EcrRepoBB83A592", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "EcrRepoBB83A592", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "EcrRepoBB83A592" - } - ] - ] - } - } - ], - "Image": "aws/codebuild/docker:17.09.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": true, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "EcsProjectRoleE2F0E9D2", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": \"$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\"\n },\n \"build\": {\n \"commands\": \"docker build -t $REPOSITORY_URI:latest .\"\n },\n \"post_build\": {\n \"commands\": [\n \"docker push $REPOSITORY_URI:latest\",\n \"printf '[{ \\\"name\\\": \\\"Container\\\", \\\"imageUri\\\": \\\"%s\\\" }]' $REPOSITORY_URI:latest > imagedefinitions.json\"\n ]\n }\n },\n \"artifacts\": {\n \"files\": \"imagedefinitions.json\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineBuildCodeBuildCodePipelineActionRoleCAE538CA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineDeployDeployActionCodePipelineActionRole854184EF", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceCodePipelineActionRoleAA05D76F", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "path/to/Dockerfile" - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceCodePipelineActionRoleAA05D76F", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "EcsProject54EFDCA6" - } - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "CodeBuild", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_CodeBuild" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineBuildCodeBuildCodePipelineActionRoleCAE538CA", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "ECS", - "Version": "1" - }, - "Configuration": { - "ClusterName": { - "Ref": "EcsCluster97242B84" - }, - "ServiceName": { - "Fn::GetAtt": [ - "FargateServiceAC2B3B85", - "Name" - ] - }, - "DeploymentTimeout": 60 - }, - "InputArtifacts": [ - { - "Name": "Artifact_Build_CodeBuild" - } - ], - "Name": "DeployAction", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineDeployDeployActionCodePipelineActionRole854184EF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceCodePipelineActionRoleAA05D76F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceCodePipelineActionRoleDefaultPolicy10C831A9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/path/to/Dockerfile" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceCodePipelineActionRoleDefaultPolicy10C831A9", - "Roles": [ - { - "Ref": "MyPipelineSourceCodePipelineActionRoleAA05D76F" - } - ] - } - }, - "MyPipelineBuildCodeBuildCodePipelineActionRoleCAE538CA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineBuildCodeBuildCodePipelineActionRoleDefaultPolicyD9654D9B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsProject54EFDCA6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineBuildCodeBuildCodePipelineActionRoleDefaultPolicyD9654D9B", - "Roles": [ - { - "Ref": "MyPipelineBuildCodeBuildCodePipelineActionRoleCAE538CA" - } - ] - } - }, - "MyPipelineDeployDeployActionCodePipelineActionRole854184EF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineDeployDeployActionCodePipelineActionRoleDefaultPolicy8B712933": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DescribeServices", - "ecs:DescribeTaskDefinition", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:RegisterTaskDefinition", - "ecs:UpdateService" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Condition": { - "StringEqualsIfExists": { - "iam:PassedToService": [ - "ec2.amazonaws.com", - "ecs-tasks.amazonaws.com" - ] - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineDeployDeployActionCodePipelineActionRoleDefaultPolicy8B712933", - "Roles": [ - { - "Ref": "MyPipelineDeployDeployActionCodePipelineActionRole854184EF" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json deleted file mode 100644 index dd96ee385872c..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-separate-source.lit.expected.json +++ /dev/null @@ -1,1907 +0,0 @@ -[ - { - "Resources": { - "EcsDeployRepositoryE7A569C0": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AppCodeDockerImageBuildAndPushProjectRole991CF4D7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppCodeDockerImageBuildAndPushProjectRoleDefaultPolicyDDF56E3F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:CompleteLayerUpload", - "ecr:GetDownloadUrlForLayer", - "ecr:InitiateLayerUpload", - "ecr:PutImage", - "ecr:UploadLayerPart" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsDeployRepositoryE7A569C0", - "Arn" - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AppCodeDockerImageBuildAndPushProjectRoleDefaultPolicyDDF56E3F", - "Roles": [ - { - "Ref": "AppCodeDockerImageBuildAndPushProjectRole991CF4D7" - } - ] - } - }, - "AppCodeDockerImageBuildAndPushProject00DD6671": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "REPOSITORY_URI", - "Type": "PLAINTEXT", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "EcsDeployRepositoryE7A569C0", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "EcsDeployRepositoryE7A569C0", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "EcsDeployRepositoryE7A569C0" - } - ] - ] - } - } - ], - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": true, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "AppCodeDockerImageBuildAndPushProjectRole991CF4D7", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\",\n \"docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION .\"\n ]\n },\n \"post_build\": {\n \"commands\": [\n \"docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION\",\n \"export imageTag=$CODEBUILD_RESOLVED_SOURCE_VERSION\"\n ]\n }\n },\n \"env\": {\n \"exported-variables\": [\n \"imageTag\"\n ]\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "CdkCodeBuildProjectRole6830A58A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CdkCodeBuildProjectRoleDefaultPolicyA531D3BE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "CdkCodeBuildProject98C8CAB8" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "CdkCodeBuildProject98C8CAB8" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "CdkCodeBuildProject98C8CAB8" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CdkCodeBuildProjectRoleDefaultPolicyA531D3BE", - "Roles": [ - { - "Ref": "CdkCodeBuildProjectRole6830A58A" - } - ] - } - }, - "CdkCodeBuildProject98C8CAB8": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "CdkCodeBuildProjectRole6830A58A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"npx cdk synth --verbose\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "ArtifactBucket7410C9EF": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AppCodeSourceRepository9F7363A1": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "AppCodeSourceRepository" - } - }, - "AppCodeSourceRepositoryawscdkpipelineecsseparatesourcesCodePipelineDeployingEcsApplicationF8E9E764EventRuleA9D5E83B": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "AppCodeSourceRepository9F7363A1", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "CodePipelineDeployingEcsApplication81EB9383" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5", - "Arn" - ] - } - } - ] - } - }, - "CdkCodeSourceRepositoryF10B9DC6": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "CdkCodeSourceRepository" - } - }, - "CdkCodeSourceRepositoryawscdkpipelineecsseparatesourcesCodePipelineDeployingEcsApplicationF8E9E764EventRule94D5EE4B": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "CdkCodeSourceRepositoryF10B9DC6", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "CodePipelineDeployingEcsApplication81EB9383" - } - ] - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5", - "Arn" - ] - } - } - ] - } - }, - "CodePipelineDeployingEcsApplicationRole138CDC17": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationRole138CDC17" - } - ] - } - }, - "CodePipelineDeployingEcsApplication81EB9383": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationRole138CDC17", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "AppCodeSourceRepository9F7363A1", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "AppCodeSource", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_AppCodeSource" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "CdkCodeSourceRepositoryF10B9DC6", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": false - }, - "Name": "CdkCodeSource", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_CdkCodeSource" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "AppCodeDockerImageBuildAndPushProject00DD6671" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_AppCodeSource" - } - ], - "Name": "AppCodeDockerImageBuildAndPush", - "Namespace": "Build_AppCodeDockerImageBuildAndPush_NS", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "CdkCodeBuildProject98C8CAB8" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_CdkCodeSource" - } - ], - "Name": "CdkCodeBuildAndSynth", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_CdkCodeBuildAndSynth" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "SampleEcsStackDeployedFromCodePipeline", - "Capabilities": "CAPABILITY_NAMED_IAM", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647", - "Arn" - ] - }, - "ParameterOverrides": "{\"TaskDefinitionAppContainerImageTagParam6DBCD720\":\"#{Build_AppCodeDockerImageBuildAndPush_NS.imageTag}\"}", - "ActionMode": "CREATE_UPDATE", - "TemplatePath": "Artifact_Build_CdkCodeBuildAndSynth::EcsStackDeployedInPipeline.template.json" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Build_CdkCodeBuildAndSynth" - } - ], - "Name": "CFN_Deploy", - "RoleArn": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "ArtifactBucket7410C9EF" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "CodePipelineDeployingEcsApplicationRoleDefaultPolicyDBDC1339", - "CodePipelineDeployingEcsApplicationRole138CDC17" - ] - }, - "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRoleDefaultPolicy9DFF92D6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "AppCodeSourceRepository9F7363A1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRoleDefaultPolicy9DFF92D6", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationSourceAppCodeSourceCodePipelineActionRole6D88B36F" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicyB5DFA55D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CdkCodeSourceRepositoryF10B9DC6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleDefaultPolicyB5DFA55D", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationSourceCdkCodeSourceCodePipelineActionRoleA1E3A5E9" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationEventsRoleDefaultPolicy19AFD1BD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "CodePipelineDeployingEcsApplication81EB9383" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationEventsRoleDefaultPolicy19AFD1BD", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationEventsRoleEEEA39E5" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRoleDefaultPolicyE8804DE5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "AppCodeDockerImageBuildAndPushProject00DD6671", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRoleDefaultPolicyE8804DE5", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationBuildAppCodeDockerImageBuildAndPushCodePipelineActionRole9B025737" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRoleDefaultPolicy5BE54B75": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CdkCodeBuildProject98C8CAB8", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRoleDefaultPolicy5BE54B75", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationBuildCdkCodeBuildAndSynthCodePipelineActionRole54094521" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleDefaultPolicy39F9A0A0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "cloudformation:CreateStack", - "cloudformation:DescribeStack*", - "cloudformation:GetStackPolicy", - "cloudformation:GetTemplate*", - "cloudformation:SetStackPolicy", - "cloudformation:UpdateStack", - "cloudformation:ValidateTemplate" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":cloudformation:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":stack/SampleEcsStackDeployedFromCodePipeline/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleDefaultPolicy39F9A0A0", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationDeployCFNDeployCodePipelineActionRoleC97FFCE2" - } - ] - } - }, - "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "CodePipelineDeployingEcsApplicationDeployCFNDeployRoleDefaultPolicy859D7B9F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ArtifactBucket7410C9EF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CodePipelineDeployingEcsApplicationDeployCFNDeployRoleDefaultPolicy859D7B9F", - "Roles": [ - { - "Ref": "CodePipelineDeployingEcsApplicationDeployCFNDeployRole71BFA647" - } - ] - } - } - }, - "Outputs": { - "ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD": { - "Value": { - "Fn::GetAtt": [ - "EcsDeployRepositoryE7A569C0", - "Arn" - ] - }, - "Export": { - "Name": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" - } - }, - "ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E": { - "Value": { - "Ref": "EcsDeployRepositoryE7A569C0" - }, - "Export": { - "Name": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E" - } - } - } - }, - { - "Resources": { - "TaskDefinitionTaskRoleFD40A61D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefinitionB36D86D9": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputRefEcsDeployRepositoryE7A569C04EC3EB5E" - }, - ":", - { - "Ref": "TaskDefinitionAppContainerImageTagParam6DBCD720" - } - ] - ] - }, - "Name": "AppContainer" - } - ], - "Cpu": "1024", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefinitionExecutionRole8D61C2FB", - "Arn" - ] - }, - "Family": "EcsStackDeployedInPipelineTaskDefinition3105C51D", - "Memory": "2048", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefinitionTaskRoleFD40A61D", - "Arn" - ] - } - } - }, - "TaskDefinitionExecutionRole8D61C2FB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::ImportValue": "aws-cdk-pipeline-ecs-separate-sources:ExportsOutputFnGetAttEcsDeployRepositoryE7A569C0ArnCCACE9DD" - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5", - "Roles": [ - { - "Ref": "TaskDefinitionExecutionRole8D61C2FB" - } - ] - } - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "EcsStackDeployedInPipeline/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "EcsService81FC6EF6": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsServiceSecurityGroup8FDFD52F", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDefinitionB36D86D9" - } - } - }, - "EcsServiceSecurityGroup8FDFD52F": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EcsStackDeployedInPipeline/EcsService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "TaskDefinitionAppContainerImageTagParam6DBCD720": { - "Type": "String" - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json deleted file mode 100644 index 2463346d5f924..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.expected.json +++ /dev/null @@ -1,890 +0,0 @@ -{ - "Resources": { - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineArtifactsBucketEncryptionKeyAlias9D4F8C59": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkpipelineeventtargetmypipeline4ae5d407", - "TargetKeyId": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineArtifactsBucket727923DD": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyPipelineArtifactsBucketPolicyDFDA675B": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyPipelineArtifactsBucket727923DD" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineBuildCodeBuildActionCodePipelineActionRole3185ADC7", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceCodeCommitSourceCodePipelineActionRole0B6D0F4F", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "CodeCommitRepoDC6A41F9", - "Name" - ] - }, - "BranchName": "master", - "PollForSourceChanges": true - }, - "Name": "CodeCommitSource", - "OutputArtifacts": [ - { - "Name": "Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceCodeCommitSourceCodePipelineActionRole0B6D0F4F", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "BuildProject097C5DB7" - } - }, - "InputArtifacts": [ - { - "Name": "Source" - } - ], - "Name": "CodeBuildAction", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_CodeBuildAction" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineBuildCodeBuildActionCodePipelineActionRole3185ADC7", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "MyPipelineArtifactsBucket727923DD" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceCodeCommitSourceCodePipelineActionRole0B6D0F4F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceCodeCommitSourceCodePipelineActionRoleDefaultPolicyE6664925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - }, - { - "Action": [ - "codecommit:CancelUploadArchive", - "codecommit:GetBranch", - "codecommit:GetCommit", - "codecommit:GetUploadArchiveStatus", - "codecommit:UploadArchive" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "CodeCommitRepoDC6A41F9", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceCodeCommitSourceCodePipelineActionRoleDefaultPolicyE6664925", - "Roles": [ - { - "Ref": "MyPipelineSourceCodeCommitSourceCodePipelineActionRole0B6D0F4F" - } - ] - } - }, - "MyPipelineSourceCodeCommitSourceOnActionStateChangeDCAF781A": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "CodePipeline Action Execution State Change" - ], - "source": [ - "aws.codepipeline" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyPipelineAED38ECF" - } - ] - ] - } - ], - "detail": { - "stage": [ - "Source" - ], - "action": [ - "CodeCommitSource" - ], - "state": [ - "STARTED" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0" - } - ] - } - }, - "MyPipelineSourceOnSourceStateChange6DEE3A75": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "CodePipeline Stage Execution State Change" - ], - "source": [ - "aws.codepipeline" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyPipelineAED38ECF" - } - ] - ] - } - ], - "detail": { - "stage": [ - "Source" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0" - } - ] - } - }, - "MyPipelineBuildCodeBuildActionCodePipelineActionRole3185ADC7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineBuildCodeBuildActionCodePipelineActionRoleDefaultPolicy96378DF6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "BuildProject097C5DB7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineBuildCodeBuildActionCodePipelineActionRoleDefaultPolicy96378DF6", - "Roles": [ - { - "Ref": "MyPipelineBuildCodeBuildActionCodePipelineActionRole3185ADC7" - } - ] - } - }, - "MyPipelineOnPipelineStateChangeA017E4B1": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codepipeline" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyPipelineAED38ECF" - } - ] - ] - } - ], - "detail-type": [ - "CodePipeline Pipeline Execution State Change" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0", - "InputTransformer": { - "InputPathsMap": { - "detail-pipeline": "$.detail.pipeline", - "detail-state": "$.detail.state" - }, - "InputTemplate": "\"Pipeline changed state to \"" - } - } - ] - } - }, - "CodeCommitRepoDC6A41F9": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "foo" - } - }, - "BuildProjectRoleAA92C755": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "BuildProjectRoleDefaultPolicy3E9F248C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "BuildProject097C5DB7" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "BuildProject097C5DB7" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BuildProjectRoleDefaultPolicy3E9F248C", - "Roles": [ - { - "Ref": "BuildProjectRoleAA92C755" - } - ] - } - }, - "BuildProject097C5DB7": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "BuildProjectRoleAA92C755", - "Arn" - ] - }, - "Source": { - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyTopicPolicy12A5EC17": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Ref": "MyTopic86869434" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "MyTopic86869434" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.expected.json deleted file mode 100644 index 5fc5cc38226da..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.expected.json +++ /dev/null @@ -1,383 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole3CAFD08F", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "some/path" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole3CAFD08F", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "Custom", - "Provider": "JenkinsProvider", - "Version": "2" - }, - "Configuration": { - "ProjectName": "JenkinsProject1" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "JenkinsBuild", - "OutputArtifacts": [ - { - "Name": "Artifact_Build_JenkinsBuild" - } - ], - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Test", - "Owner": "Custom", - "Provider": "JenkinsProvider", - "Version": "2" - }, - "Configuration": { - "ProjectName": "JenkinsProject2" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "JenkinsTest", - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Test", - "Owner": "Custom", - "Provider": "JenkinsProvider", - "Version": "2" - }, - "Configuration": { - "ProjectName": "JenkinsProject3" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "JenkinsTest2", - "RunOrder": 1 - } - ], - "Name": "Build" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "MyBucketF68F3FF0" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceS3CodePipelineActionRole3CAFD08F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicy8B9DCBCF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicy8B9DCBCF", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole3CAFD08F" - } - ] - } - }, - "JenkinsProviderJenkinsBuildProviderResourceD9231CAC": { - "Type": "AWS::CodePipeline::CustomActionType", - "Properties": { - "Category": "Build", - "InputArtifactDetails": { - "MaximumCount": 5, - "MinimumCount": 0 - }, - "OutputArtifactDetails": { - "MaximumCount": 5, - "MinimumCount": 0 - }, - "Provider": "JenkinsProvider", - "Version": "2", - "ConfigurationProperties": [ - { - "Key": true, - "Name": "ProjectName", - "Queryable": true, - "Required": true, - "Secret": false - } - ], - "Settings": { - "EntityUrlTemplate": "http://myjenkins.com:8080/job/{Config:ProjectName}", - "ExecutionUrlTemplate": "http://myjenkins.com:8080/job/{Config:ProjectName}/{ExternalExecutionId}" - } - } - }, - "JenkinsProviderJenkinsTestProviderResourceF0CF8F0E": { - "Type": "AWS::CodePipeline::CustomActionType", - "Properties": { - "Category": "Test", - "InputArtifactDetails": { - "MaximumCount": 5, - "MinimumCount": 0 - }, - "OutputArtifactDetails": { - "MaximumCount": 5, - "MinimumCount": 0 - }, - "Provider": "JenkinsProvider", - "Version": "2", - "ConfigurationProperties": [ - { - "Key": true, - "Name": "ProjectName", - "Queryable": true, - "Required": true, - "Secret": false - } - ], - "Settings": { - "EntityUrlTemplate": "http://myjenkins.com:8080/job/{Config:ProjectName}", - "ExecutionUrlTemplate": "http://myjenkins.com:8080/job/{Config:ProjectName}/{ExternalExecutionId}" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.expected.json deleted file mode 100644 index 271e03333b4a4..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.expected.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineApproveManualApprovalCodePipelineActionRole51D669A5", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole3CAFD08F", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "Bucket83908E77" - }, - "S3ObjectKey": "file.zip" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole3CAFD08F", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Configuration": { - "NotificationArn": { - "Ref": "PipelineApproveManualApprovalTopicResourceF5A35B20" - } - }, - "Name": "ManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineApproveManualApprovalCodePipelineActionRole51D669A5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Approve" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "Bucket83908E77" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceS3CodePipelineActionRole3CAFD08F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicy8B9DCBCF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/file.zip" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicy8B9DCBCF", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole3CAFD08F" - } - ] - } - }, - "PipelineApproveManualApprovalCodePipelineActionRole51D669A5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineApproveManualApprovalCodePipelineActionRoleDefaultPolicyB6418282": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "PipelineApproveManualApprovalTopicResourceF5A35B20" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineApproveManualApprovalCodePipelineActionRoleDefaultPolicyB6418282", - "Roles": [ - { - "Ref": "PipelineApproveManualApprovalCodePipelineActionRole51D669A5" - } - ] - } - }, - "PipelineApproveManualApprovalTopicResourceF5A35B20": { - "Type": "AWS::SNS::Topic" - }, - "PipelineApproveManualApprovalTopicResourceadamruka85gmailcom202874CD": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "email", - "TopicArn": { - "Ref": "PipelineApproveManualApprovalTopicResourceF5A35B20" - }, - "Endpoint": "adamruka85@gmail.com" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.expected.json deleted file mode 100644 index 0cac0ad6b45ef..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.expected.json +++ /dev/null @@ -1,441 +0,0 @@ -{ - "Resources": { - "PipelineBucketB967BD35": { - "Type": "AWS::S3::Bucket", - "Properties": { - "VersioningConfiguration": { - "Status": "Enabled" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeployBucket67E2C076": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineRoleD68726F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicyC7A05455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineDeployDeployActionCodePipelineActionRole1C288A60", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicyC7A05455", - "Roles": [ - { - "Ref": "PipelineRoleD68726F7" - } - ] - } - }, - "PipelineC660917D": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleD68726F7", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "PipelineBucketB967BD35" - }, - "S3ObjectKey": "key" - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceCodePipelineActionRoleC6F9E7F5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "BucketName": { - "Ref": "DeployBucket67E2C076" - }, - "Extract": "true", - "CannedACL": "public-read", - "CacheControl": "public, max-age=43200" - }, - "InputArtifacts": [ - { - "Name": "SourceArtifact" - } - ], - "Name": "DeployAction", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineDeployDeployActionCodePipelineActionRole1C288A60", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Deploy" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "PipelineBucketB967BD35" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "PipelineRoleDefaultPolicyC7A05455", - "PipelineRoleD68726F7" - ] - }, - "PipelineSourceCodePipelineActionRoleC6F9E7F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", - "Roles": [ - { - "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" - } - ] - } - }, - "PipelineDeployDeployActionCodePipelineActionRole1C288A60": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DeployBucket67E2C076", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "DeployBucket67E2C076", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:PutObjectAcl", - "s3:PutObjectVersionAcl" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "DeployBucket67E2C076", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineBucketB967BD35", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B", - "Roles": [ - { - "Ref": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json deleted file mode 100644 index 2b47ced6d3afb..0000000000000 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.expected.json +++ /dev/null @@ -1,596 +0,0 @@ -{ - "Resources": { - "SimpleStateMachineRole0CBC135A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "SimpleStateMachineE8E2CF40": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "SimpleStateMachineRole0CBC135A", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"StartState\",\"States\":{\"StartState\":{\"Type\":\"Pass\",\"End\":true}}}" - }, - "DependsOn": [ - "SimpleStateMachineRole0CBC135A" - ] - }, - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineArtifactsBucketEncryptionKeyAlias9D4F8C59": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-awscdkcodepipelinestepfunctionsmypipelinece88aa28", - "TargetKeyId": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyPipelineArtifactsBucket727923DD": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyPipelineArtifactsBucketPolicyDFDA675B": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyPipelineArtifactsBucket727923DD" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleC0D47CA4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineRoleDefaultPolicy34F09EFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineInvokeCodePipelineActionRole006B5BAD", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyPipelineSourceCodePipelineActionRoleAA05D76F", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineRoleDefaultPolicy34F09EFA", - "Roles": [ - { - "Ref": "MyPipelineRoleC0D47CA4" - } - ] - } - }, - "MyPipelineAED38ECF": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineRoleC0D47CA4", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "MyBucketF68F3FF0" - }, - "S3ObjectKey": "some/path/to", - "PollForSourceChanges": true - }, - "Name": "Source", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineSourceCodePipelineActionRoleAA05D76F", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Invoke", - "Owner": "AWS", - "Provider": "StepFunctions", - "Version": "1" - }, - "Configuration": { - "StateMachineArn": { - "Ref": "SimpleStateMachineE8E2CF40" - }, - "Input": "{\"IsHelloWorldExample\":true}", - "InputType": "Literal" - }, - "Name": "Invoke", - "RoleArn": { - "Fn::GetAtt": [ - "MyPipelineInvokeCodePipelineActionRole006B5BAD", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Invoke" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "MyPipelineArtifactsBucket727923DD" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "MyPipelineRoleDefaultPolicy34F09EFA", - "MyPipelineRoleC0D47CA4" - ] - }, - "MyPipelineSourceCodePipelineActionRoleAA05D76F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineSourceCodePipelineActionRoleDefaultPolicy10C831A9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/some/path/to" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucket727923DD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineSourceCodePipelineActionRoleDefaultPolicy10C831A9", - "Roles": [ - { - "Ref": "MyPipelineSourceCodePipelineActionRoleAA05D76F" - } - ] - } - }, - "MyPipelineInvokeCodePipelineActionRole006B5BAD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPipelineInvokeCodePipelineActionRoleDefaultPolicy07A602B1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "states:DescribeStateMachine", - "states:StartExecution" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SimpleStateMachineE8E2CF40" - } - }, - { - "Action": "states:DescribeExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":states:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":execution:", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "SimpleStateMachineE8E2CF40" - } - ] - } - ] - }, - ":*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPipelineInvokeCodePipelineActionRoleDefaultPolicy07A602B1", - "Roles": [ - { - "Ref": "MyPipelineInvokeCodePipelineActionRole006B5BAD" - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito-identitypool/test/integ.identitypool.expected.json b/packages/@aws-cdk/aws-cognito-identitypool/test/integ.identitypool.expected.json deleted file mode 100644 index b2ec1baf42d81..0000000000000 --- a/packages/@aws-cdk/aws-cognito-identitypool/test/integ.identitypool.expected.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "Resources": { - "PoolD3F588B8": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PoolUserPoolAuthenticationProviderClient20F2FFC4": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "PoolD3F588B8" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - { - "Ref": "PoolProviderGoogle76A1E8D0" - }, - "COGNITO" - ] - } - }, - "PoolProviderGoogle76A1E8D0": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderName": "Google", - "ProviderType": "Google", - "UserPoolId": { - "Ref": "PoolD3F588B8" - }, - "AttributeMapping": { - "given_name": "given_name", - "family_name": "family_name", - "email": "email", - "gender": "gender", - "names": "names" - }, - "ProviderDetails": { - "client_id": "google-client-id", - "client_secret": "google-client-secret", - "authorize_scopes": "profile" - } - } - }, - "OtherPool7DA7F2F7": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "OtherPoolUserPoolAuthenticationProviderClient08F670F8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "OtherPool7DA7F2F7" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - { - "Ref": "OtherPoolProviderAmazon4EB0592F" - }, - "COGNITO" - ] - } - }, - "OtherPoolProviderAmazon4EB0592F": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderName": "LoginWithAmazon", - "ProviderType": "LoginWithAmazon", - "UserPoolId": { - "Ref": "OtherPool7DA7F2F7" - }, - "AttributeMapping": { - "given_name": "name", - "email": "email", - "userId": "user_id" - }, - "ProviderDetails": { - "client_id": "amzn-client-id", - "client_secret": "amzn-client-secret", - "authorize_scopes": "profile" - } - } - }, - "identitypoolE2A6D099": { - "Type": "AWS::Cognito::IdentityPool", - "Properties": { - "AllowUnauthenticatedIdentities": false, - "AllowClassicFlow": true, - "CognitoIdentityProviders": [ - { - "ClientId": { - "Ref": "PoolUserPoolAuthenticationProviderClient20F2FFC4" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "PoolD3F588B8" - } - ] - ] - }, - "ServerSideTokenCheck": true - }, - { - "ClientId": { - "Ref": "OtherPoolUserPoolAuthenticationProviderClient08F670F8" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "OtherPool7DA7F2F7" - } - ] - ] - }, - "ServerSideTokenCheck": true - } - ], - "IdentityPoolName": "my-id-pool", - "SupportedLoginProviders": { - "www.amazon.com": "amzn1.application.12312k3j234j13rjiwuenf", - "accounts.google.com": "12345678012.apps.googleusercontent.com" - } - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - }, - "identitypoolAuthenticatedRoleB074B49D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "identitypoolE2A6D099" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "authenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "Default Authenticated Role for Identity Pool ", - { - "Fn::GetAtt": [ - "identitypoolE2A6D099", - "Name" - ] - } - ] - ] - } - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - }, - "identitypoolAuthenticatedRoleDefaultPolicyCB4D2992": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "identitypoolAuthenticatedRoleDefaultPolicyCB4D2992", - "Roles": [ - { - "Ref": "identitypoolAuthenticatedRoleB074B49D" - } - ] - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - }, - "identitypoolUnauthenticatedRoleE61CAC70": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "identitypoolE2A6D099" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "unauthenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "Default Unauthenticated Role for Identity Pool ", - { - "Fn::GetAtt": [ - "identitypoolE2A6D099", - "Name" - ] - } - ] - ] - } - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - }, - "identitypoolUnauthenticatedRoleDefaultPolicyBFACCE98": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:Get*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "identitypoolUnauthenticatedRoleDefaultPolicyBFACCE98", - "Roles": [ - { - "Ref": "identitypoolUnauthenticatedRoleE61CAC70" - } - ] - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - }, - "identitypoolDefaultRoleAttachment6BCAB114": { - "Type": "AWS::Cognito::IdentityPoolRoleAttachment", - "Properties": { - "IdentityPoolId": { - "Ref": "identitypoolE2A6D099" - }, - "Roles": { - "authenticated": { - "Fn::GetAtt": [ - "identitypoolAuthenticatedRoleB074B49D", - "Arn" - ] - }, - "unauthenticated": { - "Fn::GetAtt": [ - "identitypoolUnauthenticatedRoleE61CAC70", - "Arn" - ] - } - } - }, - "DependsOn": [ - "OtherPool7DA7F2F7", - "OtherPoolUserPoolAuthenticationProviderClient08F670F8", - "PoolD3F588B8", - "PoolUserPoolAuthenticationProviderClient20F2FFC4" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.expected.json deleted file mode 100644 index 33d544ca1751a..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.expected.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "Resources": { - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "Schema": [ - { - "AttributeDataType": "String", - "Name": "attribute_one" - }, - { - "AttributeDataType": "String", - "Name": "attribute_two" - } - ], - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myuserpoolmyuserpoolclientAFB2274E": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "myuserpool01998219" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "phone", - "email", - "openid", - "profile", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://redirect-here.myapp.com" - ], - "ClientName": "myuserpoolclient", - "ExplicitAuthFlows": [ - "ALLOW_USER_PASSWORD_AUTH", - "ALLOW_ADMIN_USER_PASSWORD_AUTH", - "ALLOW_CUSTOM_AUTH", - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "GenerateSecret": true, - "PreventUserExistenceErrors": "ENABLED", - "SupportedIdentityProviders": [ - "COGNITO" - ], - "WriteAttributes": [ - "address", - "birthdate", - "custom:attribute_one", - "custom:attribute_two", - "email", - "family_name", - "gender", - "given_name", - "locale", - "middle_name", - "name", - "nickname", - "phone_number", - "picture", - "preferred_username", - "profile", - "updated_at", - "website", - "zoneinfo" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-custom-sender.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-custom-sender.expected.json deleted file mode 100644 index 8bc2a5deae13f..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-custom-sender.expected.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "Resources": { - "emailLambdaServiceRole7569D9F6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "emailLambda61F82360": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function(event, ctx, cb) { console.log(\"Mocked custom email send\");return cb(null, \"success\"); }" - }, - "Role": { - "Fn::GetAtt": [ - "emailLambdaServiceRole7569D9F6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "emailLambdaServiceRole7569D9F6" - ] - }, - "emailLambdaCustomEmailSenderCognito5E15D907": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "emailLambda61F82360", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "pool056F3F7E", - "Arn" - ] - } - } - }, - "keyFEDD6EC0": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "pool056F3F7E": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email" - ], - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "LambdaConfig": { - "CustomEmailSender": { - "LambdaArn": { - "Fn::GetAtt": [ - "emailLambda61F82360", - "Arn" - ] - }, - "LambdaVersion": "V1_0" - }, - "KMSKeyID": { - "Fn::GetAtt": [ - "keyFEDD6EC0", - "Arn" - ] - } - }, - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UsernameAttributes": [ - "email" - ], - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "poolclient2623294C": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ExplicitAuthFlows": [ - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - } - }, - "Outputs": { - "UserPoolId": { - "Value": { - "Ref": "pool056F3F7E" - } - }, - "ClientId": { - "Value": { - "Ref": "poolclient2623294C" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-cfdist.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-cfdist.expected.json deleted file mode 100644 index a5e10b6059b72..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-cfdist.expected.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "Resources": { - "UserPool6BA7E5F2": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserPoolDomainD0EA232A": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "cdk-integ-user-pool-domain", - "UserPoolId": { - "Ref": "UserPool6BA7E5F2" - } - } - }, - "UserPoolDomainCloudFrontDomainNameCustomResourcePolicy7DE54188": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "cognito-idp:DescribeUserPoolDomain", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserPoolDomainCloudFrontDomainNameCustomResourcePolicy7DE54188", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "UserPoolDomainCloudFrontDomainNameE213E594": { - "Type": "Custom::UserPoolCloudFrontDomainName", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CognitoIdentityServiceProvider\",\"action\":\"describeUserPoolDomain\",\"parameters\":{\"Domain\":\"", - { - "Ref": "UserPoolDomainD0EA232A" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Ref": "UserPoolDomainD0EA232A" - }, - "\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CognitoIdentityServiceProvider\",\"action\":\"describeUserPoolDomain\",\"parameters\":{\"Domain\":\"", - { - "Ref": "UserPoolDomainD0EA232A" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Ref": "UserPoolDomainD0EA232A" - }, - "\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "UserPoolDomainCloudFrontDomainNameCustomResourcePolicy7DE54188" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Outputs": { - "Domain": { - "Value": { - "Ref": "UserPoolDomainD0EA232A" - } - }, - "CloudFrontDomainName": { - "Value": { - "Fn::GetAtt": [ - "UserPoolDomainCloudFrontDomainNameE213E594", - "DomainDescription.CloudFrontDistribution" - ] - } - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-signinurl.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-signinurl.expected.json deleted file mode 100644 index f19f82379b701..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-signinurl.expected.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "Resources": { - "UserPool6BA7E5F2": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserPoolDomainD0EA232A": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "cdk-integ-user-pool-domain", - "UserPoolId": { - "Ref": "UserPool6BA7E5F2" - } - } - }, - "UserPoolUserPoolClient40176907": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "UserPool6BA7E5F2" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - } - }, - "Outputs": { - "SignInUrl": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "UserPoolDomainD0EA232A" - }, - ".auth.", - { - "Ref": "AWS::Region" - }, - ".amazoncognito.com/login?client_id=", - { - "Ref": "UserPoolUserPoolClient40176907" - }, - "&response_type=code&redirect_uri=https://example.com" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-explicit-props.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-explicit-props.expected.json deleted file mode 100644 index bf01ef9d1faaf..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-explicit-props.expected.json +++ /dev/null @@ -1,947 +0,0 @@ -{ - "Resources": { - "createAuthChallengeServiceRole611710B5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "createAuthChallengeB185B225": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "createAuthChallengeServiceRole611710B5", - "Arn" - ] - }, - "FunctionName": "createAuthChallenge", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "createAuthChallengeServiceRole611710B5" - ] - }, - "createAuthChallengeCreateAuthChallengeCognito57E2297E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "createAuthChallengeB185B225", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "customMessageServiceRoleB4AE7F17": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "customMessage52BA91E2": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "customMessageServiceRoleB4AE7F17", - "Arn" - ] - }, - "FunctionName": "customMessage", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "customMessageServiceRoleB4AE7F17" - ] - }, - "customMessageCustomMessageCognitoB4F894A6": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "customMessage52BA91E2", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "defineAuthChallengeServiceRole9E2D15DF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "defineAuthChallengeAE7BCDA1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "defineAuthChallengeServiceRole9E2D15DF", - "Arn" - ] - }, - "FunctionName": "defineAuthChallenge", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "defineAuthChallengeServiceRole9E2D15DF" - ] - }, - "defineAuthChallengeDefineAuthChallengeCognito4DBD8021": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "defineAuthChallengeAE7BCDA1", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "postAuthenticationServiceRole5B3B242A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "postAuthentication741BD8E3": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "postAuthenticationServiceRole5B3B242A", - "Arn" - ] - }, - "FunctionName": "postAuthentication", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "postAuthenticationServiceRole5B3B242A" - ] - }, - "postAuthenticationPostAuthenticationCognito8B923BC3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "postAuthentication741BD8E3", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "postConfirmationServiceRole864BE5F9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "postConfirmationD5E3F1DD": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "postConfirmationServiceRole864BE5F9", - "Arn" - ] - }, - "FunctionName": "postConfirmation", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "postConfirmationServiceRole864BE5F9" - ] - }, - "postConfirmationPostConfirmationCognito9D010393": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "postConfirmationD5E3F1DD", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "preAuthenticationServiceRole9712F4D8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "preAuthentication56F78C81": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "preAuthenticationServiceRole9712F4D8", - "Arn" - ] - }, - "FunctionName": "preAuthentication", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "preAuthenticationServiceRole9712F4D8" - ] - }, - "preAuthenticationPreAuthenticationCognito67FACB54": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "preAuthentication56F78C81", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "preSignUpServiceRole0A7E91EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "preSignUp1934B27C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "preSignUpServiceRole0A7E91EB", - "Arn" - ] - }, - "FunctionName": "preSignUp", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "preSignUpServiceRole0A7E91EB" - ] - }, - "preSignUpPreSignUpCognitoE986CC53": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "preSignUp1934B27C", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "preTokenGenerationServiceRole430C3D14": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "preTokenGeneration1E968302": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "preTokenGenerationServiceRole430C3D14", - "Arn" - ] - }, - "FunctionName": "preTokenGeneration", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "preTokenGenerationServiceRole430C3D14" - ] - }, - "preTokenGenerationPreTokenGenerationCognitoC1959918": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "preTokenGeneration1E968302", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "userMigrationServiceRole091766B0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "userMigrationAAA960EC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "userMigrationServiceRole091766B0", - "Arn" - ] - }, - "FunctionName": "userMigration", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "userMigrationServiceRole091766B0" - ] - }, - "userMigrationUserMigrationCognito29EEC4AD": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "userMigrationAAA960EC", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "verifyAuthChallengeResponseServiceRole7077884C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "verifyAuthChallengeResponse211FE4A6": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "verifyAuthChallengeResponseServiceRole7077884C", - "Arn" - ] - }, - "FunctionName": "verifyAuthChallengeResponse", - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "verifyAuthChallengeResponseServiceRole7077884C" - ] - }, - "verifyAuthChallengeResponseVerifyAuthChallengeResponseCognito9DC48AFC": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "verifyAuthChallengeResponse211FE4A6", - "Arn" - ] - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "myuserpool01998219", - "Arn" - ] - } - } - }, - "myuserpoolsmsRole0E16FDD9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "sts:ExternalId": "integuserpoolmyuserpoolDA38443C" - } - }, - "Effect": "Allow", - "Principal": { - "Service": "cognito-idp.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "sns-publish" - } - ] - } - }, - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false, - "InviteMessageTemplate": { - "EmailMessage": "invitation email body from the integ test for {username}. Temp password is {####}.", - "EmailSubject": "invitation email subject from the integ test", - "SMSMessage": "invitation sms message from the integ test for {username}. Temp password is {####}." - } - }, - "AliasAttributes": [ - "email" - ], - "AutoVerifiedAttributes": [ - "email", - "phone_number" - ], - "EmailVerificationMessage": "verification email body from the integ test. Code is {####}.", - "EmailVerificationSubject": "verification email subject from the integ test", - "LambdaConfig": { - "CreateAuthChallenge": { - "Fn::GetAtt": [ - "createAuthChallengeB185B225", - "Arn" - ] - }, - "CustomMessage": { - "Fn::GetAtt": [ - "customMessage52BA91E2", - "Arn" - ] - }, - "DefineAuthChallenge": { - "Fn::GetAtt": [ - "defineAuthChallengeAE7BCDA1", - "Arn" - ] - }, - "PostAuthentication": { - "Fn::GetAtt": [ - "postAuthentication741BD8E3", - "Arn" - ] - }, - "PostConfirmation": { - "Fn::GetAtt": [ - "postConfirmationD5E3F1DD", - "Arn" - ] - }, - "PreAuthentication": { - "Fn::GetAtt": [ - "preAuthentication56F78C81", - "Arn" - ] - }, - "PreSignUp": { - "Fn::GetAtt": [ - "preSignUp1934B27C", - "Arn" - ] - }, - "PreTokenGeneration": { - "Fn::GetAtt": [ - "preTokenGeneration1E968302", - "Arn" - ] - }, - "UserMigration": { - "Fn::GetAtt": [ - "userMigrationAAA960EC", - "Arn" - ] - }, - "VerifyAuthChallengeResponse": { - "Fn::GetAtt": [ - "verifyAuthChallengeResponse211FE4A6", - "Arn" - ] - } - }, - "MfaConfiguration": "OFF", - "Policies": { - "PasswordPolicy": { - "MinimumLength": 12, - "RequireLowercase": true, - "RequireNumbers": true, - "RequireSymbols": true, - "RequireUppercase": true, - "TemporaryPasswordValidityDays": 10 - } - }, - "Schema": [ - { - "Mutable": true, - "Name": "name", - "Required": true - }, - { - "Mutable": true, - "Name": "email", - "Required": true - }, - { - "AttributeDataType": "String", - "Name": "some-string-attr" - }, - { - "AttributeDataType": "String", - "Name": "another-string-attr", - "StringAttributeConstraints": { - "MaxLength": "100", - "MinLength": "4" - } - }, - { - "AttributeDataType": "Number", - "Name": "some-number-attr" - }, - { - "AttributeDataType": "Number", - "Name": "another-number-attr", - "NumberAttributeConstraints": { - "MaxValue": "50", - "MinValue": "10" - } - }, - { - "AttributeDataType": "Boolean", - "Name": "some-boolean-attr" - }, - { - "AttributeDataType": "DateTime", - "Name": "some-datetime-attr" - } - ], - "SmsConfiguration": { - "ExternalId": "integuserpoolmyuserpoolDA38443C", - "SnsCallerArn": { - "Fn::GetAtt": [ - "myuserpoolsmsRole0E16FDD9", - "Arn" - ] - }, - "SnsRegion": { - "Ref": "AWS::Region" - } - }, - "SmsVerificationMessage": "verification sms message from the integ test. Code is {####}.", - "UserPoolName": "MyUserPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "verification email body from the integ test. Code is {####}.", - "EmailSubject": "verification email subject from the integ test", - "SmsMessage": "verification sms message from the integ test. Code is {####}." - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myuserpoolmyuserpooldomainEE1E11AF": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "cdkintegrationtestuserpoolexplicitprops", - "UserPoolId": { - "Ref": "myuserpool01998219" - } - } - } - }, - "Outputs": { - "userpoolId": { - "Value": { - "Ref": "myuserpool01998219" - } - }, - "cognitoDomainName": { - "Value": { - "Fn::Join": [ - "", - [ - { - "Ref": "myuserpoolmyuserpooldomainEE1E11AF" - }, - ".auth.", - { - "Ref": "AWS::Region" - }, - ".amazoncognito.com" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.amazon.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.amazon.expected.json deleted file mode 100644 index dd2188ee4e517..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.amazon.expected.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "Resources": { - "pool056F3F7E": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "poolclient2623294C": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - { - "Ref": "amazon2D32744A" - }, - "COGNITO" - ] - } - }, - "pooldomain430FA744": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "nija-test-pool", - "UserPoolId": { - "Ref": "pool056F3F7E" - } - } - }, - "amazon2D32744A": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderName": "LoginWithAmazon", - "ProviderType": "LoginWithAmazon", - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AttributeMapping": { - "given_name": "name", - "email": "email", - "userId": "user_id" - }, - "ProviderDetails": { - "client_id": "amzn-client-id", - "client_secret": "amzn-client-secret", - "authorize_scopes": "profile" - } - } - } - }, - "Outputs": { - "SignInLink": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "pooldomain430FA744" - }, - ".auth.", - { - "Ref": "AWS::Region" - }, - ".amazoncognito.com/login?client_id=", - { - "Ref": "poolclient2623294C" - }, - "&response_type=code&redirect_uri=https://example.com" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.apple.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.apple.expected.json deleted file mode 100644 index 64baf88ef6807..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.apple.expected.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "Resources": { - "pool056F3F7E": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "poolclient2623294C": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - { - "Ref": "apple9B5408AC" - }, - "COGNITO" - ] - } - }, - "pooldomain430FA744": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "nija-test-pool", - "UserPoolId": { - "Ref": "pool056F3F7E" - } - } - }, - "apple9B5408AC": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderName": "SignInWithApple", - "ProviderType": "SignInWithApple", - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AttributeMapping": { - "family_name": "lastName", - "given_name": "firstName" - }, - "ProviderDetails": { - "client_id": "com.amzn.cdk", - "team_id": "CDKTEAMCDK", - "key_id": "CDKKEYCDK1", - "private_key": "PRIV_KEY_CDK", - "authorize_scopes": "email name" - } - } - } - }, - "Outputs": { - "SignInLink": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "pooldomain430FA744" - }, - ".auth.", - { - "Ref": "AWS::Region" - }, - ".amazoncognito.com/login?client_id=", - { - "Ref": "poolclient2623294C" - }, - "&response_type=code&redirect_uri=https://example.com" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.google.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.google.expected.json deleted file mode 100644 index b90dd7faec0dd..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.google.expected.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "Resources": { - "pool056F3F7E": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "poolclient2623294C": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "SupportedIdentityProviders": [ - { - "Ref": "googleDB2C5242" - }, - "COGNITO" - ] - } - }, - "pooldomain430FA744": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "nija-test-pool", - "UserPoolId": { - "Ref": "pool056F3F7E" - } - } - }, - "googleDB2C5242": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderName": "Google", - "ProviderType": "Google", - "UserPoolId": { - "Ref": "pool056F3F7E" - }, - "AttributeMapping": { - "given_name": "given_name", - "family_name": "family_name", - "email": "email", - "gender": "gender", - "names": "names" - }, - "ProviderDetails": { - "client_id": "google-client-id", - "client_secret": "google-client-secret", - "authorize_scopes": "profile" - } - } - } - }, - "Outputs": { - "SignInLink": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "pooldomain430FA744" - }, - ".auth.", - { - "Ref": "AWS::Region" - }, - ".amazoncognito.com/login?client_id=", - { - "Ref": "poolclient2623294C" - }, - "&response_type=code&redirect_uri=https://example.com" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json deleted file mode 100644 index 36b033a51f2fb..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-resource-server.expected.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "Resources": { - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserPoolName": "MyUserPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myuserpoolmyserver50C4D8E9": { - "Type": "AWS::Cognito::UserPoolResourceServer", - "Properties": { - "Identifier": "users", - "Name": "users", - "UserPoolId": { - "Ref": "myuserpool01998219" - }, - "Scopes": [ - { - "ScopeDescription": "read only", - "ScopeName": "read" - } - ] - } - }, - "myuserpoolclientC5FA41EC": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "myuserpool01998219" - }, - "AllowedOAuthFlows": [ - "client_credentials" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - { - "Fn::Join": [ - "", - [ - { - "Ref": "myuserpoolmyserver50C4D8E9" - }, - "/read" - ] - ] - } - ], - "ClientName": "users-app", - "GenerateSecret": true, - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - } - }, - "Outputs": { - "poolid": { - "Value": { - "Ref": "myuserpool01998219" - } - }, - "clientid": { - "Value": { - "Ref": "myuserpoolclientC5FA41EC" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-code.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-code.expected.json deleted file mode 100644 index 091b5f4cb7a8a..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-code.expected.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Resources": { - "myuserpoolsmsRole0E16FDD9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "sts:ExternalId": "integuserpoolsignupcodemyuserpool08E7AAA5" - } - }, - "Effect": "Allow", - "Principal": { - "Service": "cognito-idp.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "sns-publish" - } - ] - } - }, - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email", - "phone_number" - ], - "EmailVerificationMessage": "integ-test: Account verification code is {####}", - "EmailVerificationSubject": "integ-test: Verify your account", - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": false, - "RequireNumbers": false, - "RequireSymbols": false, - "RequireUppercase": false - } - }, - "SmsConfiguration": { - "ExternalId": "integuserpoolsignupcodemyuserpool08E7AAA5", - "SnsCallerArn": { - "Fn::GetAtt": [ - "myuserpoolsmsRole0E16FDD9", - "Arn" - ] - } - }, - "SmsVerificationMessage": "integ-test: Account verification code is {####}", - "UserPoolName": "MyUserPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "integ-test: Account verification code is {####}", - "EmailSubject": "integ-test: Verify your account", - "SmsMessage": "integ-test: Account verification code is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myuserpoolclient8A58A3E4": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "myuserpool01998219" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ClientName": "signup-test", - "GenerateSecret": false, - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - } - }, - "Outputs": { - "userpoolid": { - "Value": { - "Ref": "myuserpool01998219" - } - }, - "clientid": { - "Value": { - "Ref": "myuserpoolclient8A58A3E4" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-link.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-link.expected.json deleted file mode 100644 index f5cca975e608b..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-signup-link.expected.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "Resources": { - "myuserpoolsmsRole0E16FDD9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "sts:ExternalId": "integuserpoolsignuplinkmyuserpoolA8374994" - } - }, - "Effect": "Allow", - "Principal": { - "Service": "cognito-idp.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "sns-publish" - } - ] - } - }, - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email", - "phone_number" - ], - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": false, - "RequireNumbers": false, - "RequireSymbols": false, - "RequireUppercase": false - } - }, - "SmsConfiguration": { - "ExternalId": "integuserpoolsignuplinkmyuserpoolA8374994", - "SnsCallerArn": { - "Fn::GetAtt": [ - "myuserpoolsmsRole0E16FDD9", - "Arn" - ] - } - }, - "SmsVerificationMessage": "integ-test: Account verification code is {####}", - "UserPoolName": "MyUserPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_LINK", - "EmailMessageByLink": "integ-test: Verify by clicking on {##Verify Email##}", - "EmailSubjectByLink": "integ-test: Verify your account", - "SmsMessage": "integ-test: Account verification code is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myuserpoolmyuserpooldomainEE1E11AF": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "integ-user-pool-signup-link", - "UserPoolId": { - "Ref": "myuserpool01998219" - } - } - }, - "myuserpoolclient8A58A3E4": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "myuserpool01998219" - }, - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ClientName": "signup-test", - "GenerateSecret": false, - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - } - }, - "Outputs": { - "userpoolid": { - "Value": { - "Ref": "myuserpool01998219" - } - }, - "clientid": { - "Value": { - "Ref": "myuserpoolclient8A58A3E4" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool.expected.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool.expected.json deleted file mode 100644 index a3a50d2f5287b..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool.expected.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "Resources": { - "myuserpool01998219": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserPoolName": "MyUserPool", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "userpoolid": { - "Value": { - "Ref": "myuserpool01998219" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-config/test/integ.rule.lit.expected.json b/packages/@aws-cdk/aws-config/test/integ.rule.lit.expected.json deleted file mode 100644 index bf5a4d7d5b949..0000000000000 --- a/packages/@aws-cdk/aws-config/test/integ.rule.lit.expected.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "Resources": { - "CustomFunctionServiceRoleD3F73B79": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSConfigRulesExecutionRole" - ] - ] - } - ] - } - }, - "CustomFunctionBADD59E7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(event);" - }, - "Role": { - "Fn::GetAtt": [ - "CustomFunctionServiceRoleD3F73B79", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "CustomFunctionServiceRoleD3F73B79" - ] - }, - "CustomFunctionPermission41887A5E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "CustomFunctionBADD59E7", - "Arn" - ] - }, - "Principal": "config.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - } - } - }, - "Custom8166710A": { - "Type": "AWS::Config::ConfigRule", - "Properties": { - "Source": { - "Owner": "CUSTOM_LAMBDA", - "SourceDetails": [ - { - "EventSource": "aws.config", - "MessageType": "ConfigurationItemChangeNotification" - }, - { - "EventSource": "aws.config", - "MessageType": "OversizedConfigurationItemChangeNotification" - } - ], - "SourceIdentifier": { - "Fn::GetAtt": [ - "CustomFunctionBADD59E7", - "Arn" - ] - } - }, - "Scope": { - "ComplianceResourceTypes": [ - "AWS::EC2::Instance" - ] - } - }, - "DependsOn": [ - "CustomFunctionPermission41887A5E", - "CustomFunctionBADD59E7", - "CustomFunctionServiceRoleD3F73B79" - ] - }, - "Drift34D3210F": { - "Type": "AWS::Config::ConfigRule", - "Properties": { - "Source": { - "Owner": "AWS", - "SourceIdentifier": "CLOUDFORMATION_STACK_DRIFT_DETECTION_CHECK" - }, - "InputParameters": { - "cloudformationRoleArn": { - "Fn::GetAtt": [ - "DriftRole8A5FB833", - "Arn" - ] - } - }, - "Scope": { - "ComplianceResourceTypes": [ - "AWS::CloudFormation::Stack" - ] - } - } - }, - "DriftRole8A5FB833": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "config.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/ReadOnlyAccess" - ] - ] - } - ] - } - }, - "DriftComplianceChange4C0F2B82": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.config" - ], - "detail": { - "configRuleName": [ - { - "Ref": "Drift34D3210F" - } - ] - }, - "detail-type": [ - "Config Rules Compliance Change" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "ComplianceTopic0229448B" - }, - "Id": "Target0" - } - ] - } - }, - "ComplianceTopic0229448B": { - "Type": "AWS::SNS::Topic" - }, - "ComplianceTopicPolicyF8BC46F0": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Ref": "ComplianceTopic0229448B" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "ComplianceTopic0229448B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-config/test/integ.scoped-rule.expected.json b/packages/@aws-cdk/aws-config/test/integ.scoped-rule.expected.json deleted file mode 100644 index 7ca9e9ecf4f61..0000000000000 --- a/packages/@aws-cdk/aws-config/test/integ.scoped-rule.expected.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "Resources": { - "CustomFunctionServiceRoleD3F73B79": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSConfigRulesExecutionRole" - ] - ] - } - ] - } - }, - "CustomFunctionBADD59E7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(event);" - }, - "Role": { - "Fn::GetAtt": [ - "CustomFunctionServiceRoleD3F73B79", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "CustomFunctionServiceRoleD3F73B79" - ] - }, - "CustomFunctionPermission41887A5E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "CustomFunctionBADD59E7", - "Arn" - ] - }, - "Principal": "config.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - } - } - }, - "Custom8166710A": { - "Type": "AWS::Config::ConfigRule", - "Properties": { - "Source": { - "Owner": "CUSTOM_LAMBDA", - "SourceDetails": [ - { - "EventSource": "aws.config", - "MessageType": "ScheduledNotification" - } - ], - "SourceIdentifier": { - "Fn::GetAtt": [ - "CustomFunctionBADD59E7", - "Arn" - ] - } - }, - "Scope": { - "ComplianceResourceTypes": [ - "AWS::EC2::Instance" - ] - } - }, - "DependsOn": [ - "CustomFunctionPermission41887A5E", - "CustomFunctionBADD59E7", - "CustomFunctionServiceRoleD3F73B79" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.expected.json b/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.expected.json deleted file mode 100644 index 7cce62d49d375..0000000000000 --- a/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.expected.json +++ /dev/null @@ -1,833 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-cluster-rotation/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "DatabaseSubnets56F17B9A": { - "Type": "AWS::DocDB::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "DocumentDB security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSecurityGroupfromawscdkdocdbclusterrotationDatabaseRotationSingleUserSecurityGroupBF39D224IndirectPortE14845D7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkdocdbclusterrotationDatabaseRotationSingleUserSecurityGroupBF39D224:{IndirectPort}", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUserSecurityGroupAC6E0E73", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - } - } - }, - "DatabaseSecret3B817195": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": "\"@/", - "GenerateStringKey": "password", - "PasswordLength": 41, - "SecretStringTemplate": "{\"username\":\"docdb\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSecretAttachmentE5D1B020": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "DatabaseSecret3B817195" - }, - "TargetId": { - "Ref": "DatabaseB269D8BB" - }, - "TargetType": "AWS::DocDB::DBCluster" - } - }, - "DatabaseSecretAttachmentRotationScheduleA4E9F034": { - "Type": "AWS::SecretsManager::RotationSchedule", - "Properties": { - "SecretId": { - "Ref": "DatabaseSecretAttachmentE5D1B020" - }, - "RotationLambdaARN": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUser65F55654", - "Outputs.RotationLambdaARN" - ] - }, - "RotationRules": { - "AutomaticallyAfterDays": 30 - } - } - }, - "DatabaseSecretAttachmentPolicy5ACFE6CA": { - "Type": "AWS::SecretsManager::ResourcePolicy", - "Properties": { - "ResourcePolicy": { - "Statement": [ - { - "Action": "secretsmanager:DeleteSecret", - "Effect": "Deny", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "SecretId": { - "Ref": "DatabaseSecretAttachmentE5D1B020" - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::DocDB::DBCluster", - "Properties": { - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:password::}}" - ] - ] - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::DocDB::DBInstance", - "Properties": { - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBInstanceClass": "db.r5.large" - }, - "DependsOn": [ - "VPCPrivateSubnet1DefaultRouteAE1D6490", - "VPCPrivateSubnet2DefaultRouteF4F5CFD2", - "VPCPrivateSubnet3DefaultRoute27F311AE" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseRotationSingleUserSecurityGroupAC6E0E73": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-docdb-cluster-rotation/Database/RotationSingleUser/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseRotationSingleUser65F55654": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": { - "Fn::FindInMap": [ - "DatabaseRotationSingleUserSARMapping9AEB3E55", - { - "Ref": "AWS::Partition" - }, - "applicationId" - ] - }, - "SemanticVersion": { - "Fn::FindInMap": [ - "DatabaseRotationSingleUserSARMapping9AEB3E55", - { - "Ref": "AWS::Partition" - }, - "semanticVersion" - ] - } - }, - "Parameters": { - "endpoint": { - "Fn::Join": [ - "", - [ - "https://secretsmanager.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - }, - "functionName": "awscdkdocdbclusterrotationDatabaseRotationSingleUser7DAE65BE", - "excludeCharacters": "\"@/", - "vpcSubnetIds": { - "Fn::Join": [ - "", - [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - ",", - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - ",", - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - ] - }, - "vpcSecurityGroupIds": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUserSecurityGroupAC6E0E73", - "GroupId" - ] - } - } - } - } - }, - "Mappings": { - "DatabaseRotationSingleUserSARMapping9AEB3E55": { - "aws": { - "applicationId": "arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerMongoDBRotationSingleUser", - "semanticVersion": "1.1.225" - }, - "aws-cn": { - "applicationId": "arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerMongoDBRotationSingleUser", - "semanticVersion": "1.1.37" - }, - "aws-us-gov": { - "applicationId": "arn:aws-us-gov:serverlessrepo:us-gov-west-1:023102451235:applications/SecretsManagerMongoDBRotationSingleUser", - "semanticVersion": "1.1.93" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-docdb/test/integ.cluster.expected.json b/packages/@aws-cdk/aws-docdb/test/integ.cluster.expected.json deleted file mode 100644 index f6a4f710d71a1..0000000000000 --- a/packages/@aws-cdk/aws-docdb/test/integ.cluster.expected.json +++ /dev/null @@ -1,510 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-docdb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-docdb-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-docdb-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-docdb-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-docdb-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ParamsA8366201": { - "Type": "AWS::DocDB::DBClusterParameterGroup", - "Properties": { - "Description": "A nice parameter group", - "Family": "docdb3.6", - "Parameters": { - "audit_logs": "disabled", - "tls": "enabled", - "ttl_monitor": "enabled" - } - } - }, - "DbSecurity381C2C15": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSubnets56F17B9A": { - "Type": "AWS::DocDB::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "DocumentDB security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSecurityGroupfrom00000IndirectPortF24F2E03": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "Open to the world", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::DocDB::DBCluster", - "Properties": { - "DBClusterParameterGroupName": { - "Ref": "ParamsA8366201" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "EngineVersion": "3.6.0", - "KmsKeyId": { - "Fn::GetAtt": [ - "DbSecurity381C2C15", - "Arn" - ] - }, - "MasterUsername": "docdb", - "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::DocDB::DBInstance", - "Properties": { - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBInstanceClass": "db.r5.large" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb-global/test/integ.dynamodb.global.expected.json b/packages/@aws-cdk/aws-dynamodb-global/test/integ.dynamodb.global.expected.json deleted file mode 100644 index 092eaa51cc403..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb-global/test/integ.dynamodb.global.expected.json +++ /dev/null @@ -1,252 +0,0 @@ -[ - { - "Resources": { - "globdynamodbintegGlobalTableuseast162596384": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "StreamSpecification": { - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "TableName": "integrationtest" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } - }, - { - "Resources": { - "globdynamodbintegGlobalTableuseast2EF897C2E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "StreamSpecification": { - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "TableName": "integrationtest" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } - }, - { - "Resources": { - "globdynamodbintegGlobalTableuswest27374C2EA": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "StreamSpecification": { - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "TableName": "integrationtest" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } - }, - { - "Resources": { - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleD9686810": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleDefaultPolicy6E7EDDB6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "application-autoscaling:DeleteScalingPolicy", - "application-autoscaling:DeregisterScalableTarget", - "dynamodb:CreateGlobalTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeGlobalTable", - "dynamodb:DescribeLimits", - "dynamodb:UpdateGlobalTable", - "iam:CreateServiceLinkedRole" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleDefaultPolicy6E7EDDB6", - "Roles": [ - { - "Ref": "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleD9686810" - } - ] - } - }, - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC1233FDC96A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aS3Bucket66843878" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aS3VersionKey14680708" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aS3VersionKey14680708" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleD9686810", - "Arn" - ] - }, - "Description": "Lambda to make DynamoDB a global table", - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 300 - }, - "DependsOn": [ - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleDefaultPolicy6E7EDDB6", - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC12ServiceRoleD9686810" - ] - }, - "CfnCustomResource": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SingletonLambdaD38B65A66B544FB69BAD9CD40A6DAC1233FDC96A", - "Arn" - ] - }, - "Regions": [ - "us-east-1", - "us-east-2", - "us-west-2" - ], - "ResourceType": "Custom::DynamoGlobalTableCoordinator", - "TableName": "integrationtest" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aS3Bucket66843878": { - "Type": "String", - "Description": "S3 bucket for asset \"94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3a\"" - }, - "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aS3VersionKey14680708": { - "Type": "String", - "Description": "S3 key for asset version \"94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3a\"" - }, - "AssetParameters94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3aArtifactHash5687D31D": { - "Type": "String", - "Description": "Artifact hash for asset \"94575de3fd18404e41e94a6c1d4b7a1eec2985fd23d2c11999d095e09667ba3a\"" - } - } - }, - {} -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.autoscaling.lit.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.autoscaling.lit.expected.json deleted file mode 100644 index 9ec4e99b49973..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.autoscaling.lit.expected.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableReadScalingTargetF96E9F76": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 50, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable" - ] - ] - }, - "ScalableDimension": "dynamodb:table:ReadCapacityUnits", - "ServiceNamespace": "dynamodb", - "ScheduledActions": [ - { - "ScalableTargetAction": { - "MinCapacity": 20 - }, - "Schedule": "cron(0 8 * * ? *)", - "ScheduledActionName": "ScaleUpInTheMorning" - }, - { - "ScalableTargetAction": { - "MaxCapacity": 20 - }, - "Schedule": "cron(0 20 * * ? *)", - "ScheduledActionName": "ScaleDownAtNight" - } - ] - } - }, - "TableReadScalingTargetTracking67DF0596": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awscdkdynamodbTableReadScalingTargetTrackingC9729D9C", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "TableReadScalingTargetF96E9F76" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "DynamoDBReadCapacityUtilization" - }, - "TargetValue": 50 - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.expected.json deleted file mode 100644 index 1e923947b0287..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.expected.json +++ /dev/null @@ -1,438 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithGlobalAndLocalSecondaryIndexBC540710": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiSortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-PartitionAndSortKeyWithReadAndWriteCapacity", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 10, - "WriteCapacityUnits": 10 - } - }, - { - "IndexName": "GSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J" - ], - "ProjectionType": "INCLUDE" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-InverseTableKeySchema", - "KeySchema": [ - { - "AttributeName": "sortKey", - "KeyType": "HASH" - }, - { - "AttributeName": "hashKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - } - ], - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndTableSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - } - }, - { - "IndexName": "LSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T" - ], - "ProjectionType": "INCLUDE" - } - } - ], - "PointInTimeRecoverySpecification": { - "PointInTimeRecoveryEnabled": true - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "SSESpecification": { - "SSEEnabled": true - }, - "StreamSpecification": { - "StreamViewType": "KEYS_ONLY" - }, - "Tags": [ - { - "Key": "Environment", - "Value": "Production" - } - ], - "TimeToLiveSpecification": { - "AttributeName": "timeToLive", - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithGlobalSecondaryIndexCC8E841E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - } - ], - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithLocalSecondaryIndex4DA3D08F": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "UserDefaultPolicy1F97781E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:Scan" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TableWithGlobalAndLocalSecondaryIndexBC540710", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableWithGlobalAndLocalSecondaryIndexBC540710", - "Arn" - ] - }, - "/index/*" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserDefaultPolicy1F97781E", - "Users": [ - { - "Ref": "User00B015A1" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json deleted file mode 100644 index 8f3ade0dc63d5..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "Resources": { - "Stream790BDEE4": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "ShardCount": 1, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - }, - "RetentionPeriodHours": 24, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - } - } - }, - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "KinesisStreamSpecification": { - "StreamArn": { - "Fn::GetAtt": [ - "Stream790BDEE4", - "Arn" - ] - } - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.mixed-key-gsi.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.mixed-key-gsi.expected.json deleted file mode 100644 index ce5538286f9e5..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.mixed-key-gsi.expected.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "pkey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "pkey", - "AttributeType": "N" - }, - { - "AttributeName": "foo", - "AttributeType": "S" - }, - { - "AttributeName": "baz", - "AttributeType": "S" - }, - { - "AttributeName": "bar", - "AttributeType": "S" - } - ], - "GlobalSecondaryIndexes": [ - { - "IndexName": "IndexA", - "KeySchema": [ - { - "AttributeName": "foo", - "KeyType": "HASH" - } - ], - "Projection": { - "NonKeyAttributes": [ - "bar" - ], - "ProjectionType": "INCLUDE" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "IndexB", - "KeySchema": [ - { - "AttributeName": "baz", - "KeyType": "HASH" - }, - { - "AttributeName": "bar", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "blah" - ], - "ProjectionType": "INCLUDE" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.expected.json deleted file mode 100644 index 00c9d7f7dfd88..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.expected.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithGlobalAndLocalSecondaryIndexBC540710": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiSortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "BillingMode": "PAY_PER_REQUEST", - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "GSI-PartitionAndSortKeyWithReadAndWriteCapacity", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "GSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - } - }, - { - "IndexName": "GSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J" - ], - "ProjectionType": "INCLUDE" - } - }, - { - "IndexName": "GSI-InverseTableKeySchema", - "KeySchema": [ - { - "AttributeName": "sortKey", - "KeyType": "HASH" - }, - { - "AttributeName": "hashKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ], - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndTableSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - } - }, - { - "IndexName": "LSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T" - ], - "ProjectionType": "INCLUDE" - } - } - ], - "PointInTimeRecoverySpecification": { - "PointInTimeRecoveryEnabled": true - }, - "SSESpecification": { - "SSEEnabled": true - }, - "StreamSpecification": { - "StreamViewType": "KEYS_ONLY" - }, - "Tags": [ - { - "Key": "Environment", - "Value": "Production" - } - ], - "TimeToLiveSpecification": { - "AttributeName": "timeToLive", - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithGlobalSecondaryIndexCC8E841E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST", - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithLocalSecondaryIndex4DA3D08F": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "BillingMode": "PAY_PER_REQUEST", - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.expected.json deleted file mode 100644 index 01279e64a2b1c..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.expected.json +++ /dev/null @@ -1,561 +0,0 @@ -{ - "Resources": { - "TableKey25666F95": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "Description": "Customer-managed key auto-created for encrypting DynamoDB table at aws-cdk-dynamodb/Table", - "EnableKeyRotation": true - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "SSESpecification": { - "KMSMasterKeyId": { - "Fn::GetAtt": [ - "TableKey25666F95", - "Arn" - ] - }, - "SSEEnabled": true, - "SSEType": "KMS" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithGlobalAndLocalSecondaryIndexBC540710": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiSortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-PartitionAndSortKeyWithReadAndWriteCapacity", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 10, - "WriteCapacityUnits": 10 - } - }, - { - "IndexName": "GSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "gsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J" - ], - "ProjectionType": "INCLUDE" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - }, - { - "IndexName": "GSI-InverseTableKeySchema", - "KeySchema": [ - { - "AttributeName": "sortKey", - "KeyType": "HASH" - }, - { - "AttributeName": "hashKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - } - ], - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndTableSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - }, - { - "IndexName": "LSI-ProjectionTypeKeysOnly", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "KEYS_ONLY" - } - }, - { - "IndexName": "LSI-ProjectionTypeInclude", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "NonKeyAttributes": [ - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T" - ], - "ProjectionType": "INCLUDE" - } - } - ], - "PointInTimeRecoverySpecification": { - "PointInTimeRecoveryEnabled": true - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "SSESpecification": { - "SSEEnabled": true - }, - "StreamSpecification": { - "StreamViewType": "KEYS_ONLY" - }, - "Tags": [ - { - "Key": "Environment", - "Value": "Production" - } - ], - "TimeToLiveSpecification": { - "AttributeName": "timeToLive", - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "EnableKeyRotation": true - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TableWithGlobalSecondaryIndexCC8E841E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "gsiHashKey", - "AttributeType": "S" - } - ], - "GlobalSecondaryIndexes": [ - { - "IndexName": "GSI-PartitionKeyOnly", - "KeySchema": [ - { - "AttributeName": "gsiHashKey", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - } - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "SSESpecification": { - "KMSMasterKeyId": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - }, - "SSEEnabled": true, - "SSEType": "KMS" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableWithLocalSecondaryIndex4DA3D08F": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "sortKey", - "KeyType": "RANGE" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - }, - { - "AttributeName": "sortKey", - "AttributeType": "N" - }, - { - "AttributeName": "lsiSortKey", - "AttributeType": "N" - } - ], - "LocalSecondaryIndexes": [ - { - "IndexName": "LSI-PartitionAndSortKey", - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - }, - { - "AttributeName": "lsiSortKey", - "KeyType": "RANGE" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "SSESpecification": { - "SSEEnabled": false - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "sqs.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RoleDefaultPolicy5FFB7DAB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:Scan" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TableWithGlobalAndLocalSecondaryIndexBC540710", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableWithGlobalAndLocalSecondaryIndexBC540710", - "Arn" - ] - }, - "/index/*" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TableKey25666F95", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RoleDefaultPolicy5FFB7DAB", - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.global-replicas-provisioned.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.global-replicas-provisioned.expected.json deleted file mode 100644 index 7ac67ff4f0a2c..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.global-replicas-provisioned.expected.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "hashKey", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "hashKey", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "StreamSpecification": { - "StreamViewType": "NEW_AND_OLD_IMAGES" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRoleD9856B771F8F2CCB": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:*", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-west-3:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:us-east-2:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "DynamoDB replication managed policy for table ", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "Path": "/", - "Roles": [ - { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole348A0C9ARef" - ] - } - ] - } - }, - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRoleBE2B1C1A5DC546D2": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:DescribeTable", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "DynamoDB replication managed policy for table ", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "Path": "/", - "Roles": [ - { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole750F1EE9Ref" - ] - } - ] - } - }, - "TableReplicauseast28A15C236": { - "Type": "Custom::DynamoDBReplica", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderframeworkonEventACC2C387Arn" - ] - }, - "TableName": { - "Ref": "TableCD117FA1" - }, - "Region": "us-east-2" - }, - "DependsOn": [ - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRoleBE2B1C1A5DC546D2", - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRoleD9856B771F8F2CCB", - "TableWriteScalingTargetE5669214", - "TableWriteScalingTargetTrackingD78DCCD8" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete", - "Condition": "TableStackRegionNotEqualsuseast2D20A1E77" - }, - "TableReplicaeuwest314C3E552": { - "Type": "Custom::DynamoDBReplica", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderframeworkonEventACC2C387Arn" - ] - }, - "TableName": { - "Ref": "TableCD117FA1" - }, - "Region": "eu-west-3" - }, - "DependsOn": [ - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRoleBE2B1C1A5DC546D2", - "TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRoleD9856B771F8F2CCB", - "TableWriteScalingTargetE5669214", - "TableWriteScalingTargetTrackingD78DCCD8" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete", - "Metadata": { - "DynamoDbReplicationDependency": { - "Fn::If": [ - "TableStackRegionNotEqualsuseast2D20A1E77", - { - "Ref": "TableReplicauseast28A15C236" - }, - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "Condition": "TableStackRegionNotEqualseuwest302B3591C" - }, - "TableWriteScalingTargetE5669214": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 10, - "MinCapacity": 5, - "ResourceId": { - "Fn::Join": [ - "", - [ - "table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable" - ] - ] - }, - "ScalableDimension": "dynamodb:table:WriteCapacityUnits", - "ServiceNamespace": "dynamodb" - } - }, - "TableWriteScalingTargetTrackingD78DCCD8": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awscdkdynamodbglobalreplicasprovisionedTableWriteScalingTargetTrackingD631E2EC", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "TableWriteScalingTargetE5669214" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "DynamoDBWriteCapacityUtilization" - }, - "TargetValue": 75 - } - } - }, - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1S3Bucket63728AAD" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1S3VersionKey40482FB9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1S3VersionKey40482FB9" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkdynamodbglobalreplicasprovisionedAssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3Bucket5157987FRef": { - "Ref": "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3Bucket1685F95F" - }, - "referencetoawscdkdynamodbglobalreplicasprovisionedAssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey001ABDFDRef": { - "Ref": "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey11815B6C" - }, - "referencetoawscdkdynamodbglobalreplicasprovisionedAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket162B76E0Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkdynamodbglobalreplicasprovisionedAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyF86DF1C2Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Conditions": { - "TableStackRegionNotEqualsuseast2D20A1E77": { - "Fn::Not": [ - { - "Fn::Equals": [ - "us-east-2", - { - "Ref": "AWS::Region" - } - ] - } - ] - }, - "TableStackRegionNotEqualseuwest302B3591C": { - "Fn::Not": [ - { - "Fn::Equals": [ - "eu-west-3", - { - "Ref": "AWS::Region" - } - ] - } - ] - } - }, - "Parameters": { - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3Bucket1685F95F": { - "Type": "String", - "Description": "S3 bucket for asset \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey11815B6C": { - "Type": "String", - "Description": "S3 key for asset version \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fArtifactHash259515A1": { - "Type": "String", - "Description": "Artifact hash for asset \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1S3Bucket63728AAD": { - "Type": "String", - "Description": "S3 bucket for asset \"35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1\"" - }, - "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1S3VersionKey40482FB9": { - "Type": "String", - "Description": "S3 key for asset version \"35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1\"" - }, - "AssetParameters35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1ArtifactHash40AE3BC3": { - "Type": "String", - "Description": "Artifact hash for asset \"35892afbe8ff840a389ee91c3cce6d47b648fe4046b59d612100737b1486a4c1\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.global.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.global.expected.json deleted file mode 100644 index 0200e430246e0..0000000000000 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.global.expected.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "Resources": { - "TableCD117FA1": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - }, - { - "AttributeName": "key", - "AttributeType": "S" - } - ], - "BillingMode": "PAY_PER_REQUEST", - "GlobalSecondaryIndexes": [ - { - "IndexName": "my-index", - "KeySchema": [ - { - "AttributeName": "key", - "KeyType": "HASH" - } - ], - "Projection": { - "ProjectionType": "ALL" - } - } - ], - "StreamSpecification": { - "StreamViewType": "NEW_AND_OLD_IMAGES" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole6F43DF4A23250B4C": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:*", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-central-1:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-west-2:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - "/index/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "DynamoDB replication managed policy for table ", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "Path": "/", - "Roles": [ - { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole3E8625F3Ref" - ] - } - ] - } - }, - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole3971612857304880": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:DescribeTable", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableCD117FA1", - "Arn" - ] - }, - "/index/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "Description": { - "Fn::Join": [ - "", - [ - "DynamoDB replication managed policy for table ", - { - "Ref": "TableCD117FA1" - } - ] - ] - }, - "Path": "/", - "Roles": [ - { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole2F936EC4Ref" - ] - } - ] - } - }, - "TableReplicaeuwest290D3CD3A": { - "Type": "Custom::DynamoDBReplica", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderframeworkonEventCFDD0BA0Arn" - ] - }, - "TableName": { - "Ref": "TableCD117FA1" - }, - "Region": "eu-west-2" - }, - "DependsOn": [ - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole3971612857304880", - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole6F43DF4A23250B4C" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableReplicaeucentral100A6A6E0": { - "Type": "Custom::DynamoDBReplica", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D", - "Outputs.cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderframeworkonEventCFDD0BA0Arn" - ] - }, - "TableName": { - "Ref": "TableCD117FA1" - }, - "Region": "eu-central-1" - }, - "DependsOn": [ - "TableReplicaeuwest290D3CD3A", - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole3971612857304880", - "TableSourceTableAttachedManagedPolicycdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole6F43DF4A23250B4C" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.eu-west-1.", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eS3Bucket30A96578" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eS3VersionKeyD7726444" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eS3VersionKeyD7726444" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetocdkdynamodbglobal20191121AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3BucketAE26619BRef": { - "Ref": "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3Bucket1685F95F" - }, - "referencetocdkdynamodbglobal20191121AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey4B0E314FRef": { - "Ref": "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey11815B6C" - }, - "referencetocdkdynamodbglobal20191121AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketC23121D6Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetocdkdynamodbglobal20191121AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyDCD22417Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3Bucket1685F95F": { - "Type": "String", - "Description": "S3 bucket for asset \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fS3VersionKey11815B6C": { - "Type": "String", - "Description": "S3 key for asset version \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80fArtifactHash259515A1": { - "Type": "String", - "Description": "Artifact hash for asset \"5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eS3Bucket30A96578": { - "Type": "String", - "Description": "S3 bucket for asset \"380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9e\"" - }, - "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eS3VersionKeyD7726444": { - "Type": "String", - "Description": "S3 key for asset version \"380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9e\"" - }, - "AssetParameters380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9eArtifactHash232CC7FB": { - "Type": "String", - "Description": "Artifact hash for asset \"380d18478d8d888ec191e1db553dc09fc6f0b9a18f335f70b5a36bc745333e9e\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.bastion-host-arm-support.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.bastion-host-arm-support.expected.json deleted file mode 100644 index 7ad67dbd9e172..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.bastion-host-arm-support.expected.json +++ /dev/null @@ -1,659 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "BastionHostInstanceSecurityGroupE75D4274": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "TestStack/BastionHost/Resource/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "BastionHostInstanceRoleDD3FA5F1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ] - } - }, - "BastionHostInstanceRoleDefaultPolicy17347525": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2messages:*", - "ssm:UpdateInstanceInformation", - "ssmmessages:*" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BastionHostInstanceRoleDefaultPolicy17347525", - "Roles": [ - { - "Ref": "BastionHostInstanceRoleDD3FA5F1" - } - ] - } - }, - "BastionHostInstanceProfile770FCA07": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "BastionHostInstanceRoleDD3FA5F1" - } - ] - } - }, - "BastionHost30F9ED05": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "BastionHostInstanceProfile770FCA07" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t4g.nano", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "BastionHostInstanceSecurityGroupE75D4274", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "BastionHostInstanceRoleDefaultPolicy17347525", - "BastionHostInstanceRoleDD3FA5F1" - ] - } - }, - "Outputs": { - "BastionHostBastionHostIdC743CBD6": { - "Description": "Instance ID of the bastion host. Use this to connect via SSM Session Manager", - "Value": { - "Ref": "BastionHost30F9ED05" - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.bastion-host.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.bastion-host.expected.json deleted file mode 100644 index bbea0d3ffacd3..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.bastion-host.expected.json +++ /dev/null @@ -1,659 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "BastionHostInstanceSecurityGroupE75D4274": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "TestStack/BastionHost/Resource/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "BastionHostInstanceRoleDD3FA5F1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ] - } - }, - "BastionHostInstanceRoleDefaultPolicy17347525": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2messages:*", - "ssm:UpdateInstanceInformation", - "ssmmessages:*" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BastionHostInstanceRoleDefaultPolicy17347525", - "Roles": [ - { - "Ref": "BastionHostInstanceRoleDD3FA5F1" - } - ] - } - }, - "BastionHostInstanceProfile770FCA07": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "BastionHostInstanceRoleDD3FA5F1" - } - ] - } - }, - "BastionHost30F9ED05": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "BastionHostInstanceProfile770FCA07" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.nano", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "BastionHostInstanceSecurityGroupE75D4274", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "BastionHost" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "BastionHostInstanceRoleDefaultPolicy17347525", - "BastionHostInstanceRoleDD3FA5F1" - ] - } - }, - "Outputs": { - "BastionHostBastionHostIdC743CBD6": { - "Description": "Instance ID of the bastion host. Use this to connect via SSM Session Manager", - "Value": { - "Ref": "BastionHost30F9ED05" - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.client-vpn-endpoint.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.client-vpn-endpoint.expected.json deleted file mode 100644 index 75e40ab98259b..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.client-vpn-endpoint.expected.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "Resources": { - "ImportCertificatesCreateCertificates71085A81": { - "Type": "Custom::ACMImportCertificates", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomACMImportCertificatesCustomResourceProviderHandler2EB12457", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ImportCertificatesDeleteCertificates6462F0A6": { - "Type": "Custom::ACMImportCertificates", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomACMImportCertificatesCustomResourceProviderHandler2EB12457", - "Arn" - ] - }, - "ServerCertificateArn": { - "Fn::GetAtt": [ - "ImportCertificatesCreateCertificates71085A81", - "ClientCertificateArn" - ] - }, - "ClientCertificateArn": { - "Fn::GetAtt": [ - "ImportCertificatesCreateCertificates71085A81", - "ServerCertificateArn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomACMImportCertificatesCustomResourceProviderRole2CE46D14": { - "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": [ - "acm:ImportCertificate", - "acm:DeleteCertificate" - ], - "Resource": "*" - } - ] - } - } - ] - } - }, - "CustomACMImportCertificatesCustomResourceProviderHandler2EB12457": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fS3Bucket42BD8ED5" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fS3VersionKeyA7C3DEE3" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fS3VersionKeyA7C3DEE3" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomACMImportCertificatesCustomResourceProviderRole2CE46D14", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomACMImportCertificatesCustomResourceProviderRole2CE46D14" - ] - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/PublicSubnet1" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/PublicSubnet1" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6", - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/PublicSubnet2" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/PublicSubnet2" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6", - "VpcVPCGWBF912B6E" - ] - }, - "VpcIsolatedSubnet1SubnetE48C5737": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/IsolatedSubnet1" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIsolatedSubnet1RouteTable4771E3E5": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/IsolatedSubnet1" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIsolatedSubnet1RouteTableAssociationD300FCBB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcIsolatedSubnet1RouteTable4771E3E5" - }, - "SubnetId": { - "Ref": "VpcIsolatedSubnet1SubnetE48C5737" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIsolatedSubnet2Subnet16364B91": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/IsolatedSubnet2" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIsolatedSubnet2RouteTable1D30AF7D": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc/IsolatedSubnet2" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIsolatedSubnet2RouteTableAssociationF7B18CCA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcIsolatedSubnet2RouteTable1D30AF7D" - }, - "SubnetId": { - "Ref": "VpcIsolatedSubnet2Subnet16364B91" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc" - } - ] - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcEndpointSecurityGroup7B25EFDC": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "cdk-ec2-client-vpn-endpoint/Vpc/Endpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "cdk-ec2-client-vpn-endpoint/Vpc" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcEndpoint6FF034F6": { - "Type": "AWS::EC2::ClientVpnEndpoint", - "Properties": { - "AuthenticationOptions": [ - { - "MutualAuthentication": { - "ClientRootCertificateChainArn": { - "Fn::GetAtt": [ - "ImportCertificatesCreateCertificates71085A81", - "ServerCertificateArn" - ] - } - }, - "Type": "certificate-authentication" - } - ], - "ClientCidrBlock": "10.100.0.0/16", - "ConnectionLogOptions": { - "CloudwatchLogGroup": { - "Ref": "LogGroupF5B46931" - }, - "Enabled": true - }, - "ServerCertificateArn": { - "Fn::GetAtt": [ - "ImportCertificatesCreateCertificates71085A81", - "ClientCertificateArn" - ] - }, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "VpcEndpointSecurityGroup7B25EFDC", - "GroupId" - ] - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcEndpointAssociation06B066321": { - "Type": "AWS::EC2::ClientVpnTargetNetworkAssociation", - "Properties": { - "ClientVpnEndpointId": { - "Ref": "VpcEndpoint6FF034F6" - }, - "SubnetId": { - "Ref": "VpcIsolatedSubnet1SubnetE48C5737" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcEndpointAssociation12B51A67F": { - "Type": "AWS::EC2::ClientVpnTargetNetworkAssociation", - "Properties": { - "ClientVpnEndpointId": { - "Ref": "VpcEndpoint6FF034F6" - }, - "SubnetId": { - "Ref": "VpcIsolatedSubnet2Subnet16364B91" - } - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "VpcEndpointAuthorizeAll70F0E613": { - "Type": "AWS::EC2::ClientVpnAuthorizationRule", - "Properties": { - "ClientVpnEndpointId": { - "Ref": "VpcEndpoint6FF034F6" - }, - "TargetNetworkCidr": { - "Fn::GetAtt": [ - "Vpc8378EB38", - "CidrBlock" - ] - }, - "AuthorizeAllGroups": true - }, - "DependsOn": [ - "ImportCertificatesCreateCertificates71085A81", - "ImportCertificatesDeleteCertificates6462F0A6" - ] - }, - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fS3Bucket42BD8ED5": { - "Type": "String", - "Description": "S3 bucket for asset \"c0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5f\"" - }, - "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fS3VersionKeyA7C3DEE3": { - "Type": "String", - "Description": "S3 key for asset version \"c0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5f\"" - }, - "AssetParametersc0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5fArtifactHash18BB2B9F": { - "Type": "String", - "Description": "Artifact hash for asset \"c0eca79e4277becf35cc23c67499f47e70fd50078e025e595c51ed97b9699c5f\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.import-default-vpc.lit.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.import-default-vpc.lit.expected.json deleted file mode 100644 index 871629a7cb87f..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.import-default-vpc.lit.expected.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Resources": { - "SecurityGroupDD263621": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-ec2-import/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": "vpc-60900905" - } - } - }, - "Outputs": { - "PublicSubnets": { - "Value": "ids:subnet-e19455ca,subnet-e0c24797,subnet-ccd77395" - }, - "PrivateSubnets": { - "Value": "ids:" - }, - "PublicRouteTables": { - "Value": "ids: rtb-e19455ca, rtb-e0c24797, rtb-ccd77395" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json deleted file mode 100644 index 576efc96d2057..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.instance-init.expected.json +++ /dev/null @@ -1,846 +0,0 @@ -{ - "Resources": { - "IntegInitVpc0D4FCCB3": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc" - } - ] - } - }, - "IntegInitVpcPublicSubnet1Subnet41A6F6D4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet1" - } - ] - } - }, - "IntegInitVpcPublicSubnet1RouteTable837CD5FB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet1" - } - ] - } - }, - "IntegInitVpcPublicSubnet1RouteTableAssociation00D33741": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet1RouteTable837CD5FB" - }, - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet1Subnet41A6F6D4" - } - } - }, - "IntegInitVpcPublicSubnet1DefaultRoute5BB90E8C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet1RouteTable837CD5FB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "IntegInitVpcIGWF019AC85" - } - }, - "DependsOn": [ - "IntegInitVpcVPCGW85EDC292" - ] - }, - "IntegInitVpcPublicSubnet1EIP46FCC3D6": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet1" - } - ] - } - }, - "IntegInitVpcPublicSubnet1NATGateway46F32F7F": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet1Subnet41A6F6D4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "IntegInitVpcPublicSubnet1EIP46FCC3D6", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet1" - } - ] - } - }, - "IntegInitVpcPublicSubnet2Subnet9A384F16": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet2" - } - ] - } - }, - "IntegInitVpcPublicSubnet2RouteTableF7E8F920": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet2" - } - ] - } - }, - "IntegInitVpcPublicSubnet2RouteTableAssociationB816F9F3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet2RouteTableF7E8F920" - }, - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet2Subnet9A384F16" - } - } - }, - "IntegInitVpcPublicSubnet2DefaultRoute2393995F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet2RouteTableF7E8F920" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "IntegInitVpcIGWF019AC85" - } - }, - "DependsOn": [ - "IntegInitVpcVPCGW85EDC292" - ] - }, - "IntegInitVpcPublicSubnet2EIP553B40DC": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet2" - } - ] - } - }, - "IntegInitVpcPublicSubnet2NATGateway9CCB4A9C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet2Subnet9A384F16" - }, - "AllocationId": { - "Fn::GetAtt": [ - "IntegInitVpcPublicSubnet2EIP553B40DC", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet2" - } - ] - } - }, - "IntegInitVpcPublicSubnet3Subnet30A34DA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet3" - } - ] - } - }, - "IntegInitVpcPublicSubnet3RouteTable53FB2E26": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet3" - } - ] - } - }, - "IntegInitVpcPublicSubnet3RouteTableAssociation73A6B648": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet3RouteTable53FB2E26" - }, - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet3Subnet30A34DA1" - } - } - }, - "IntegInitVpcPublicSubnet3DefaultRoute3781AD26": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPublicSubnet3RouteTable53FB2E26" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "IntegInitVpcIGWF019AC85" - } - }, - "DependsOn": [ - "IntegInitVpcVPCGW85EDC292" - ] - }, - "IntegInitVpcPublicSubnet3EIP59DDAB7B": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet3" - } - ] - } - }, - "IntegInitVpcPublicSubnet3NATGatewayA7A986C7": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet3Subnet30A34DA1" - }, - "AllocationId": { - "Fn::GetAtt": [ - "IntegInitVpcPublicSubnet3EIP59DDAB7B", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PublicSubnet3" - } - ] - } - }, - "IntegInitVpcPrivateSubnet1Subnet259B51C1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet1" - } - ] - } - }, - "IntegInitVpcPrivateSubnet1RouteTableCB37994B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet1" - } - ] - } - }, - "IntegInitVpcPrivateSubnet1RouteTableAssociation067DEF9D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet1RouteTableCB37994B" - }, - "SubnetId": { - "Ref": "IntegInitVpcPrivateSubnet1Subnet259B51C1" - } - } - }, - "IntegInitVpcPrivateSubnet1DefaultRoute654ACECF": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet1RouteTableCB37994B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "IntegInitVpcPublicSubnet1NATGateway46F32F7F" - } - } - }, - "IntegInitVpcPrivateSubnet2Subnet1643B059": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet2" - } - ] - } - }, - "IntegInitVpcPrivateSubnet2RouteTable030EC93B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet2" - } - ] - } - }, - "IntegInitVpcPrivateSubnet2RouteTableAssociation6B52BD72": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet2RouteTable030EC93B" - }, - "SubnetId": { - "Ref": "IntegInitVpcPrivateSubnet2Subnet1643B059" - } - } - }, - "IntegInitVpcPrivateSubnet2DefaultRoute6A10B6EA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet2RouteTable030EC93B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "IntegInitVpcPublicSubnet2NATGateway9CCB4A9C" - } - } - }, - "IntegInitVpcPrivateSubnet3Subnet2FEDC394": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet3" - } - ] - } - }, - "IntegInitVpcPrivateSubnet3RouteTable276D284C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc/PrivateSubnet3" - } - ] - } - }, - "IntegInitVpcPrivateSubnet3RouteTableAssociation2706BC76": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet3RouteTable276D284C" - }, - "SubnetId": { - "Ref": "IntegInitVpcPrivateSubnet3Subnet2FEDC394" - } - } - }, - "IntegInitVpcPrivateSubnet3DefaultRoute932A56DC": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "IntegInitVpcPrivateSubnet3RouteTable276D284C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "IntegInitVpcPublicSubnet3NATGatewayA7A986C7" - } - } - }, - "IntegInitVpcIGWF019AC85": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/IntegInitVpc" - } - ] - } - }, - "IntegInitVpcVPCGW85EDC292": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - }, - "InternetGatewayId": { - "Ref": "IntegInitVpcIGWF019AC85" - } - } - }, - "Instance2InstanceSecurityGroupC6129B1D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-init/Instance2/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/Instance2" - } - ], - "VpcId": { - "Ref": "IntegInitVpc0D4FCCB3" - } - } - }, - "Instance2InstanceRole03DD7CB2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/Instance2" - } - ] - } - }, - "Instance2InstanceRoleDefaultPolicy610B37CD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3Bucket597083AB" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3Bucket597083AB" - } - ] - ] - } - ] - }, - { - "Action": [ - "cloudformation:DescribeStackResource", - "cloudformation:SignalResource" - ], - "Effect": "Allow", - "Resource": { - "Ref": "AWS::StackId" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Instance2InstanceRoleDefaultPolicy610B37CD", - "Roles": [ - { - "Ref": "Instance2InstanceRole03DD7CB2" - } - ] - } - }, - "Instance2InstanceProfile582F915C": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Instance2InstanceRole03DD7CB2" - } - ] - } - }, - "Instance255F352651ad64873f230a4d2": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "Instance2InstanceProfile582F915C" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "Instance2InstanceSecurityGroupC6129B1D", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "IntegInitVpcPublicSubnet1Subnet41A6F6D4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-init/Instance2" - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\n# fingerprint: 8ef54c03058b2a11\n(\n set +e\n /opt/aws/bin/cfn-init -v --region ", - { - "Ref": "AWS::Region" - }, - " --stack ", - { - "Ref": "AWS::StackName" - }, - " --resource Instance255F352651ad64873f230a4d2 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", - { - "Ref": "AWS::Region" - }, - " --stack ", - { - "Ref": "AWS::StackName" - }, - " --resource Instance255F352651ad64873f230a4d2\n cat /var/log/cfn-init.log >&2\n)" - ] - ] - } - } - }, - "DependsOn": [ - "Instance2InstanceRoleDefaultPolicy610B37CD", - "Instance2InstanceRole03DD7CB2" - ], - "CreationPolicy": { - "ResourceSignal": { - "Count": 1, - "Timeout": "PT30M" - } - }, - "Metadata": { - "AWS::CloudFormation::Init": { - "configSets": { - "default": [ - "yumPreinstall", - "config" - ] - }, - "yumPreinstall": { - "packages": { - "yum": { - "git": [] - } - } - }, - "config": { - "groups": { - "group1": {}, - "group2": { - "gid": 42 - } - }, - "users": { - "sysuser1": { - "groups": [ - "group1", - "group2" - ], - "homeDir": "/home/sysuser1-custom" - }, - "sysuser2": {} - }, - "sources": { - "/tmp/sourceDir": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3Bucket597083AB" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3VersionKey89F61A12" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3VersionKey89F61A12" - } - ] - } - ] - } - ] - ] - } - }, - "files": { - "/tmp/file2": { - "content": { - "stackId": { - "Ref": "AWS::StackId" - }, - "stackName": "integ-init", - "region": { - "Ref": "AWS::Region" - } - }, - "mode": "000644", - "owner": "root", - "group": "root" - } - } - } - }, - "AWS::CloudFormation::Authentication": { - "S3AccessCreds": { - "type": "S3", - "roleName": { - "Ref": "Instance2InstanceRole03DD7CB2" - }, - "buckets": [ - { - "Ref": "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3Bucket597083AB" - } - ] - } - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - }, - "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3Bucket597083AB": { - "Type": "String", - "Description": "S3 bucket for asset \"f8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930b\"" - }, - "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bS3VersionKey89F61A12": { - "Type": "String", - "Description": "S3 key for asset version \"f8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930b\"" - }, - "AssetParametersf8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930bArtifactHash088925E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f8a1af398dac2fad92eeea4fb7620be1c4f504e23e3bfcd859fbb5744187930b\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.instance-multipart-userdata.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.instance-multipart-userdata.expected.json deleted file mode 100644 index b2ec45e8accf3..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.instance-multipart-userdata.expected.json +++ /dev/null @@ -1,694 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "InstanceInstanceSecurityGroupF0E2D5BE": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "TestStackMultipartUserData/Instance/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ICMP Type 8", - "FromPort": 8, - "IpProtocol": "icmp", - "ToPort": -1 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/Instance" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InstanceInstanceRoleE9785DE5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/Instance" - } - ] - } - }, - "InstanceInstanceRoleDefaultPolicy4ACE9290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2messages:GetMessages", - "ssm:*", - "ssmmessages:*" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "InstanceInstanceRoleDefaultPolicy4ACE9290", - "Roles": [ - { - "Ref": "InstanceInstanceRoleE9785DE5" - } - ] - } - }, - "InstanceInstanceProfileAB5AEF02": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "InstanceInstanceRoleE9785DE5" - } - ] - } - }, - "InstanceC1063A87": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "InstanceInstanceProfileAB5AEF02" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.nano", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "InstanceInstanceSecurityGroupF0E2D5BE", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStackMultipartUserData/Instance" - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "Content-Type: multipart/mixed; boundary=\"+AWS+CDK+User+Data+Separator==\"\nMIME-Version: 1.0\n\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/x-shellscript; charset=\"utf-8\"\nContent-Transfer-Encoding: base64\n\n", - { - "Fn::Base64": "#!/bin/bash\necho 大らと > /var/tmp/echo1\ncp /var/tmp/echo1 /var/tmp/echo1-copy" - }, - "\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/x-shellscript; charset=\"utf-8\"\nContent-Transfer-Encoding: base64\n\n", - { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho 大らと ", - { - "Ref": "VPCB9E5F0B4" - }, - " > /var/tmp/echo2" - ] - ] - } - }, - "\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/cloud-boothook\nContent-Transfer-Encoding: base64\n\n", - { - "Fn::Base64": "#!/bin/bash\necho \"Boothook2\" > /var/tmp/boothook\ncloud-init-per once docker_options echo 'OPTIONS=\"${OPTIONS} --storage-opt dm.basesize=20G\"' >> /etc/sysconfig/docker" - }, - "\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/x-shellscript\n\necho \"RawPart\" > /var/tmp/rawPart1\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/x-shellscript\n\necho \"RawPart ", - { - "Ref": "VPCB9E5F0B4" - }, - "\" > /var/tmp/rawPart2\n--+AWS+CDK+User+Data+Separator==\nContent-Type: text/x-shellscript\n\ncp $0 /var/tmp/upstart # Should be one line file no new line at the end and beginning\n--+AWS+CDK+User+Data+Separator==--\n" - ] - ] - } - } - }, - "DependsOn": [ - "InstanceInstanceRoleDefaultPolicy4ACE9290", - "InstanceInstanceRoleE9785DE5" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.instance.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.instance.expected.json deleted file mode 100644 index d30b3a47c711e..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.instance.expected.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "InstanceInstanceSecurityGroupF0E2D5BE": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "TestStack/Instance/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ICMP Type 8", - "FromPort": 8, - "IpProtocol": "icmp", - "ToPort": -1 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Instance" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InstanceInstanceRoleE9785DE5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Instance" - } - ] - } - }, - "InstanceInstanceRoleDefaultPolicy4ACE9290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ssm:*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "InstanceInstanceRoleDefaultPolicy4ACE9290", - "Roles": [ - { - "Ref": "InstanceInstanceRoleE9785DE5" - } - ] - } - }, - "InstanceInstanceProfileAB5AEF02": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "InstanceInstanceRoleE9785DE5" - } - ] - } - }, - "InstanceC1063A87": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "InstanceInstanceProfileAB5AEF02" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.nano", - "Monitoring": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "InstanceInstanceSecurityGroupF0E2D5BE", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Instance" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash\nyum install -y" - } - }, - "DependsOn": [ - "InstanceInstanceRoleDefaultPolicy4ACE9290", - "InstanceInstanceRoleE9785DE5" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.nat-instances.lit.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.nat-instances.lit.expected.json deleted file mode 100644 index 5ac907df6e0ac..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.nat-instances.lit.expected.json +++ /dev/null @@ -1,574 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1NatInstanceInstanceProfile2FD934CB": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "MyVpcNatRoleF1616EE9" - } - ] - } - }, - "MyVpcPublicSubnet1NatInstance8E94E5F7": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "MyVpcPublicSubnet1NatInstanceInstanceProfile2FD934CB" - }, - "ImageId": "ami-1234", - "InstanceType": "t3.small", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyVpcNatSecurityGroupAA76397E", - "GroupId" - ] - } - ], - "SourceDestCheck": false, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet1/NatInstance" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "MyVpcNatRoleF1616EE9" - ] - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2NatInstanceInstanceProfile5AB09EF6": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "MyVpcNatRoleF1616EE9" - } - ] - } - }, - "MyVpcPublicSubnet2NatInstance04BCE4E3": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1b", - "IamInstanceProfile": { - "Ref": "MyVpcPublicSubnet2NatInstanceInstanceProfile5AB09EF6" - }, - "ImageId": "ami-1234", - "InstanceType": "t3.small", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyVpcNatSecurityGroupAA76397E", - "GroupId" - ] - } - ], - "SourceDestCheck": false, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet2/NatInstance" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "MyVpcNatRoleF1616EE9" - ] - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "InstanceId": { - "Ref": "MyVpcPublicSubnet1NatInstance8E94E5F7" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "InstanceId": { - "Ref": "MyVpcPublicSubnet2NatInstance04BCE4E3" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "InstanceId": { - "Ref": "MyVpcPublicSubnet1NatInstance8E94E5F7" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcNatSecurityGroupAA76397E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security Group for NAT instances", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ALL TRAFFIC", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc" - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - }, - "MyVpcNatRoleF1616EE9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-nat-instances/MyVpc" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.reserved-private-subnet.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.reserved-private-subnet.expected.json deleted file mode 100644 index 8f40b525fec84..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.reserved-private-subnet.expected.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC" - } - ] - } - }, - "VPCingressSubnet1SubnetBB7FDF67": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet1" - } - ] - } - }, - "VPCingressSubnet1RouteTableEEF02A64": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet1" - } - ] - } - }, - "VPCingressSubnet1RouteTableAssociation7700457B": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet1RouteTableEEF02A64" - }, - "SubnetId": { - "Ref": "VPCingressSubnet1SubnetBB7FDF67" - } - } - }, - "VPCingressSubnet1DefaultRouteC1C9D77C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet1RouteTableEEF02A64" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCingressSubnet2SubnetE30F0091": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet2" - } - ] - } - }, - "VPCingressSubnet2RouteTable8565F2D0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet2" - } - ] - } - }, - "VPCingressSubnet2RouteTableAssociation35C35494": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet2RouteTable8565F2D0" - }, - "SubnetId": { - "Ref": "VPCingressSubnet2SubnetE30F0091" - } - } - }, - "VPCingressSubnet2DefaultRoute8E2F45A7": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet2RouteTable8565F2D0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCingressSubnet3Subnet38A3BA95": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet3" - } - ] - } - }, - "VPCingressSubnet3RouteTable83539693": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC/ingressSubnet3" - } - ] - } - }, - "VPCingressSubnet3RouteTableAssociation421877E8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet3RouteTable83539693" - }, - "SubnetId": { - "Ref": "VPCingressSubnet3Subnet38A3BA95" - } - } - }, - "VPCingressSubnet3DefaultRouteDF537F13": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCingressSubnet3RouteTable83539693" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.share-vpcs.lit.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.share-vpcs.lit.expected.json deleted file mode 100644 index 915796b1204c4..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.share-vpcs.lit.expected.json +++ /dev/null @@ -1,521 +0,0 @@ -[ - { - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "Stack1/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - } - } - }, - {} -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc-endpoint.lit.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpc-endpoint.lit.expected.json deleted file mode 100644 index bf26c497e9064..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc-endpoint.lit.expected.json +++ /dev/null @@ -1,707 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcS3FADC1889": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".s3" - ] - ] - }, - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "RouteTableIds": [ - { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - } - ], - "VpcEndpointType": "Gateway" - } - }, - "MyVpcDynamoDbEndpointE6A39B0D": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".dynamodb" - ] - ] - }, - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:DescribeTable", - "dynamodb:ListTables" - ], - "Effect": "Allow", - "Principal": { - "AWS": "*" - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "RouteTableIds": [ - { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - } - ], - "VpcEndpointType": "Gateway" - } - }, - "MyVpcEcrDockerEndpointSecurityGroup47BB9CC1": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-ec2-vpc-endpoint/MyVpc/EcrDockerEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "MyVpcF9F0CA6F", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "MyVpcF9F0CA6F", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint/MyVpc" - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - }, - "MyVpcEcrDockerEndpoint0385050C": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".ecr.dkr" - ] - ] - }, - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyVpcEcrDockerEndpointSecurityGroup47BB9CC1", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - }, - { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - }, - { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - ], - "VpcEndpointType": "Interface" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.expected.json deleted file mode 100644 index 9d43a7553f127..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.expected.json +++ /dev/null @@ -1,957 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VPCFlowLogsS3BucketFB7DC2BE": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC" - } - ] - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "VPCFlowLogsS3FlowLogB5256CFF": { - "Type": "AWS::EC2::FlowLog", - "Properties": { - "ResourceId": { - "Ref": "VPCB9E5F0B4" - }, - "ResourceType": "VPC", - "TrafficType": "ALL", - "LogDestination": { - "Fn::GetAtt": [ - "VPCFlowLogsS3BucketFB7DC2BE", - "Arn" - ] - }, - "LogDestinationType": "s3", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC" - } - ] - } - }, - "VPCFlowLogsS3KeyPrefixFlowLogB57F1746": { - "Type": "AWS::EC2::FlowLog", - "Properties": { - "ResourceId": { - "Ref": "VPCB9E5F0B4" - }, - "ResourceType": "VPC", - "TrafficType": "ALL", - "LogDestination": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/prefix/" - ] - ] - }, - "LogDestinationType": "s3", - "Tags": [ - { - "Key": "Name", - "Value": "FlowLogsTestStack/VPC" - } - ] - } - }, - "FlowLogsCWIAMRole017AD736": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "vpc-flow-logs.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FlowLogsCWIAMRoleDefaultPolicy943C8A20": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FlowLogsCWLogGroup0398E8F8", - "Arn" - ] - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FlowLogsCWIAMRole017AD736", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FlowLogsCWIAMRoleDefaultPolicy943C8A20", - "Roles": [ - { - "Ref": "FlowLogsCWIAMRole017AD736" - } - ] - } - }, - "FlowLogsCWLogGroup0398E8F8": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FlowLogsCWFlowLog9CED86DA": { - "Type": "AWS::EC2::FlowLog", - "Properties": { - "ResourceId": { - "Ref": "VPCB9E5F0B4" - }, - "ResourceType": "VPC", - "TrafficType": "ALL", - "DeliverLogsPermissionArn": { - "Fn::GetAtt": [ - "FlowLogsCWIAMRole017AD736", - "Arn" - ] - }, - "LogDestinationType": "cloud-watch-logs", - "LogGroupName": { - "Ref": "FlowLogsCWLogGroup0398E8F8" - } - } - }, - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "s3:PutObject", - "Condition": { - "StringEquals": { - "s3:x-amz-acl": "bucket-owner-full-control", - "aws:SourceAccount": { - "Ref": "AWS::AccountId" - } - }, - "ArnLike": { - "aws:SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":*" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "delivery.logs.amazonaws.com" - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucketAcl", - "s3:ListBucket" - ], - "Condition": { - "StringEquals": { - "aws:SourceAccount": { - "Ref": "AWS::AccountId" - } - }, - "ArnLike": { - "aws:SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":*" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "delivery.logs.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc-gateway.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpc-gateway.expected.json deleted file mode 100644 index 5484f5fc8c76e..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc-gateway.expected.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcIsolatedSubnet1Subnet2259FE9F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc/IsolatedSubnet1" - } - ] - } - }, - "MyVpcIsolatedSubnet1RouteTable67AEA7B8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc/IsolatedSubnet1" - } - ] - } - }, - "MyVpcIsolatedSubnet1RouteTableAssociationCDAE5449": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcIsolatedSubnet1RouteTable67AEA7B8" - }, - "SubnetId": { - "Ref": "MyVpcIsolatedSubnet1Subnet2259FE9F" - } - } - }, - "MyVpcIsolatedSubnet1MyRouteCDD7D172": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcIsolatedSubnet1RouteTable67AEA7B8" - }, - "DestinationCidrBlock": "8.8.8.8/32", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-gateway/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc-networkacl.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpc-networkacl.expected.json deleted file mode 100644 index 71106b9a76c25..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc-networkacl.expected.json +++ /dev/null @@ -1,593 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "myNACL198AF6597": { - "Type": "AWS::EC2::NetworkAcl", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - }, - "myNACL1DefaultAssociationawscdkec2vpcMyVpcPrivateSubnet1FED4593C4AF222C6": { - "Type": "AWS::EC2::SubnetNetworkAclAssociation", - "Properties": { - "NetworkAclId": { - "Ref": "myNACL198AF6597" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "myNACL1DefaultAssociationawscdkec2vpcMyVpcPrivateSubnet2A2D31E07B1508A9A": { - "Type": "AWS::EC2::SubnetNetworkAclAssociation", - "Properties": { - "NetworkAclId": { - "Ref": "myNACL198AF6597" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "myNACL1DefaultAssociationawscdkec2vpcMyVpcPrivateSubnet35E0B6064690BFF70": { - "Type": "AWS::EC2::SubnetNetworkAclAssociation", - "Properties": { - "NetworkAclId": { - "Ref": "myNACL198AF6597" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "myNACL1AllowDNSEgressD49F54D3": { - "Type": "AWS::EC2::NetworkAclEntry", - "Properties": { - "NetworkAclId": { - "Ref": "myNACL198AF6597" - }, - "Protocol": 17, - "RuleAction": "allow", - "RuleNumber": 100, - "CidrBlock": "172.16.0.0/24", - "Egress": true, - "PortRange": { - "From": 53, - "To": 53 - } - } - }, - "myNACL1AllowDNSIngress3030B2C3": { - "Type": "AWS::EC2::NetworkAclEntry", - "Properties": { - "NetworkAclId": { - "Ref": "myNACL198AF6597" - }, - "Protocol": 17, - "RuleAction": "allow", - "RuleNumber": 100, - "CidrBlock": "0.0.0.0/0", - "Egress": false, - "PortRange": { - "From": 53, - "To": 53 - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpc.expected.json deleted file mode 100644 index 8aad8918d8ace..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc.expected.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "SGADB53937": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-ec2-vpc/SG", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ICMP Type 8", - "FromPort": 8, - "IpProtocol": "icmp", - "ToPort": -1 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ICMP Type 128", - "FromPort": 128, - "IpProtocol": "icmp", - "ToPort": -1 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:ALL ICMP", - "FromPort": -1, - "IpProtocol": "icmp", - "ToPort": -1 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:UDP ALL PORTS", - "FromPort": 0, - "IpProtocol": "udp", - "ToPort": 65535 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:UDP 123", - "FromPort": 123, - "IpProtocol": "udp", - "ToPort": 123 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:UDP 800-801", - "FromPort": 800, - "IpProtocol": "udp", - "ToPort": 801 - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - } - } -} diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpn-pre-shared-key-token.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpn-pre-shared-key-token.expected.json deleted file mode 100644 index 7895454898cbc..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpn-pre-shared-key-token.expected.json +++ /dev/null @@ -1,652 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.10.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.10.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.10.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.10.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.10.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.10.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.10.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcVpnGateway11FB05E5": { - "Type": "AWS::EC2::VPNGateway", - "Properties": { - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcVPCVPNGW0CB969B3": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - } - }, - "MyVpcRoutePropagation122FC3BE": { - "Type": "AWS::EC2::VPNGatewayRoutePropagation", - "Properties": { - "RouteTableIds": [ - { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - }, - "DependsOn": [ - "MyVpcVPCVPNGW0CB969B3" - ] - }, - "MyVpcDynamicCustomerGatewayFB63DFBF": { - "Type": "AWS::EC2::CustomerGateway", - "Properties": { - "BgpAsn": 65000, - "IpAddress": "52.85.255.164", - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcDynamic739F3519": { - "Type": "AWS::EC2::VPNConnection", - "Properties": { - "CustomerGatewayId": { - "Ref": "MyVpcDynamicCustomerGatewayFB63DFBF" - }, - "Type": "ipsec.1", - "StaticRoutesOnly": false, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - }, - "VpnTunnelOptionsSpecifications": [ - { - "PreSharedKey": "ssmpwaaa" - } - ] - } - }, - "MyVpcStaticCustomerGateway43D01906": { - "Type": "AWS::EC2::CustomerGateway", - "Properties": { - "BgpAsn": 65000, - "IpAddress": "52.85.255.197", - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcStaticABA7F625": { - "Type": "AWS::EC2::VPNConnection", - "Properties": { - "CustomerGatewayId": { - "Ref": "MyVpcStaticCustomerGateway43D01906" - }, - "Type": "ipsec.1", - "StaticRoutesOnly": true, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - } - }, - "MyVpcStaticRoute192168100240A24A5CC": { - "Type": "AWS::EC2::VPNConnectionRoute", - "Properties": { - "DestinationCidrBlock": "192.168.10.0/24", - "VpnConnectionId": { - "Ref": "MyVpcStaticABA7F625" - } - } - }, - "MyVpcStaticRoute19216820024CD4B642F": { - "Type": "AWS::EC2::VPNConnectionRoute", - "Properties": { - "DestinationCidrBlock": "192.168.20.0/24", - "VpnConnectionId": { - "Ref": "MyVpcStaticABA7F625" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpn.expected.json b/packages/@aws-cdk/aws-ec2/test/integ.vpn.expected.json deleted file mode 100644 index 409f9d4f48bf2..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpn.expected.json +++ /dev/null @@ -1,652 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.10.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.0.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.32.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet3Subnet57EEE236": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.64.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTable15028F08": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3RouteTableAssociation5C27DDA4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - } - } - }, - "MyVpcPublicSubnet3DefaultRoute3A83AB36": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet3RouteTable15028F08" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet3EIPC5ACADAB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPublicSubnet3NATGatewayD4B50EBE": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet3EIPC5ACADAB", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet3Subnet57EEE236" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PublicSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.96.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.128.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcPrivateSubnet3Subnet772D6AD7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.10.160.0/19", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableB790927C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc/PrivateSubnet3" - } - ] - } - }, - "MyVpcPrivateSubnet3RouteTableAssociationD951741C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet3Subnet772D6AD7" - } - } - }, - "MyVpcPrivateSubnet3DefaultRouteEC11C0C5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet3NATGatewayD4B50EBE" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcVpnGateway11FB05E5": { - "Type": "AWS::EC2::VPNGateway", - "Properties": { - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcVPCVPNGW0CB969B3": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - } - }, - "MyVpcRoutePropagation122FC3BE": { - "Type": "AWS::EC2::VPNGatewayRoutePropagation", - "Properties": { - "RouteTableIds": [ - { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - { - "Ref": "MyVpcPrivateSubnet3RouteTableB790927C" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - }, - "DependsOn": [ - "MyVpcVPCVPNGW0CB969B3" - ] - }, - "MyVpcDynamicCustomerGatewayFB63DFBF": { - "Type": "AWS::EC2::CustomerGateway", - "Properties": { - "BgpAsn": 65000, - "IpAddress": "52.85.255.164", - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcDynamic739F3519": { - "Type": "AWS::EC2::VPNConnection", - "Properties": { - "CustomerGatewayId": { - "Ref": "MyVpcDynamicCustomerGatewayFB63DFBF" - }, - "Type": "ipsec.1", - "StaticRoutesOnly": false, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - }, - "VpnTunnelOptionsSpecifications": [ - { - "PreSharedKey": "secretkey1234" - } - ] - } - }, - "MyVpcStaticCustomerGateway43D01906": { - "Type": "AWS::EC2::CustomerGateway", - "Properties": { - "BgpAsn": 65000, - "IpAddress": "52.85.255.197", - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ] - } - }, - "MyVpcStaticABA7F625": { - "Type": "AWS::EC2::VPNConnection", - "Properties": { - "CustomerGatewayId": { - "Ref": "MyVpcStaticCustomerGateway43D01906" - }, - "Type": "ipsec.1", - "StaticRoutesOnly": true, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpn/MyVpc" - } - ], - "VpnGatewayId": { - "Ref": "MyVpcVpnGateway11FB05E5" - } - } - }, - "MyVpcStaticRoute192168100240A24A5CC": { - "Type": "AWS::EC2::VPNConnectionRoute", - "Properties": { - "DestinationCidrBlock": "192.168.10.0/24", - "VpnConnectionId": { - "Ref": "MyVpcStaticABA7F625" - } - } - }, - "MyVpcStaticRoute19216820024CD4B642F": { - "Type": "AWS::EC2::VPNConnectionRoute", - "Properties": { - "DestinationCidrBlock": "192.168.20.0/24", - "VpnConnectionId": { - "Ref": "MyVpcStaticABA7F625" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json deleted file mode 100644 index 854d6fab2364f..0000000000000 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - }, - "Outputs": { - "ImageUri": { - "Value": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:0a3355be12051c9984bf2b0b2bba4e6ea535968e5b6e7396449701732fe5ed14" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json b/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json deleted file mode 100644 index 793deb5240d59..0000000000000 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.nested-stacks-docker.expected.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "Resources": { - "nestedstackwithimageNestedStacknestedstackwithimageNestedStackResourceDF784FD5": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297S3BucketAF5C36E5" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297S3VersionKeyEB2E48FF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297S3VersionKeyEB2E48FF" - } - ] - } - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297S3BucketAF5C36E5": { - "Type": "String", - "Description": "S3 bucket for asset \"bd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297\"" - }, - "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297S3VersionKeyEB2E48FF": { - "Type": "String", - "Description": "S3 key for asset version \"bd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297\"" - }, - "AssetParametersbd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297ArtifactHashA3886DE7": { - "Type": "String", - "Description": "Artifact hash for asset \"bd34d9d2b847afabcea4ef507c1bdaabe8abdbb75c41b3db3609d371f8626297\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr/test/integ.basic.expected.json b/packages/@aws-cdk/aws-ecr/test/integ.basic.expected.json deleted file mode 100644 index 09075cee64a01..0000000000000 --- a/packages/@aws-cdk/aws-ecr/test/integ.basic.expected.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": false - }, - "LifecyclePolicy": { - "LifecyclePolicyText": "{\"rules\":[{\"rulePriority\":1,\"selection\":{\"tagStatus\":\"any\",\"countType\":\"imageCountMoreThan\",\"countNumber\":5},\"action\":{\"type\":\"expire\"}}]}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - }, - "Outputs": { - "RepositoryURI": { - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "Repo02AC86CF" - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json b/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json deleted file mode 100644 index 5fbca07aa35d4..0000000000000 --- a/packages/@aws-cdk/aws-ecr/test/integ.imagescan.expected.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::ECR::Repository", - "Properties": { - "ImageScanningConfiguration": { - "ScanOnPush": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "RepoImageScanComplete7BC71935": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.ecr" - ], - "detail-type": [ - "ECR Image Scan" - ], - "detail": { - "repository-name": [ - { - "Ref": "Repo02AC86CF" - } - ], - "scan-status": [ - "COMPLETE" - ] - } - }, - "State": "ENABLED" - } - } - }, - "Outputs": { - "RepositoryURI": { - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - ] - } - ] - }, - ".dkr.ecr.", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Arn" - ] - } - ] - } - ] - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "Repo02AC86CF" - } - ] - ] - } - } - } -} diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.expected.json deleted file mode 100644 index 885d665752a94..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.expected.json +++ /dev/null @@ -1,1193 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "ClusterDefaultAutoScalingGroupInstanceSecurityGroup1D15236A": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegmyServiceLBSecurityGroupFA544FE5327686553555411E4C": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 32768, - "GroupId": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupInstanceSecurityGroup1D15236A", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterDefaultAutoScalingGroupInstanceRole9A14B384": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy06157A81": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy06157A81", - "Roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupInstanceRole9A14B384" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupInstanceRole9A14B384" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupLaunchConfig81EA5466": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupInstanceSecurityGroup1D15236A", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "ClusterEB0386A7" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy06157A81", - "ClusterDefaultAutoScalingGroupInstanceRole9A14B384" - ] - }, - "ClusterDefaultAutoScalingGroupASG0F98E147": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ClusterDefaultAutoScalingGroupLaunchConfig81EA5466" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "Roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - ] - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic2FBAAF9B4FDC19F0": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - } - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - }, - "Endpoint": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - } - } - }, - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole70201663": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyFFFD6EA5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyFFFD6EA5", - "Roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole70201663" - } - ] - } - }, - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHook4A9A4325": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - }, - "RoleARN": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole70201663", - "Arn" - ] - } - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyFFFD6EA5", - "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole70201663" - ] - }, - "myServiceLB168895E1": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "myServiceLBSecurityGroupFE0ED608": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegmyServiceLB1F7A535D", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBSecurityGrouptoawsecsintegClusterDefaultAutoScalingGroupInstanceSecurityGroupED6E64823276865535D7AE55C8": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupInstanceSecurityGroup1D15236A", - "GroupId" - ] - }, - "FromPort": 32768, - "ToPort": 65535 - } - }, - "myServiceLBPublicListenerC78AE8A0": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSTargetGroupweb80GroupCA306BD0" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "myServiceLB168895E1" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "myServiceLBPublicListenerECSTargetGroupweb80GroupCA306BD0": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "instance", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBPublicListenerECSTargetGroupweb90Group6388E5B5": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "instance", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBPublicListenerECSTargetGroupweb90Rule0CAA997D": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSTargetGroupweb90Group6388E5B5" - }, - "Type": "forward" - } - ], - "Conditions": [ - { - "Field": "path-pattern", - "PathPatternConfig": { - "Values": [ - "a/b/c" - ] - } - } - ], - "ListenerArn": { - "Ref": "myServiceLBPublicListenerC78AE8A0" - }, - "Priority": 10 - } - }, - "myServiceTaskDefTaskRole1C1DE6CC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDef7FB8322A": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "myServiceTaskDefwebLogGroupA1767F2C" - }, - "awslogs-stream-prefix": "myService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 0, - "Protocol": "tcp" - }, - { - "ContainerPort": 90, - "HostPort": 0, - "Protocol": "tcp" - } - ] - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefExecutionRole618CD311", - "Arn" - ] - }, - "Family": "awsecsintegmyServiceTaskDefA3A33D18", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefTaskRole1C1DE6CC", - "Arn" - ] - } - } - }, - "myServiceTaskDefwebLogGroupA1767F2C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myServiceTaskDefExecutionRole618CD311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myServiceTaskDefwebLogGroupA1767F2C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571", - "Roles": [ - { - "Ref": "myServiceTaskDefExecutionRole618CD311" - } - ] - } - }, - "myServiceB0B6FAA0": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "EC2", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSTargetGroupweb80GroupCA306BD0" - } - }, - { - "ContainerName": "web", - "ContainerPort": 90, - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSTargetGroupweb90Group6388E5B5" - } - } - ], - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "myServiceTaskDef7FB8322A" - } - }, - "DependsOn": [ - "myServiceLBPublicListenerECSTargetGroupweb80GroupCA306BD0", - "myServiceLBPublicListenerECSTargetGroupweb90Group6388E5B5", - "myServiceLBPublicListenerECSTargetGroupweb90Rule0CAA997D", - "myServiceLBPublicListenerC78AE8A0" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - }, - "Outputs": { - "myServiceLoadBalancerDNS3A083E9F": { - "Value": { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - }, - "myServiceServiceURL1258C56B": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json deleted file mode 100644 index c068504073cba..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json +++ /dev/null @@ -1,878 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "ScheduledEc2TaskScheduledEventRuleFE2376A2": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - }, - "EcsParameters": { - "TaskCount": 2, - "TaskDefinitionArn": { - "Ref": "ScheduledEc2TaskScheduledTaskDef56328BA4" - } - }, - "Id": "Target0", - "Input": "{}", - "RoleArn": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefEventsRole64113C5F", - "Arn" - ] - } - } - ] - } - }, - "ScheduledEc2TaskScheduledTaskDefTaskRoleC3FA127C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledEc2TaskScheduledTaskDef56328BA4": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Cpu": 1, - "Environment": [ - { - "Name": "TRIGGER", - "Value": "CloudWatch Events" - } - ], - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "ScheduledEc2TaskScheduledTaskDefScheduledContainerLogGroupA85E11E6" - }, - "awslogs-stream-prefix": "ScheduledEc2Task", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 512, - "Name": "ScheduledContainer" - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefExecutionRole65A8CC6F", - "Arn" - ] - }, - "Family": "awsecsintegecsScheduledEc2TaskScheduledTaskDef18FB4348", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefTaskRoleC3FA127C", - "Arn" - ] - } - } - }, - "ScheduledEc2TaskScheduledTaskDefScheduledContainerLogGroupA85E11E6": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ScheduledEc2TaskScheduledTaskDefExecutionRole65A8CC6F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledEc2TaskScheduledTaskDefExecutionRoleDefaultPolicy6E8BCBB0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefScheduledContainerLogGroupA85E11E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ScheduledEc2TaskScheduledTaskDefExecutionRoleDefaultPolicy6E8BCBB0", - "Roles": [ - { - "Ref": "ScheduledEc2TaskScheduledTaskDefExecutionRole65A8CC6F" - } - ] - } - }, - "ScheduledEc2TaskScheduledTaskDefEventsRole64113C5F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledEc2TaskScheduledTaskDefEventsRoleDefaultPolicyA6C9177A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Ref": "ScheduledEc2TaskScheduledTaskDef56328BA4" - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefExecutionRole65A8CC6F", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ScheduledEc2TaskScheduledTaskDefEventsRoleDefaultPolicyA6C9177A", - "Roles": [ - { - "Ref": "ScheduledEc2TaskScheduledTaskDefEventsRole64113C5F" - } - ] - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.alb-fargate-service-https.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.alb-fargate-service-https.expected.json deleted file mode 100644 index ee6317ba0f94f..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.alb-fargate-service-https.expected.json +++ /dev/null @@ -1,775 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-alb-fg-https/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "myServiceLB168895E1": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "myServiceLBSecurityGroupFE0ED608": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegalbfghttpsmyServiceLB8BEE3C49", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 443", - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - }, - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBSecurityGrouptoawsecsintegalbfghttpsmyServiceSecurityGroup49C558AD803FB613FF": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "myServiceLBPublicListenerC78AE8A0": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSGroup17E9BBC1" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "myServiceLB168895E1" - }, - "Certificates": [ - { - "CertificateArn": { - "Ref": "myServiceCertificate152F9DDA" - } - } - ], - "Port": 443, - "Protocol": "HTTPS" - } - }, - "myServiceLBPublicListenerECSGroup17E9BBC1": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBPublicRedirectListener0EEF9DCA": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "RedirectConfig": { - "Port": "443", - "Protocol": "HTTPS", - "StatusCode": "HTTP_301" - }, - "Type": "redirect" - } - ], - "LoadBalancerArn": { - "Ref": "myServiceLB168895E1" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "myServiceCertificate152F9DDA": { - "Type": "AWS::CertificateManager::Certificate", - "Properties": { - "DomainName": "test.example.com", - "DomainValidationOptions": [ - { - "DomainName": "test.example.com", - "HostedZoneId": "fakeId" - } - ], - "ValidationMethod": "DNS" - } - }, - "myServiceDNSD76FB53A": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "test.example.com.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::Join": [ - "", - [ - "dualstack.", - { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - ] - ] - }, - "HostedZoneId": { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "CanonicalHostedZoneID" - ] - } - }, - "HostedZoneId": "fakeId" - } - }, - "myServiceTaskDefTaskRole1C1DE6CC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDef7FB8322A": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "myServiceTaskDefwebLogGroupA1767F2C" - }, - "awslogs-stream-prefix": "myService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefExecutionRole618CD311", - "Arn" - ] - }, - "Family": "awsecsintegalbfghttpsmyServiceTaskDefD8ABFBF2", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefTaskRole1C1DE6CC", - "Arn" - ] - } - } - }, - "myServiceTaskDefwebLogGroupA1767F2C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myServiceTaskDefExecutionRole618CD311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myServiceTaskDefwebLogGroupA1767F2C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571", - "Roles": [ - { - "Ref": "myServiceTaskDefExecutionRole618CD311" - } - ] - } - }, - "myServiceB0B6FAA0": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": true, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSGroup17E9BBC1" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "myServiceTaskDef7FB8322A" - } - }, - "DependsOn": [ - "myServiceLBPublicListenerECSGroup17E9BBC1", - "myServiceLBPublicListenerC78AE8A0" - ] - }, - "myServiceSecurityGroupC3B9D4E0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-alb-fg-https/myService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceSecurityGroupfromawsecsintegalbfghttpsmyServiceLBSecurityGroupA934AF89808E9FB7A3": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "ToPort": 80 - } - } - }, - "Outputs": { - "myServiceLoadBalancerDNS3A083E9F": { - "Value": { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - }, - "myServiceServiceURL1258C56B": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "myServiceDNSD76FB53A" - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json deleted file mode 100644 index 23fcba8794ced..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json +++ /dev/null @@ -1,760 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "FargateServiceLBB353E155": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceLBSecurityGroup5F444C78", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "FargateServiceLBSecurityGroup5F444C78": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegFargateServiceLB5FE4725D", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateServiceLBSecurityGrouptoawsecsintegFargateServiceSecurityGroup8930AEB880001FF8BADE": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "FargateServiceLBSecurityGroup5F444C78", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup262B61DD", - "GroupId" - ] - }, - "FromPort": 8000, - "ToPort": 8000 - } - }, - "FargateServiceLBPublicListener4B4929CA": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "FargateServiceLBPublicListenerECSGroupBE57E081" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "FargateServiceLBB353E155" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "FargateServiceLBPublicListenerECSGroupBE57E081": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateServiceTaskDefTaskRole8CDCF85E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateServiceTaskDef940E3A80": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:0a3355be12051c9984bf2b0b2bba4e6ea535968e5b6e7396449701732fe5ed14" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "FargateServiceTaskDefwebLogGroup71FAF541" - }, - "awslogs-stream-prefix": "FargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 8000, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "FargateServiceTaskDefExecutionRole9194820E", - "Arn" - ] - }, - "Family": "awsecsintegFargateServiceTaskDefE1C73F14", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "FargateServiceTaskDefTaskRole8CDCF85E", - "Arn" - ] - } - } - }, - "FargateServiceTaskDefwebLogGroup71FAF541": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FargateServiceTaskDefExecutionRole9194820E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateServiceTaskDefExecutionRoleDefaultPolicy827E7CA2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateServiceTaskDefwebLogGroup71FAF541", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateServiceTaskDefExecutionRoleDefaultPolicy827E7CA2", - "Roles": [ - { - "Ref": "FargateServiceTaskDefExecutionRole9194820E" - } - ] - } - }, - "FargateServiceECC8084D": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 8000, - "TargetGroupArn": { - "Ref": "FargateServiceLBPublicListenerECSGroupBE57E081" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup262B61DD", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "FargateServiceTaskDef940E3A80" - } - }, - "DependsOn": [ - "FargateServiceLBPublicListenerECSGroupBE57E081", - "FargateServiceLBPublicListener4B4929CA" - ] - }, - "FargateServiceSecurityGroup262B61DD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/FargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateServiceSecurityGroupfromawsecsintegFargateServiceLBSecurityGroup129467A18000AD32AE25": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 8000, - "GroupId": { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup262B61DD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "FargateServiceLBSecurityGroup5F444C78", - "GroupId" - ] - }, - "ToPort": 8000 - } - } - }, - "Outputs": { - "FargateServiceLoadBalancerDNS9433D5F6": { - "Value": { - "Fn::GetAtt": [ - "FargateServiceLBB353E155", - "DNSName" - ] - } - }, - "FargateServiceServiceURL47701F45": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "FargateServiceLBB353E155", - "DNSName" - ] - } - ] - ] - } - }, - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "FargateServiceLBB353E155", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-load-balanced-fargate-service.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-load-balanced-fargate-service.expected.json deleted file mode 100644 index e43d5c95abf8b..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-load-balanced-fargate-service.expected.json +++ /dev/null @@ -1,708 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "myServiceLB168895E1": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "myServiceLBSecurityGroupFE0ED608": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegmyServiceLB1F7A535D", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceLBSecurityGrouptoawsecsintegmyServiceSecurityGroup8DAB521180B6703B07": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "myServiceLBPublicListenerC78AE8A0": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSGroup17E9BBC1" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "myServiceLB168895E1" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "myServiceLBPublicListenerECSGroup17E9BBC1": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceTaskDefTaskRole1C1DE6CC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDef7FB8322A": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "myServiceTaskDefwebLogGroupA1767F2C" - }, - "awslogs-stream-prefix": "myService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefExecutionRole618CD311", - "Arn" - ] - }, - "Family": "awsecsintegmyServiceTaskDefA3A33D18", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefTaskRole1C1DE6CC", - "Arn" - ] - } - } - }, - "myServiceTaskDefwebLogGroupA1767F2C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myServiceTaskDefExecutionRole618CD311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myServiceTaskDefwebLogGroupA1767F2C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571", - "Roles": [ - { - "Ref": "myServiceTaskDefExecutionRole618CD311" - } - ] - } - }, - "myServiceB0B6FAA0": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "DeploymentCircuitBreaker": { - "Enable": true, - "Rollback": true - }, - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "DeploymentController": { - "Type": "ECS" - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "myServiceLBPublicListenerECSGroup17E9BBC1" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "myServiceTaskDef7FB8322A" - } - }, - "DependsOn": [ - "myServiceLBPublicListenerECSGroup17E9BBC1", - "myServiceLBPublicListenerC78AE8A0" - ] - }, - "myServiceSecurityGroupC3B9D4E0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/myService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceSecurityGroupfromawsecsintegmyServiceLBSecurityGroupFA544FE5800A81885C": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myServiceLBSecurityGroupFE0ED608", - "GroupId" - ] - }, - "ToPort": 80 - } - } - }, - "Outputs": { - "myServiceLoadBalancerDNS3A083E9F": { - "Value": { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - }, - "myServiceServiceURL1258C56B": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "myServiceLB168895E1", - "DNSName" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-queue-processing-fargate-service.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-queue-processing-fargate-service.expected.json deleted file mode 100644 index bd451b2c94895..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.circuit-breaker-queue-processing-fargate-service.expected.json +++ /dev/null @@ -1,848 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B": { - "Type": "AWS::SQS::Queue", - "Properties": { - "MessageRetentionPeriod": 1209600 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueueProcessingServiceEcsProcessingQueue552F0B37": { - "Type": "AWS::SQS::Queue", - "Properties": { - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "Arn" - ] - }, - "maxReceiveCount": 3 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefTaskRoleDefaultPolicyAE808B19": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "QueueProcessingServiceQueueProcessingTaskDefTaskRoleDefaultPolicyAE808B19", - "Roles": [ - { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6" - } - ] - } - }, - "QueueProcessingServiceQueueProcessingTaskDef4982F68B": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "QUEUE_NAME", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:95cefedd43575452a70cdeeeceb0f1c5728fd58c9ff8e81e760c3dac33c46417" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A" - }, - "awslogs-stream-prefix": "QueueProcessingService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "QueueProcessingContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985", - "Arn" - ] - }, - "Family": "awsecspatternsqueueQueueProcessingServiceQueueProcessingTaskDef2D9F8C2B", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6", - "Arn" - ] - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyA83D332D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "QueueProcessingServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyA83D332D", - "Roles": [ - { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985" - } - ] - } - }, - "QueueProcessingServiceQueueProcessingFargateService0340DB9F": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "DeploymentConfiguration": { - "DeploymentCircuitBreaker": { - "Enable": true, - "Rollback": true - }, - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "DeploymentController": { - "Type": "ECS" - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingFargateServiceSecurityGroup8FDF413D", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "TaskDefinition": { - "Ref": "QueueProcessingServiceQueueProcessingTaskDef4982F68B" - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceSecurityGroup8FDF413D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue/QueueProcessingService/QueueProcessingFargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 2, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "/", - { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingFargateService0340DB9F", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling330150E9": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling374CE648", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 50 - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy332E2644": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy74582401", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalUpperBound": 0, - "ScalingAdjustment": -1 - } - ] - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm20C30A06": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "LessThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy332E2644" - } - ], - "AlarmDescription": "Lower threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 0 - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy84DD739A": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy23C5F983", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalLowerBound": 0, - "MetricIntervalUpperBound": 400, - "ScalingAdjustment": 1 - }, - { - "MetricIntervalLowerBound": 400, - "ScalingAdjustment": 5 - } - ] - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm2660BEDF": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy84DD739A" - } - ], - "AlarmDescription": "Upper threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 100 - } - }, - "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { - "Type": "AWS::ECS::Cluster" - } - }, - "Outputs": { - "QueueProcessingServiceSQSDeadLetterQueueE9058015": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "QueueName" - ] - } - }, - "QueueProcessingServiceSQSDeadLetterQueueArnF7C6D3A8": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "Arn" - ] - } - }, - "QueueProcessingServiceSQSQueue1AD9CD9C": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - }, - "QueueProcessingServiceSQSQueueArn8C4AE4AE": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.expected.json deleted file mode 100644 index e05187b70855e..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.expected.json +++ /dev/null @@ -1,704 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "ExecutionRole605A040B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "ecs-tasks.amazonaws.com", - "ecs.amazonaws.com" - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ExecutionRoleDefaultPolicyA5B92313": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "L3TaskDefwebLogGroupC6E4A38A", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ExecutionRoleDefaultPolicyA5B92313", - "Roles": [ - { - "Ref": "ExecutionRole605A040B" - } - ] - } - }, - "L3LB212FC0E0": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "L3LBSecurityGroupEDE61198", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "L3LBSecurityGroupEDE61198": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegL3LB6453BA0A", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "L3LBSecurityGrouptoawsecsintegL3ServiceSecurityGroup7B96C87F8094933E0A": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "L3LBSecurityGroupEDE61198", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "L3ServiceSecurityGroup677B0897", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "L3LBPublicListener156FFC0F": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "L3LBPublicListenerECSGroup648EEA11" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "L3LB212FC0E0" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "L3LBPublicListenerECSGroup648EEA11": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "L3TaskDefTaskRole21C75D10": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "L3TaskDef48D8ACB8": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "L3TaskDefwebLogGroupC6E4A38A" - }, - "awslogs-stream-prefix": "L3", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ExecutionRole605A040B", - "Arn" - ] - }, - "Family": "awsecsintegL3TaskDefAA25240E", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "L3TaskDefTaskRole21C75D10", - "Arn" - ] - } - } - }, - "L3TaskDefwebLogGroupC6E4A38A": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "L3Service616D5A93": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "L3LBPublicListenerECSGroup648EEA11" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "L3ServiceSecurityGroup677B0897", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "L3TaskDef48D8ACB8" - } - }, - "DependsOn": [ - "L3LBPublicListenerECSGroup648EEA11", - "L3LBPublicListener156FFC0F" - ] - }, - "L3ServiceSecurityGroup677B0897": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/L3/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "L3ServiceSecurityGroupfromawsecsintegL3LBSecurityGroupA70DA46C80DBDFBCD6": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "L3ServiceSecurityGroup677B0897", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "L3LBSecurityGroupEDE61198", - "GroupId" - ] - }, - "ToPort": 80 - } - } - }, - "Outputs": { - "L3LoadBalancerDNSC6CB4A70": { - "Value": { - "Fn::GetAtt": [ - "L3LB212FC0E0", - "DNSName" - ] - } - }, - "L3ServiceURL0F065F2D": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "L3LB212FC0E0", - "DNSName" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-autocreate.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-autocreate.expected.json deleted file mode 100644 index a61c1948d90fe..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-autocreate.expected.json +++ /dev/null @@ -1,948 +0,0 @@ -{ - "Resources": { - "ALBFargateServiceLB64A0074E": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1Subnet3C273B99" - }, - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2Subnet95FF715A" - } - ], - "Type": "application" - }, - "DependsOn": [ - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1DefaultRouteFF4E2178", - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2DefaultRouteB1375520" - ] - }, - "ALBFargateServiceLBSecurityGroup5DC3060E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegl3autocreateALBFargateServiceLB31EA4AB6", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - } - } - }, - "ALBFargateServiceLBSecurityGrouptoawsecsintegl3autocreateALBFargateServiceSecurityGroup6F9400B580770A6C60": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "ALBFargateServiceLBPublicListener3489002A": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "ALBFargateServiceLB64A0074E" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - } - } - }, - "ALBFargateServiceTaskDefTaskRole11408723": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefF69F17D6": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "ALBFargateServiceTaskDefwebLogGroup7073A41D" - }, - "awslogs-stream-prefix": "ALBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefExecutionRole9E885E7B", - "Arn" - ] - }, - "Family": "awsecsintegl3autocreateALBFargateServiceTaskDefDA905826", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefTaskRole11408723", - "Arn" - ] - } - } - }, - "ALBFargateServiceTaskDefwebLogGroup7073A41D": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ALBFargateServiceTaskDefExecutionRole9E885E7B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefwebLogGroup7073A41D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD", - "Roles": [ - { - "Ref": "ALBFargateServiceTaskDefExecutionRole9E885E7B" - } - ] - } - }, - "ALBFargateService90FDCE10": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYN926A5246" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1Subnet075EFF4C" - }, - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2SubnetE4CEDF73" - } - ] - } - }, - "TaskDefinition": { - "Ref": "ALBFargateServiceTaskDefF69F17D6" - } - }, - "DependsOn": [ - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C", - "ALBFargateServiceLBPublicListener3489002A" - ] - }, - "ALBFargateServiceSecurityGroup82F7A67E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-l3-autocreate/ALBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - } - } - }, - "ALBFargateServiceSecurityGroupfromawsecsintegl3autocreateALBFargateServiceLBSecurityGroupD565E0BF802E7B8344": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "EcsDefaultClusterMnL3mNNYN926A5246": { - "Type": "AWS::ECS::Cluster" - }, - "EcsDefaultClusterMnL3mNNYNVpc7788A521": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1Subnet3C273B99": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1RouteTableA1FD6ACC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1RouteTableAssociation8B583A17": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1RouteTableA1FD6ACC" - }, - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1Subnet3C273B99" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1DefaultRouteFF4E2178": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1RouteTableA1FD6ACC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcIGW9C2C2B8F" - } - }, - "DependsOn": [ - "EcsDefaultClusterMnL3mNNYNVpcVPCGW2447264E" - ] - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1EIP8704DB2F": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1NATGateway5E3732C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1Subnet3C273B99" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1EIP8704DB2F", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2Subnet95FF715A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2RouteTable263DEAA5": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2RouteTableAssociation43E5803C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2RouteTable263DEAA5" - }, - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2Subnet95FF715A" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2DefaultRouteB1375520": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2RouteTable263DEAA5" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcIGW9C2C2B8F" - } - }, - "DependsOn": [ - "EcsDefaultClusterMnL3mNNYNVpcVPCGW2447264E" - ] - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2EIPF0764873": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2NATGateway4C855E00": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2Subnet95FF715A" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2EIPF0764873", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PublicSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1Subnet075EFF4C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PrivateSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1RouteTable4F1D2E36": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PrivateSubnet1" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1RouteTableAssociation34B92275": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1RouteTable4F1D2E36" - }, - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1Subnet075EFF4C" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1DefaultRouteA5ADF694": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1RouteTable4F1D2E36" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1NATGateway5E3732C1" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2SubnetE4CEDF73": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PrivateSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2RouteTableDCE46591": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc/PrivateSubnet2" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2RouteTableAssociation111C622F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2RouteTableDCE46591" - }, - "SubnetId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2SubnetE4CEDF73" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2DefaultRoute20CE2D89": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2RouteTableDCE46591" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2NATGateway4C855E00" - } - } - }, - "EcsDefaultClusterMnL3mNNYNVpcIGW9C2C2B8F": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-autocreate/EcsDefaultClusterMnL3mNNYN/Vpc" - } - ] - } - }, - "EcsDefaultClusterMnL3mNNYNVpcVPCGW2447264E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - }, - "InternetGatewayId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcIGW9C2C2B8F" - } - } - }, - "NLBFargateServiceLB659EC17C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1Subnet3C273B99" - }, - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2Subnet95FF715A" - } - ], - "Type": "network" - }, - "DependsOn": [ - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet1DefaultRouteFF4E2178", - "EcsDefaultClusterMnL3mNNYNVpcPublicSubnet2DefaultRouteB1375520" - ] - }, - "NLBFargateServiceLBPublicListenerB0DCA73C": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "NLBFargateServiceLB659EC17C" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - } - } - }, - "NLBFargateServiceTaskDefTaskRole6C88F40B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefB836FA89": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" - }, - "awslogs-stream-prefix": "NLBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefExecutionRoleF6D642D5", - "Arn" - ] - }, - "Family": "awsecsintegl3autocreateNLBFargateServiceTaskDef7AC6C114", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefTaskRole6C88F40B", - "Arn" - ] - } - } - }, - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "NLBFargateServiceTaskDefExecutionRoleF6D642D5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805", - "Roles": [ - { - "Ref": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" - } - ] - } - }, - "NLBFargateServiceB92AC095": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYN926A5246" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "NLBFargateServiceSecurityGroup9D81388B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet1Subnet075EFF4C" - }, - { - "Ref": "EcsDefaultClusterMnL3mNNYNVpcPrivateSubnet2SubnetE4CEDF73" - } - ] - } - }, - "TaskDefinition": { - "Ref": "NLBFargateServiceTaskDefB836FA89" - } - }, - "DependsOn": [ - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2", - "NLBFargateServiceLBPublicListenerB0DCA73C" - ] - }, - "NLBFargateServiceSecurityGroup9D81388B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-l3-autocreate/NLBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc7788A521" - } - } - } - }, - "Outputs": { - "ALBFargateServiceLoadBalancerDNSAFB2EDDB": { - "Value": { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - }, - "ALBFargateServiceServiceURL4A19CF25": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - ] - ] - } - }, - "NLBFargateServiceLoadBalancerDNSC2B2922F": { - "Value": { - "Fn::GetAtt": [ - "NLBFargateServiceLB659EC17C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-vpconly.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-vpconly.expected.json deleted file mode 100644 index 771eef386379d..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-vpconly.expected.json +++ /dev/null @@ -1,948 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-l3-vpconly/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ALBFargateServiceLB64A0074E": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "ALBFargateServiceLBSecurityGroup5DC3060E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegl3vpconlyALBFargateServiceLBE08492C1", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceLBSecurityGrouptoawsecsintegl3vpconlyALBFargateServiceSecurityGroup3700A42180D1AB9DBC": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "ALBFargateServiceLBPublicListener3489002A": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "ALBFargateServiceLB64A0074E" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceTaskDefTaskRole11408723": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefF69F17D6": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "ALBFargateServiceTaskDefwebLogGroup7073A41D" - }, - "awslogs-stream-prefix": "ALBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefExecutionRole9E885E7B", - "Arn" - ] - }, - "Family": "awsecsintegl3vpconlyALBFargateServiceTaskDef846555AE", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefTaskRole11408723", - "Arn" - ] - } - } - }, - "ALBFargateServiceTaskDefwebLogGroup7073A41D": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ALBFargateServiceTaskDefExecutionRole9E885E7B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefwebLogGroup7073A41D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD", - "Roles": [ - { - "Ref": "ALBFargateServiceTaskDefExecutionRole9E885E7B" - } - ] - } - }, - "ALBFargateService90FDCE10": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc18E0451A" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "ALBFargateServiceTaskDefF69F17D6" - } - }, - "DependsOn": [ - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C", - "ALBFargateServiceLBPublicListener3489002A" - ] - }, - "ALBFargateServiceSecurityGroup82F7A67E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-l3-vpconly/ALBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceSecurityGroupfromawsecsintegl3vpconlyALBFargateServiceLBSecurityGroup96E9BBBD8073FB670D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "EcsDefaultClusterMnL3mNNYNVpc18E0451A": { - "Type": "AWS::ECS::Cluster" - }, - "NLBFargateServiceLB659EC17C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "NLBFargateServiceLBPublicListenerB0DCA73C": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "NLBFargateServiceLB659EC17C" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "NLBFargateServiceTaskDefTaskRole6C88F40B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefB836FA89": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" - }, - "awslogs-stream-prefix": "NLBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefExecutionRoleF6D642D5", - "Arn" - ] - }, - "Family": "awsecsintegl3vpconlyNLBFargateServiceTaskDef1E6E41A6", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefTaskRole6C88F40B", - "Arn" - ] - } - } - }, - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "NLBFargateServiceTaskDefExecutionRoleF6D642D5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805", - "Roles": [ - { - "Ref": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" - } - ] - } - }, - "NLBFargateServiceB92AC095": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc18E0451A" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "NLBFargateServiceSecurityGroup9D81388B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "NLBFargateServiceTaskDefB836FA89" - } - }, - "DependsOn": [ - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2", - "NLBFargateServiceLBPublicListenerB0DCA73C" - ] - }, - "NLBFargateServiceSecurityGroup9D81388B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-l3-vpconly/NLBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Outputs": { - "ALBFargateServiceLoadBalancerDNSAFB2EDDB": { - "Value": { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - }, - "ALBFargateServiceServiceURL4A19CF25": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - ] - ] - } - }, - "NLBFargateServiceLoadBalancerDNSC2B2922F": { - "Value": { - "Fn::GetAtt": [ - "NLBFargateServiceLB659EC17C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.expected.json deleted file mode 100644 index 7ea739f68ff99..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.expected.json +++ /dev/null @@ -1,948 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-lb-fargate/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "ALBFargateServiceLB64A0074E": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "ALBFargateServiceLBSecurityGroup5DC3060E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsinteglbfargateALBFargateServiceLBF93E98F2", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceLBSecurityGrouptoawsecsinteglbfargateALBFargateServiceSecurityGroup0D9B5AEB80C5CFCE6C": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "ALBFargateServiceLBPublicListener3489002A": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "ALBFargateServiceLB64A0074E" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceTaskDefTaskRole11408723": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefF69F17D6": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "ALBFargateServiceTaskDefwebLogGroup7073A41D" - }, - "awslogs-stream-prefix": "ALBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefExecutionRole9E885E7B", - "Arn" - ] - }, - "Family": "awsecsinteglbfargateALBFargateServiceTaskDef26FE75C0", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefTaskRole11408723", - "Arn" - ] - } - } - }, - "ALBFargateServiceTaskDefwebLogGroup7073A41D": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ALBFargateServiceTaskDefExecutionRole9E885E7B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ALBFargateServiceTaskDefwebLogGroup7073A41D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ALBFargateServiceTaskDefExecutionRoleDefaultPolicy574B9EAD", - "Roles": [ - { - "Ref": "ALBFargateServiceTaskDefExecutionRole9E885E7B" - } - ] - } - }, - "ALBFargateService90FDCE10": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "ALBFargateServiceLBPublicListenerECSGroup6871FB8C" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "ALBFargateServiceTaskDefF69F17D6" - } - }, - "DependsOn": [ - "ALBFargateServiceLBPublicListenerECSGroup6871FB8C", - "ALBFargateServiceLBPublicListener3489002A" - ] - }, - "ALBFargateServiceSecurityGroup82F7A67E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-lb-fargate/ALBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ALBFargateServiceSecurityGroupfromawsecsinteglbfargateALBFargateServiceLBSecurityGroupCD911D2880462ECC11": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceSecurityGroup82F7A67E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ALBFargateServiceLBSecurityGroup5DC3060E", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "NLBFargateServiceLB659EC17C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "NLBFargateServiceLBPublicListenerB0DCA73C": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "NLBFargateServiceLB659EC17C" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "NLBFargateServiceTaskDefTaskRole6C88F40B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefB836FA89": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" - }, - "awslogs-stream-prefix": "NLBFargateService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefExecutionRoleF6D642D5", - "Arn" - ] - }, - "Family": "awsecsinteglbfargateNLBFargateServiceTaskDef1265FF34", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefTaskRole6C88F40B", - "Arn" - ] - } - } - }, - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "NLBFargateServiceTaskDefExecutionRoleF6D642D5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "NLBFargateServiceTaskDefwebLogGroupC4A42FE2", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805", - "Roles": [ - { - "Ref": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" - } - ] - } - }, - "NLBFargateServiceB92AC095": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "NLBFargateServiceSecurityGroup9D81388B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "NLBFargateServiceTaskDefB836FA89" - } - }, - "DependsOn": [ - "NLBFargateServiceLBPublicListenerECSGroupC469CAA2", - "NLBFargateServiceLBPublicListenerB0DCA73C" - ] - }, - "NLBFargateServiceSecurityGroup9D81388B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-lb-fargate/NLBFargateService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Outputs": { - "ALBFargateServiceLoadBalancerDNSAFB2EDDB": { - "Value": { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - }, - "ALBFargateServiceServiceURL4A19CF25": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "ALBFargateServiceLB64A0074E", - "DNSName" - ] - } - ] - ] - } - }, - "NLBFargateServiceLoadBalancerDNSC2B2922F": { - "Value": { - "Fn::GetAtt": [ - "NLBFargateServiceLB659EC17C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.multiple-network-load-balanced-fargate-service.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.multiple-network-load-balanced-fargate-service.expected.json deleted file mode 100644 index 91413b0f0fd6f..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.multiple-network-load-balanced-fargate-service.expected.json +++ /dev/null @@ -1,686 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "myServicelb1FA8CBE12": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "myServicelb1listener15ED0E805": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "myServicelb1listener1ECSTargetGroupweb80GroupC3F9339A" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "myServicelb1FA8CBE12" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "myServicelb1listener1ECSTargetGroupweb80GroupC3F9339A": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServicelb2C84C7BCB": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "myServicelb2listener2AA6970EB": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "myServicelb2listener2ECSTargetGroupweb90Group6841F924" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "myServicelb2C84C7BCB" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "myServicelb2listener2ECSTargetGroupweb90Group6841F924": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 90, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "myServiceTaskDefTaskRole1C1DE6CC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDef7FB8322A": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "myServiceTaskDefwebLogGroupA1767F2C" - }, - "awslogs-stream-prefix": "myService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - }, - { - "ContainerPort": 90, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefExecutionRole618CD311", - "Arn" - ] - }, - "Family": "awsecsintegmyServiceTaskDefA3A33D18", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "myServiceTaskDefTaskRole1C1DE6CC", - "Arn" - ] - } - } - }, - "myServiceTaskDefwebLogGroupA1767F2C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "myServiceTaskDefExecutionRole618CD311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myServiceTaskDefwebLogGroupA1767F2C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571", - "Roles": [ - { - "Ref": "myServiceTaskDefExecutionRole618CD311" - } - ] - } - }, - "myServiceB0B6FAA0": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "myServicelb1listener1ECSTargetGroupweb80GroupC3F9339A" - } - }, - { - "ContainerName": "web", - "ContainerPort": 90, - "TargetGroupArn": { - "Ref": "myServicelb2listener2ECSTargetGroupweb90Group6841F924" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myServiceSecurityGroupC3B9D4E0", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "myServiceTaskDef7FB8322A" - } - }, - "DependsOn": [ - "myServicelb1listener1ECSTargetGroupweb80GroupC3F9339A", - "myServicelb1listener15ED0E805", - "myServicelb2listener2ECSTargetGroupweb90Group6841F924", - "myServicelb2listener2AA6970EB" - ] - }, - "myServiceSecurityGroupC3B9D4E0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/myService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Outputs": { - "myServiceLoadBalancerDNSlb1341EE21A": { - "Value": { - "Fn::GetAtt": [ - "myServicelb1FA8CBE12", - "DNSName" - ] - } - }, - "myServiceLoadBalancerDNSlb2DDCE46C8": { - "Value": { - "Fn::GetAtt": [ - "myServicelb2C84C7BCB", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-isolated.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-isolated.expected.json deleted file mode 100644 index b351c625b9a04..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-isolated.expected.json +++ /dev/null @@ -1,1204 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/24", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.1.0/24", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCIsolatedSubnet1SubnetEBD00FC6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.2.0/24", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/IsolatedSubnet1" - } - ] - } - }, - "VPCIsolatedSubnet1RouteTableEB156210": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/IsolatedSubnet1" - } - ] - } - }, - "VPCIsolatedSubnet1RouteTableAssociationA2D18F7C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCIsolatedSubnet1RouteTableEB156210" - }, - "SubnetId": { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - } - } - }, - "VPCIsolatedSubnet2Subnet4B1C8CAA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.3.0/24", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/IsolatedSubnet2" - } - ] - } - }, - "VPCIsolatedSubnet2RouteTable9B4F78DC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC/IsolatedSubnet2" - } - ] - } - }, - "VPCIsolatedSubnet2RouteTableAssociation7BF8E0EB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCIsolatedSubnet2RouteTable9B4F78DC" - }, - "SubnetId": { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VPCS3Endpoint18C9C7CA": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".s3" - ] - ] - }, - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "RouteTableIds": [ - { - "Ref": "VPCIsolatedSubnet1RouteTableEB156210" - }, - { - "Ref": "VPCIsolatedSubnet2RouteTable9B4F78DC" - } - ], - "VpcEndpointType": "Gateway" - } - }, - "VPCSqsEndpointSecurityGroupAE06A78D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-isolated/VPC/SqsEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "VPCSqsEndpoint9A40D77F": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".sqs" - ] - ] - }, - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "VPCSqsEndpointSecurityGroupAE06A78D", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - }, - { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - ], - "VpcEndpointType": "Interface" - } - }, - "VPCEcrEndpointSecurityGroup50ED8BA4": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-isolated/VPC/EcrEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "VPCEcrEndpointB4F98F37": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".ecr.api" - ] - ] - }, - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "VPCEcrEndpointSecurityGroup50ED8BA4", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - }, - { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - ], - "VpcEndpointType": "Interface" - } - }, - "VPCEcrImageEndpointSecurityGroup83621638": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-isolated/VPC/EcrImageEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "VPCEcrImageEndpointD55381DC": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".ecr.dkr" - ] - ] - }, - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "VPCEcrImageEndpointSecurityGroup83621638", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - }, - { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - ], - "VpcEndpointType": "Interface" - } - }, - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-isolated/VPC/CloudWatchLogsEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - ":443" - ] - ] - }, - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-isolated/VPC" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "VPCCloudWatchLogsEndpointE175AF65": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": { - "Fn::Join": [ - "", - [ - "com.amazonaws.", - { - "Ref": "AWS::Region" - }, - ".logs" - ] - ] - }, - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "PrivateDnsEnabled": true, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - }, - { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - ], - "VpcEndpointType": "Interface" - } - }, - "MyCustomSGDE27C661": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-isolated/MyCustomSG", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "IsolatedQueueServiceEcsProcessingDeadLetterQueue7CC1D07D": { - "Type": "AWS::SQS::Queue", - "Properties": { - "MessageRetentionPeriod": 1209600 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "IsolatedQueueServiceEcsProcessingQueueCCE172F1": { - "Type": "AWS::SQS::Queue", - "Properties": { - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingDeadLetterQueue7CC1D07D", - "Arn" - ] - }, - "maxReceiveCount": 3 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "IsolatedQueueServiceQueueProcessingTaskDefTaskRoleCFCB7511": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "IsolatedQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicyD52E156B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "IsolatedQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicyD52E156B", - "Roles": [ - { - "Ref": "IsolatedQueueServiceQueueProcessingTaskDefTaskRoleCFCB7511" - } - ] - } - }, - "IsolatedQueueServiceQueueProcessingTaskDef0F0CE105": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "QUEUE_NAME", - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "QueueName" - ] - } - } - ], - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:95cefedd43575452a70cdeeeceb0f1c5728fd58c9ff8e81e760c3dac33c46417" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "IsolatedQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupAEB959E6" - }, - "awslogs-stream-prefix": "IsolatedQueueService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "QueueProcessingContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "IsolatedQueueServiceQueueProcessingTaskDefExecutionRole1D7ACC77", - "Arn" - ] - }, - "Family": "awsecspatternsqueueisolatedIsolatedQueueServiceQueueProcessingTaskDef27DBAF49", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "IsolatedQueueServiceQueueProcessingTaskDefTaskRoleCFCB7511", - "Arn" - ] - } - } - }, - "IsolatedQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupAEB959E6": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "IsolatedQueueServiceQueueProcessingTaskDefExecutionRole1D7ACC77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "IsolatedQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicy5667D265": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "IsolatedQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupAEB959E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "IsolatedQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicy5667D265", - "Roles": [ - { - "Ref": "IsolatedQueueServiceQueueProcessingTaskDefExecutionRole1D7ACC77" - } - ] - } - }, - "IsolatedQueueServiceQueueProcessingFargateServiceE868AEE1": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "MyCustomSGDE27C661", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCIsolatedSubnet1SubnetEBD00FC6" - }, - { - "Ref": "VPCIsolatedSubnet2Subnet4B1C8CAA" - } - ] - } - }, - "TaskDefinition": { - "Ref": "IsolatedQueueServiceQueueProcessingTaskDef0F0CE105" - } - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetB06FD17D": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 2, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "/", - { - "Fn::GetAtt": [ - "IsolatedQueueServiceQueueProcessingFargateServiceE868AEE1", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling2B518D9D": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueisolatedIsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling8B2FB6C4", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetB06FD17D" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 50 - } - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy960D4BA1": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueisolatedIsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy5EFC8D1B", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetB06FD17D" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalUpperBound": 0, - "ScalingAdjustment": -1 - } - ] - } - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm88D1A0F9": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "LessThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy960D4BA1" - } - ], - "AlarmDescription": "Lower threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 0 - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyFAB35025": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueisolatedIsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy51E582BF", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetB06FD17D" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalLowerBound": 0, - "MetricIntervalUpperBound": 400, - "ScalingAdjustment": 1 - }, - { - "MetricIntervalLowerBound": 400, - "ScalingAdjustment": 5 - } - ] - } - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm351987F5": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "IsolatedQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyFAB35025" - } - ], - "AlarmDescription": "Upper threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 100 - }, - "DependsOn": [ - "VPCCloudWatchLogsEndpointE175AF65", - "VPCCloudWatchLogsEndpointSecurityGroup967DBC94", - "VPCEcrEndpointB4F98F37", - "VPCEcrEndpointSecurityGroup50ED8BA4", - "VPCEcrImageEndpointD55381DC", - "VPCEcrImageEndpointSecurityGroup83621638", - "VPCSqsEndpoint9A40D77F", - "VPCSqsEndpointSecurityGroupAE06A78D" - ] - }, - "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { - "Type": "AWS::ECS::Cluster" - } - }, - "Outputs": { - "IsolatedQueueServiceSQSDeadLetterQueue43D346B9": { - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingDeadLetterQueue7CC1D07D", - "QueueName" - ] - } - }, - "IsolatedQueueServiceSQSDeadLetterQueueArnCE7C60F2": { - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingDeadLetterQueue7CC1D07D", - "Arn" - ] - } - }, - "IsolatedQueueServiceSQSQueueA65E2641": { - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "QueueName" - ] - } - }, - "IsolatedQueueServiceSQSQueueArn571FDB86": { - "Value": { - "Fn::GetAtt": [ - "IsolatedQueueServiceEcsProcessingQueueCCE172F1", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-public.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-public.expected.json deleted file mode 100644 index be5262a5f25ce..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-public.expected.json +++ /dev/null @@ -1,1012 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277": { - "Type": "AWS::SQS::Queue", - "Properties": { - "MessageRetentionPeriod": 1209600 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PublicQueueServiceEcsProcessingQueue84CD309D": { - "Type": "AWS::SQS::Queue", - "Properties": { - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", - "Arn" - ] - }, - "maxReceiveCount": 3 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "Roles": [ - { - "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" - } - ] - } - }, - "PublicQueueServiceQueueProcessingTaskDef858327F6": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "QUEUE_NAME", - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "QueueName" - ] - } - } - ], - "Essential": true, - "HealthCheck": { - "Command": [ - "CMD-SHELL", - "curl -f http://localhost/ || exit 1" - ], - "Interval": 6, - "Retries": 10, - "Timeout": 5 - }, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:95cefedd43575452a70cdeeeceb0f1c5728fd58c9ff8e81e760c3dac33c46417" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" - }, - "awslogs-stream-prefix": "PublicQueueService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "QueueProcessingContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", - "Arn" - ] - }, - "Family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", - "Arn" - ] - } - } - }, - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", - "Roles": [ - { - "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" - } - ] - } - }, - "PublicQueueServiceQueueProcessingFargateService7DE3D65B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "ENABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - ] - } - }, - "TaskDefinition": { - "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" - } - } - }, - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 2, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "/", - { - "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateService7DE3D65B", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling559C41BF": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScalingF36D44B7", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 50 - } - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalUpperBound": 0, - "ScalingAdjustment": -1 - } - ] - } - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "LessThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" - } - ], - "AlarmDescription": "Lower threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 0 - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalLowerBound": 0, - "MetricIntervalUpperBound": 400, - "ScalingAdjustment": 1 - }, - { - "MetricIntervalLowerBound": 400, - "ScalingAdjustment": 5 - } - ] - } - } - }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" - } - ], - "AlarmDescription": "Upper threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 100 - } - }, - "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { - "Type": "AWS::ECS::Cluster" - } - }, - "Outputs": { - "PublicQueueServiceSQSDeadLetterQueueBCE86DBC": { - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", - "QueueName" - ] - } - }, - "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4": { - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", - "Arn" - ] - } - }, - "PublicQueueServiceSQSQueue4D3FBD5C": { - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "QueueName" - ] - } - }, - "PublicQueueServiceSQSQueueArn38014FDC": { - "Value": { - "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service.expected.json deleted file mode 100644 index 9746768edf9fe..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service.expected.json +++ /dev/null @@ -1,841 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-patterns-queue/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B": { - "Type": "AWS::SQS::Queue", - "Properties": { - "MessageRetentionPeriod": 1209600 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueueProcessingServiceEcsProcessingQueue552F0B37": { - "Type": "AWS::SQS::Queue", - "Properties": { - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "Arn" - ] - }, - "maxReceiveCount": 3 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefTaskRoleDefaultPolicyAE808B19": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "QueueProcessingServiceQueueProcessingTaskDefTaskRoleDefaultPolicyAE808B19", - "Roles": [ - { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6" - } - ] - } - }, - "QueueProcessingServiceQueueProcessingTaskDef4982F68B": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "QUEUE_NAME", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:95cefedd43575452a70cdeeeceb0f1c5728fd58c9ff8e81e760c3dac33c46417" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A" - }, - "awslogs-stream-prefix": "QueueProcessingService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "QueueProcessingContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985", - "Arn" - ] - }, - "Family": "awsecspatternsqueueQueueProcessingServiceQueueProcessingTaskDef2D9F8C2B", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefTaskRole782B79A6", - "Arn" - ] - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "QueueProcessingServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyA83D332D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCC92448A", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "QueueProcessingServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyA83D332D", - "Roles": [ - { - "Ref": "QueueProcessingServiceQueueProcessingTaskDefExecutionRole37838985" - } - ] - } - }, - "QueueProcessingServiceQueueProcessingFargateService0340DB9F": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingFargateServiceSecurityGroup8FDF413D", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "TaskDefinition": { - "Ref": "QueueProcessingServiceQueueProcessingTaskDef4982F68B" - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceSecurityGroup8FDF413D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-patterns-queue/QueueProcessingService/QueueProcessingFargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 2, - "MinCapacity": 0, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" - }, - "/", - { - "Fn::GetAtt": [ - "QueueProcessingServiceQueueProcessingFargateService0340DB9F", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling330150E9": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling374CE648", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 50 - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy332E2644": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy74582401", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalUpperBound": 0, - "ScalingAdjustment": -1 - } - ] - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm20C30A06": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "LessThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy332E2644" - } - ], - "AlarmDescription": "Lower threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 0 - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy84DD739A": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecspatternsqueueQueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy23C5F983", - "PolicyType": "StepScaling", - "ScalingTargetId": { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetA9D54444" - }, - "StepScalingPolicyConfiguration": { - "AdjustmentType": "ChangeInCapacity", - "MetricAggregationType": "Maximum", - "StepAdjustments": [ - { - "MetricIntervalLowerBound": 0, - "MetricIntervalUpperBound": 400, - "ScalingAdjustment": 1 - }, - { - "MetricIntervalLowerBound": 400, - "ScalingAdjustment": 5 - } - ] - } - } - }, - "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm2660BEDF": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "AlarmActions": [ - { - "Ref": "QueueProcessingServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy84DD739A" - } - ], - "AlarmDescription": "Upper threshold scaling alarm", - "Dimensions": [ - { - "Name": "QueueName", - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - } - ], - "MetricName": "ApproximateNumberOfMessagesVisible", - "Namespace": "AWS/SQS", - "Period": 300, - "Statistic": "Maximum", - "Threshold": 100 - } - }, - "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { - "Type": "AWS::ECS::Cluster" - } - }, - "Outputs": { - "QueueProcessingServiceSQSDeadLetterQueueE9058015": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "QueueName" - ] - } - }, - "QueueProcessingServiceSQSDeadLetterQueueArnF7C6D3A8": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingDeadLetterQueueD47A7C6B", - "Arn" - ] - } - }, - "QueueProcessingServiceSQSQueue1AD9CD9C": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "QueueName" - ] - } - }, - "QueueProcessingServiceSQSQueueArn8C4AE4AE": { - "Value": { - "Fn::GetAtt": [ - "QueueProcessingServiceEcsProcessingQueue552F0B37", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json deleted file mode 100644 index f0540fcb9044b..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.expected.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-fargate-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "ScheduledFargateTaskScheduledEventRule2B79E34F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - }, - "EcsParameters": { - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsVpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefSecurityGroupE075BC19", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - } - }, - "TaskCount": 2, - "TaskDefinitionArn": { - "Ref": "ScheduledFargateTaskScheduledTaskDef521FA675" - } - }, - "Id": "Target0", - "Input": "{}", - "RoleArn": { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefEventsRole6CE19522", - "Arn" - ] - } - } - ] - } - }, - "ScheduledFargateTaskScheduledTaskDefTaskRoleD0FF16AD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledFargateTaskScheduledTaskDef521FA675": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "TRIGGER", - "Value": "CloudWatch Events" - } - ], - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:0a3355be12051c9984bf2b0b2bba4e6ea535968e5b6e7396449701732fe5ed14" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "ScheduledFargateTaskScheduledTaskDefScheduledContainerLogGroup4134B16C" - }, - "awslogs-stream-prefix": "ScheduledFargateTask", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "ScheduledContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefExecutionRoleD37356D5", - "Arn" - ] - }, - "Family": "awsfargateintegScheduledFargateTaskScheduledTaskDefB0AD4F70", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefTaskRoleD0FF16AD", - "Arn" - ] - } - } - }, - "ScheduledFargateTaskScheduledTaskDefScheduledContainerLogGroup4134B16C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ScheduledFargateTaskScheduledTaskDefExecutionRoleD37356D5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledFargateTaskScheduledTaskDefExecutionRoleDefaultPolicy3E3AEE49": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefScheduledContainerLogGroup4134B16C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ScheduledFargateTaskScheduledTaskDefExecutionRoleDefaultPolicy3E3AEE49", - "Roles": [ - { - "Ref": "ScheduledFargateTaskScheduledTaskDefExecutionRoleD37356D5" - } - ] - } - }, - "ScheduledFargateTaskScheduledTaskDefEventsRole6CE19522": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ScheduledFargateTaskScheduledTaskDefEventsRoleDefaultPolicy4903ED72": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Ref": "ScheduledFargateTaskScheduledTaskDef521FA675" - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefExecutionRoleD37356D5", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "ScheduledFargateTaskScheduledTaskDefTaskRoleD0FF16AD", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ScheduledFargateTaskScheduledTaskDefEventsRoleDefaultPolicy4903ED72", - "Roles": [ - { - "Ref": "ScheduledFargateTaskScheduledTaskDefEventsRole6CE19522" - } - ] - } - }, - "ScheduledFargateTaskScheduledTaskDefSecurityGroupE075BC19": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-fargate-integ/ScheduledFargateTask/ScheduledTaskDef/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.special-listener.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.special-listener.expected.json deleted file mode 100644 index 1af60f7eaf55c..0000000000000 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.special-listener.expected.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::ECS::Cluster" - }, - "FargateNlbServiceLBC7004B25": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "FargateNlbServiceLBPublicListener91199F13": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "FargateNlbServiceLBPublicListenerECSGroup7501571D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "FargateNlbServiceLBC7004B25" - }, - "Port": 2015, - "Protocol": "TCP" - } - }, - "FargateNlbServiceLBPublicListenerECSGroup7501571D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 2015, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateNlbServiceTaskDefTaskRoleD95D755C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateNlbServiceTaskDef03021E9A": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "abiosoft/caddy", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "FargateNlbServiceTaskDefwebLogGroup3547138D" - }, - "awslogs-stream-prefix": "FargateNlbService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 2015, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "FargateNlbServiceTaskDefExecutionRole5E165F68", - "Arn" - ] - }, - "Family": "awsecsintegFargateNlbServiceTaskDef168F9D76", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "FargateNlbServiceTaskDefTaskRoleD95D755C", - "Arn" - ] - } - } - }, - "FargateNlbServiceTaskDefwebLogGroup3547138D": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FargateNlbServiceTaskDefExecutionRole5E165F68": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateNlbServiceTaskDefExecutionRoleDefaultPolicyC8326D5A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateNlbServiceTaskDefwebLogGroup3547138D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateNlbServiceTaskDefExecutionRoleDefaultPolicyC8326D5A", - "Roles": [ - { - "Ref": "FargateNlbServiceTaskDefExecutionRole5E165F68" - } - ] - } - }, - "FargateNlbService65A9DBF8": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 2015, - "TargetGroupArn": { - "Ref": "FargateNlbServiceLBPublicListenerECSGroup7501571D" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateNlbServiceSecurityGroup4718761F", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "FargateNlbServiceTaskDef03021E9A" - } - }, - "DependsOn": [ - "FargateNlbServiceLBPublicListenerECSGroup7501571D", - "FargateNlbServiceLBPublicListener91199F13" - ] - }, - "FargateNlbServiceSecurityGroup4718761F": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/FargateNlbService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateAlbServiceLBA7128551": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateAlbServiceLBSecurityGroupE10F3DF3", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "FargateAlbServiceLBSecurityGroupE10F3DF3": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegFargateAlbServiceLBA9E1FE68", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 2015", - "FromPort": 2015, - "IpProtocol": "tcp", - "ToPort": 2015 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateAlbServiceLBSecurityGrouptoawsecsintegFargateAlbServiceSecurityGroup0B11760820157EB4F873": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "FargateAlbServiceLBSecurityGroupE10F3DF3", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "FargateAlbServiceSecurityGroupF5AFFC6E", - "GroupId" - ] - }, - "FromPort": 2015, - "ToPort": 2015 - } - }, - "FargateAlbServiceLBPublicListener9C1349BE": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "FargateAlbServiceLBPublicListenerECSGroupB3826700" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "FargateAlbServiceLBA7128551" - }, - "Port": 2015, - "Protocol": "HTTP" - } - }, - "FargateAlbServiceLBPublicListenerECSGroupB3826700": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateAlbServiceTaskDefTaskRoleC9259C01": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateAlbServiceTaskDef291471C0": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "abiosoft/caddy", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "FargateAlbServiceTaskDefwebLogGroup0BC14B46" - }, - "awslogs-stream-prefix": "FargateAlbService", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 2015, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "FargateAlbServiceTaskDefExecutionRole5FC6F0D2", - "Arn" - ] - }, - "Family": "awsecsintegFargateAlbServiceTaskDef1C0274E3", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "FargateAlbServiceTaskDefTaskRoleC9259C01", - "Arn" - ] - } - } - }, - "FargateAlbServiceTaskDefwebLogGroup0BC14B46": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FargateAlbServiceTaskDefExecutionRole5FC6F0D2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateAlbServiceTaskDefExecutionRoleDefaultPolicyD03CA136": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateAlbServiceTaskDefwebLogGroup0BC14B46", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateAlbServiceTaskDefExecutionRoleDefaultPolicyD03CA136", - "Roles": [ - { - "Ref": "FargateAlbServiceTaskDefExecutionRole5FC6F0D2" - } - ] - } - }, - "FargateAlbServiceB466E994": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "ClusterEB0386A7" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 2015, - "TargetGroupArn": { - "Ref": "FargateAlbServiceLBPublicListenerECSGroupB3826700" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateAlbServiceSecurityGroupF5AFFC6E", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "FargateAlbServiceTaskDef291471C0" - } - }, - "DependsOn": [ - "FargateAlbServiceLBPublicListenerECSGroupB3826700", - "FargateAlbServiceLBPublicListener9C1349BE" - ] - }, - "FargateAlbServiceSecurityGroupF5AFFC6E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/FargateAlbService/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateAlbServiceSecurityGroupfromawsecsintegFargateAlbServiceLBSecurityGroup2B85C6B72015203217AE": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 2015, - "GroupId": { - "Fn::GetAtt": [ - "FargateAlbServiceSecurityGroupF5AFFC6E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "FargateAlbServiceLBSecurityGroupE10F3DF3", - "GroupId" - ] - }, - "ToPort": 2015 - } - } - }, - "Outputs": { - "FargateNlbServiceLoadBalancerDNS20395DB7": { - "Value": { - "Fn::GetAtt": [ - "FargateNlbServiceLBC7004B25", - "DNSName" - ] - } - }, - "FargateAlbServiceLoadBalancerDNSA91678BC": { - "Value": { - "Fn::GetAtt": [ - "FargateAlbServiceLBA7128551", - "DNSName" - ] - } - }, - "FargateAlbServiceServiceURL101F25CC": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "FargateAlbServiceLBA7128551", - "DNSName" - ] - } - ] - ] - } - }, - "AlbDnsName": { - "Value": { - "Fn::GetAtt": [ - "FargateAlbServiceLBA7128551", - "DNSName" - ] - } - }, - "NlbDnsName": { - "Value": { - "Fn::GetAtt": [ - "FargateNlbServiceLBC7004B25", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.app-mesh-proxy-config.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.app-mesh-proxy-config.expected.json deleted file mode 100644 index f7b2939f2f34d..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.app-mesh-proxy-config.expected.json +++ /dev/null @@ -1,962 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web" - }, - { - "Essential": true, - "Image": "envoyproxy/envoy:v1.16.2", - "Memory": 256, - "Name": "envoy" - } - ], - "Family": "awsecsintegTaskDef6FDFB69A", - "IpcMode": "host", - "NetworkMode": "awsvpc", - "PidMode": "task", - "ProxyConfiguration": { - "ContainerName": "envoy", - "ProxyConfigurationProperties": [ - { - "Name": "IgnoredUID", - "Value": "1337" - }, - { - "Name": "ProxyIngressPort", - "Value": "15000" - }, - { - "Name": "ProxyEgressPort", - "Value": "15001" - }, - { - "Name": "AppPorts", - "Value": "9080,9081" - }, - { - "Name": "EgressIgnoredIPs", - "Value": "169.254.170.2,169.254.169.254" - } - ], - "Type": "APPMESH" - }, - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "ServiceSecurityGroupC96ED6A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.bottlerocket.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.bottlerocket.expected.json deleted file mode 100644 index 5a406ea170864..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.bottlerocket.expected.json +++ /dev/null @@ -1,826 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterbottlerocketasgInstanceSecurityGroupD754BC23": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterbottlerocketasgInstanceRole96AA2ACF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonSSMManagedInstanceCore" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ] - } - }, - "EcsClusterbottlerocketasgInstanceRoleDefaultPolicy8523C598": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterbottlerocketasgInstanceRoleDefaultPolicy8523C598", - "Roles": [ - { - "Ref": "EcsClusterbottlerocketasgInstanceRole96AA2ACF" - } - ] - } - }, - "EcsClusterbottlerocketasgInstanceProfile22A89B9D": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterbottlerocketasgInstanceRole96AA2ACF" - } - ] - } - }, - "EcsClusterbottlerocketasgLaunchConfig644AD24C": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsservicebottlerocketawsecs1x8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "c5.large", - "IamInstanceProfile": { - "Ref": "EcsClusterbottlerocketasgInstanceProfile22A89B9D" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgInstanceSecurityGroupD754BC23", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "\n[settings.ecs]\ncluster = \"", - { - "Ref": "EcsCluster97242B84" - }, - "\"" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterbottlerocketasgInstanceRoleDefaultPolicy8523C598", - "EcsClusterbottlerocketasgInstanceRole96AA2ACF" - ] - }, - "EcsClusterbottlerocketasgASGCB222A6E": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "2", - "LaunchConfigurationName": { - "Ref": "EcsClusterbottlerocketasgLaunchConfig644AD24C" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ] - } - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterbottlerocketasgASGCB222A6E" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", - "Roles": [ - { - "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" - } - ] - } - }, - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" - ] - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketEcsClusterbottlerocketasgLifecycleHookDrainHookTopicD05837A873EBB93D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - } - } - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionTopic1953D6F0": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", - "Arn" - ] - } - } - }, - "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ] - } - }, - "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDE4D94EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" - } - ] - } - }, - "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy95E06EDB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy95E06EDB", - "Roles": [ - { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDE4D94EB" - } - ] - } - }, - "EcsClusterbottlerocketasgLifecycleHookDrainHook59C31812": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterbottlerocketasgASGCB222A6E" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDE4D94EB", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy95E06EDB", - "EcsClusterbottlerocketasgLifecycleHookDrainHookRoleDE4D94EB" - ] - } - }, - "Parameters": { - "SsmParameterValueawsservicebottlerocketawsecs1x8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/bottlerocket/aws-ecs-1/x86_64/latest/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.capacity-provider.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.capacity-provider.expected.json deleted file mode 100644 index 49a82b3c29e9d..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.capacity-provider.expected.json +++ /dev/null @@ -1,926 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EC2CPClusterD5F0FD32": { - "Type": "AWS::ECS::Cluster" - }, - "EC2CPCluster4CFED4DD": { - "Type": "AWS::ECS::ClusterCapacityProviderAssociations", - "Properties": { - "CapacityProviders": [ - "FARGATE", - "FARGATE_SPOT", - { - "Ref": "EC2CapacityProvider5A2E35CD" - } - ], - "Cluster": { - "Ref": "EC2CPClusterD5F0FD32" - }, - "DefaultCapacityProviderStrategy": [] - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "MemoryReservation": 256, - "Name": "web" - } - ], - "Family": "integec2capacityproviderTaskDefA6140A6B", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ASGInstanceSecurityGroup0525485D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-ec2-capacity-provider/ASG/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ASGInstanceRoleE263A41B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ] - } - }, - "ASGInstanceRoleDefaultPolicy7636D8BF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ASGInstanceRoleDefaultPolicy7636D8BF", - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGInstanceProfile0A2834D7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ASGInstanceRoleE263A41B" - } - ] - } - }, - "ASGLaunchConfigC00AF12B": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ASGInstanceProfile0A2834D7" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ASGInstanceSecurityGroup0525485D", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EC2CPClusterD5F0FD32" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "ASGInstanceRoleDefaultPolicy7636D8BF", - "ASGInstanceRoleE263A41B" - ] - }, - "ASG46ED3070": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ASGLaunchConfigC00AF12B" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "integ-ec2-capacity-provider/ASG" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ASGDrainECSHookFunctionServiceRoleC12963BB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ] - } - }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "Roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EC2CPClusterD5F0FD32" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegec2capacityproviderASGLifecycleHookDrainHookTopic4714B3C1EB63E78F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - }, - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - } - } - }, - "ASGLifecycleHookDrainHookTopicA8AD4ACB": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ] - } - }, - "ASGLifecycleHookDrainHookRoleD640316C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" - } - ] - } - }, - "ASGLifecycleHookDrainHookRoleDefaultPolicy3EEFDE57": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ASGLifecycleHookDrainHookRoleDefaultPolicy3EEFDE57", - "Roles": [ - { - "Ref": "ASGLifecycleHookDrainHookRoleD640316C" - } - ] - } - }, - "ASGLifecycleHookDrainHookFE4AFEBE": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "ASG46ED3070" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - }, - "RoleARN": { - "Fn::GetAtt": [ - "ASGLifecycleHookDrainHookRoleD640316C", - "Arn" - ] - } - }, - "DependsOn": [ - "ASGLifecycleHookDrainHookRoleDefaultPolicy3EEFDE57", - "ASGLifecycleHookDrainHookRoleD640316C" - ] - }, - "EC2CapacityProvider5A2E35CD": { - "Type": "AWS::ECS::CapacityProvider", - "Properties": { - "AutoScalingGroupProvider": { - "AutoScalingGroupArn": { - "Ref": "ASG46ED3070" - }, - "ManagedScaling": { - "Status": "ENABLED", - "TargetCapacity": 100 - }, - "ManagedTerminationProtection": "DISABLED" - } - } - }, - "EC2Service5392EF94": { - "Type": "AWS::ECS::Service", - "Properties": { - "CapacityProviderStrategy": [ - { - "CapacityProvider": { - "Ref": "EC2CapacityProvider5A2E35CD" - }, - "Weight": 1 - } - ], - "Cluster": { - "Ref": "EC2CPClusterD5F0FD32" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.clb-host-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.clb-host-nw.expected.json deleted file mode 100644 index 2443f10d52c04..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.clb-host-nw.expected.json +++ /dev/null @@ -1,1010 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegLBSecurityGroupC30F5EB480A6611BD8": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Port 80 LB to fleet", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegTaskDef6FDFB69A", - "IpcMode": "host", - "NetworkMode": "host", - "PidMode": "task", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "EC2", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "LoadBalancerName": { - "Ref": "LB8A12904C" - } - } - ], - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/LB/SecurityGroup", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Default rule allow on 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "LBSecurityGrouptoawsecsintegEcsClusterDefaultAutoScalingGroupInstanceSecurityGroupF03D24578019AB9BA2": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Port 80 LB to fleet", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancing::LoadBalancer", - "Properties": { - "Listeners": [ - { - "InstancePort": "80", - "InstanceProtocol": "http", - "LoadBalancerPort": "80", - "Protocol": "http" - } - ], - "CrossZone": true, - "Scheme": "internal", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - }, - "Outputs": { - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.cloudmap-container-port.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.cloudmap-container-port.expected.json deleted file mode 100644 index 6ff4de4f72d44..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.cloudmap-container-port.expected.json +++ /dev/null @@ -1,792 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcpubSubnet1Subnet410C08CF": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/24", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "pub" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/pubSubnet1" - } - ] - } - }, - "VpcpubSubnet1RouteTableE0483FDA": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/pubSubnet1" - } - ] - } - }, - "VpcpubSubnet1RouteTableAssociation68036D8C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcpubSubnet1RouteTableE0483FDA" - }, - "SubnetId": { - "Ref": "VpcpubSubnet1Subnet410C08CF" - } - } - }, - "VpcpubSubnet1DefaultRouteF020A9EF": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcpubSubnet1RouteTableE0483FDA" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcpubSubnet2Subnet44A37A0D": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.1.0/24", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "pub" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/pubSubnet2" - } - ] - } - }, - "VpcpubSubnet2RouteTable5A29DF40": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/pubSubnet2" - } - ] - } - }, - "VpcpubSubnet2RouteTableAssociationFB826925": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcpubSubnet2RouteTable5A29DF40" - }, - "SubnetId": { - "Ref": "VpcpubSubnet2Subnet44A37A0D" - } - } - }, - "VpcpubSubnet2DefaultRouteE6D48BA4": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcpubSubnet2RouteTable5A29DF40" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "FargateClustercapacityInstanceSecurityGroupCB3AEDA1": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/FargateCluster/capacity/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:32768-61000", - "FromPort": 32768, - "IpProtocol": "tcp", - "ToPort": 61000 - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateClustercapacityInstanceRoleBE253D2D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ] - } - }, - "FargateClustercapacityInstanceRoleDefaultPolicy90B38927": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClustercapacityInstanceRoleDefaultPolicy90B38927", - "Roles": [ - { - "Ref": "FargateClustercapacityInstanceRoleBE253D2D" - } - ] - } - }, - "FargateClustercapacityInstanceProfile8294296C": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FargateClustercapacityInstanceRoleBE253D2D" - } - ] - } - }, - "FargateClustercapacityLaunchConfig9B95CCB7": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.micro", - "IamInstanceProfile": { - "Ref": "FargateClustercapacityInstanceProfile8294296C" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateClustercapacityInstanceSecurityGroupCB3AEDA1", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "FargateCluster7CCD5F93" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "FargateClustercapacityInstanceRoleDefaultPolicy90B38927", - "FargateClustercapacityInstanceRoleBE253D2D" - ] - }, - "FargateClustercapacityASGE4034F96": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "DesiredCapacity": "1", - "LaunchConfigurationName": { - "Ref": "FargateClustercapacityLaunchConfig9B95CCB7" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcpubSubnet1Subnet410C08CF" - }, - { - "Ref": "VpcpubSubnet2Subnet44A37A0D" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ] - } - }, - "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "FargateClustercapacityASGE4034F96" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", - "Roles": [ - { - "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" - } - ] - } - }, - "FargateClustercapacityDrainECSHookFunction3E60E6D0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "FargateCluster7CCD5F93" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", - "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" - ] - }, - "FargateClustercapacityDrainECSHookFunctionAllowInvokeawsecsintegFargateClustercapacityLifecycleHookDrainHookTopic07C1229F3B6FF246": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunction3E60E6D0", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - } - } - }, - "FargateClustercapacityDrainECSHookFunctionTopic7D6C4884": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - }, - "Endpoint": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunction3E60E6D0", - "Arn" - ] - } - } - }, - "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ] - } - }, - "FargateClustercapacityLifecycleHookDrainHookRoleDD26E39B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" - } - ] - } - }, - "FargateClustercapacityLifecycleHookDrainHookRoleDefaultPolicyACCDDB70": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClustercapacityLifecycleHookDrainHookRoleDefaultPolicyACCDDB70", - "Roles": [ - { - "Ref": "FargateClustercapacityLifecycleHookDrainHookRoleDD26E39B" - } - ] - } - }, - "FargateClustercapacityLifecycleHookDrainHook8AEDE53B": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FargateClustercapacityASGE4034F96" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - }, - "RoleARN": { - "Fn::GetAtt": [ - "FargateClustercapacityLifecycleHookDrainHookRoleDD26E39B", - "Arn" - ] - } - }, - "DependsOn": [ - "FargateClustercapacityLifecycleHookDrainHookRoleDefaultPolicyACCDDB70", - "FargateClustercapacityLifecycleHookDrainHookRoleDD26E39B" - ] - }, - "FargateClusterDefaultServiceDiscoveryNamespace04381E1E": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "aws-ecs-integ", - "Vpc": { - "Ref": "Vpc8378EB38" - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "nginx", - "Memory": 512, - "MemoryReservation": 32, - "Name": "nginx", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 0, - "Protocol": "tcp" - } - ] - }, - { - "Environment": [ - { - "Name": "PORT", - "Value": "81" - } - ], - "Essential": true, - "Image": "nathanpeck/name", - "Memory": 512, - "MemoryReservation": 32, - "Name": "name", - "PortMappings": [ - { - "ContainerPort": 81, - "HostPort": 0, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegTaskDef6FDFB69A", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "DesiredCount": 3, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "SchedulingStrategy": "REPLICA", - "ServiceRegistries": [ - { - "ContainerName": "name", - "ContainerPort": 81, - "RegistryArn": { - "Fn::GetAtt": [ - "ServiceCloudmapService046058A4", - "Arn" - ] - } - } - ], - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "ServiceCloudmapService046058A4": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 60, - "Type": "SRV" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "FargateClusterDefaultServiceDiscoveryNamespace04381E1E", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "HealthCheckCustomConfig": { - "FailureThreshold": 1 - }, - "NamespaceId": { - "Fn::GetAtt": [ - "FargateClusterDefaultServiceDiscoveryNamespace04381E1E", - "Id" - ] - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json deleted file mode 100644 index 875db62f1a654..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json +++ /dev/null @@ -1,1565 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - }, - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:f8f0a91c", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "ExecutionRole605A040B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucketLocation", - "s3:GetObject" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "s3Policy" - } - ] - } - }, - "TaskDefinitionTaskRoleFD40A61D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefinitionB36D86D9": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "EnvironmentFiles": [ - { - "Type": "s3", - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15" - } - ] - } - ] - } - ] - ] - } - }, - { - "Type": "s3", - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "Bucket83908E77" - }, - "/test-envfile.env" - ] - ] - } - } - ], - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "Container" - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "ExecutionRole605A040B", - "Arn" - ] - }, - "Family": "awsecsintegTaskDefinition11DF163D", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefinitionTaskRoleFD40A61D", - "Arn" - ] - } - } - }, - "EnvFileDeploymentAwsCliLayerA8FC897D": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "EnvFileDeploymentCustomResourceDBE78DE4": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Bucket83908E77" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "EnvFileDeploymentAwsCliLayerA8FC897D" - } - ], - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - ] - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDefinitionB36D86D9" - } - } - }, - "ServiceSecurityGroupC96ED6A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7": { - "Type": "String", - "Description": "S3 bucket for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D": { - "Type": "String", - "Description": "S3 key for asset version \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daArtifactHashD85D28D8": { - "Type": "String", - "Description": "Artifact hash for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472": { - "Type": "String", - "Description": "S3 bucket for asset \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" - }, - "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3VersionKeyBC7CFB0C": { - "Type": "String", - "Description": "S3 key for asset version \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" - }, - "AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aArtifactHash4253F7E5": { - "Type": "String", - "Description": "Artifact hash for asset \"972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64a\"" - }, - "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3Bucket7B2069B7": { - "Type": "String", - "Description": "S3 bucket for asset \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" - }, - "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dS3VersionKey40E12C15": { - "Type": "String", - "Description": "S3 key for asset version \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" - }, - "AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dArtifactHashC2522C05": { - "Type": "String", - "Description": "Artifact hash for asset \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\"" - }, - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.exec-command.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.exec-command.expected.json deleted file mode 100644 index 7e4e0f4fb0eb4..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.exec-command.expected.json +++ /dev/null @@ -1,1148 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "KmsKey46693ADD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt*", - "kms:Describe*", - "kms:Encrypt*", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Condition": { - "ArnLike": { - "kms:EncryptionContext:aws:logs:arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":*" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "logs.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "KmsKeyId": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "EcsExecBucket4F468651": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Ec2ClusterEE43E89D": { - "Type": "AWS::ECS::Cluster", - "Properties": { - "Configuration": { - "ExecuteCommandConfiguration": { - "KmsKeyId": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "LogConfiguration": { - "CloudWatchEncryptionEnabled": true, - "CloudWatchLogGroupName": { - "Ref": "LogGroupF5B46931" - }, - "S3BucketName": { - "Ref": "EcsExecBucket4F468651" - }, - "S3EncryptionEnabled": true, - "S3KeyPrefix": "exec-output" - }, - "Logging": "OVERRIDE" - } - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceSecurityGroup149B0A9E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceProfileDB232471": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLaunchConfig7B2FED3A": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceProfileDB232471" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupInstanceSecurityGroup149B0A9E", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "Ec2ClusterEE43E89D" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD", - "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLaunchConfig7B2FED3A" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "Ec2ClusterEE43E89D" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegexeccommandEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic05F8C92983E1AD32": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - }, - "Endpoint": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHook5CB1467E": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - }, - "RoleARN": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7", - "Arn" - ] - } - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B", - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefTaskRoleDefaultPolicyA592CB18": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DescribeLogGroups", - "s3:GetBucketLocation", - "ssmmessages:CreateControlChannel", - "ssmmessages:CreateDataChannel", - "ssmmessages:OpenControlChannel", - "ssmmessages:OpenDataChannel" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:GenerateDataKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - } - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "LogGroupF5B46931" - }, - ":*" - ] - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "EcsExecBucket4F468651" - }, - "/*" - ] - ] - } - }, - { - "Action": "s3:GetEncryptionConfiguration", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "EcsExecBucket4F468651" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefTaskRoleDefaultPolicyA592CB18", - "Roles": [ - { - "Ref": "TaskDefTaskRole1EDB4A67" - } - ] - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web" - } - ], - "Family": "awsecsintegexeccommandTaskDef44709274", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "Ec2Service04A33183": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "Ec2ClusterEE43E89D" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "EnableExecuteCommand": true, - "LaunchType": "EC2", - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.firelens-s3-config.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.firelens-s3-config.expected.json deleted file mode 100644 index aca6607f04d70..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.firelens-s3-config.expected.json +++ /dev/null @@ -1,1172 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "FirelensConfiguration": { - "Options": { - "enable-ecs-log-metadata": "false", - "config-file-type": "s3", - "config-file-value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3Bucket4E939944" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3VersionKeyF30A2E72" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3VersionKeyF30A2E72" - } - ] - } - ] - } - ] - ] - } - }, - "Type": "fluentbit" - }, - "Image": { - "Ref": "SsmParameterValueawsserviceawsforfluentbit210C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDeflogrouterLogGroup2684E4A8" - }, - "awslogs-stream-prefix": "firelens", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "MemoryReservation": 50, - "Name": "log_router" - }, - { - "Essential": true, - "Image": "nginx", - "LogConfiguration": { - "LogDriver": "awsfirelens", - "Options": { - "Name": "cloudwatch", - "region": { - "Ref": "AWS::Region" - }, - "log_group_name": "ecs-integ-test", - "auto_create_group": "true", - "log_stream_prefix": "nginx" - } - }, - "Memory": 256, - "Name": "nginx", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegTaskDef6FDFB69A", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetAuthorizationToken", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDeflogrouterLogGroup2684E4A8", - "Arn" - ] - } - }, - { - "Action": "s3:GetObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3Bucket4E939944" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3VersionKeyF30A2E72" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3VersionKeyF30A2E72" - } - ] - } - ] - } - ] - ] - } - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3Bucket4E939944" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "TaskDeflogrouterLogGroup2684E4A8": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "websvcsgA808F313": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/websvc-sg", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "websvcsgA808F313", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - }, - "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3Bucket4E939944": { - "Type": "String", - "Description": "S3 bucket for asset \"2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61\"" - }, - "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61S3VersionKeyF30A2E72": { - "Type": "String", - "Description": "S3 key for asset version \"2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61\"" - }, - "AssetParameters2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61ArtifactHashB4EEDAF3": { - "Type": "String", - "Description": "Artifact hash for asset \"2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61\"" - }, - "SsmParameterValueawsserviceawsforfluentbit210C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/aws-for-fluent-bit/2.1.0" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton-bottlerocket.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton-bottlerocket.expected.json deleted file mode 100644 index 6dfbe283bb327..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton-bottlerocket.expected.json +++ /dev/null @@ -1,858 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClustergravitonclusterInstanceSecurityGroup0187E9BB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/graviton-cluster/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClustergravitonclusterInstanceRole0D0E0F94": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonSSMManagedInstanceCore" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterInstanceRole0D0E0F94" - } - ] - } - }, - "EcsClustergravitonclusterInstanceProfileD1BBFAAE": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClustergravitonclusterInstanceRole0D0E0F94" - } - ] - } - }, - "EcsClustergravitonclusterLaunchConfig64183B57": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsservicebottlerocketawsecs1arm64latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "c6g.large", - "IamInstanceProfile": { - "Ref": "EcsClustergravitonclusterInstanceProfileD1BBFAAE" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClustergravitonclusterInstanceSecurityGroup0187E9BB", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "\n[settings.ecs]\ncluster = \"", - { - "Ref": "EcsCluster97242B84" - }, - "\"" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F", - "EcsClustergravitonclusterInstanceRole0D0E0F94" - ] - }, - "EcsClustergravitonclusterASG869F3168": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "2", - "LaunchConfigurationName": { - "Ref": "EcsClustergravitonclusterLaunchConfig64183B57" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClustergravitonclusterASG869F3168" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - } - ] - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - ] - }, - "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - } - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookA1F91B1B": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClustergravitonclusterASG869F3168" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7", - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD" - ] - } - }, - "Parameters": { - "SsmParameterValueawsservicebottlerocketawsecs1arm64latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/bottlerocket/aws-ecs-1/arm64/latest/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton.expected.json deleted file mode 100644 index 16c47fb72cba6..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.graviton.expected.json +++ /dev/null @@ -1,832 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClustergravitonclusterInstanceSecurityGroup0187E9BB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/graviton-cluster/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClustergravitonclusterInstanceRole0D0E0F94": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterInstanceRole0D0E0F94" - } - ] - } - }, - "EcsClustergravitonclusterInstanceProfileD1BBFAAE": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClustergravitonclusterInstanceRole0D0E0F94" - } - ] - } - }, - "EcsClustergravitonclusterLaunchConfig64183B57": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2arm64recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "c6g.large", - "IamInstanceProfile": { - "Ref": "EcsClustergravitonclusterInstanceProfileD1BBFAAE" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClustergravitonclusterInstanceSecurityGroup0187E9BB", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClustergravitonclusterInstanceRoleDefaultPolicyB89DB33F", - "EcsClustergravitonclusterInstanceRole0D0E0F94" - ] - }, - "EcsClustergravitonclusterASG869F3168": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "2", - "LaunchConfigurationName": { - "Ref": "EcsClustergravitonclusterLaunchConfig64183B57" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClustergravitonclusterASG869F3168" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - } - ] - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - ] - }, - "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - } - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7", - "Roles": [ - { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD" - } - ] - } - }, - "EcsClustergravitonclusterLifecycleHookDrainHookA1F91B1B": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClustergravitonclusterASG869F3168" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClustergravitonclusterLifecycleHookDrainHookRoleDefaultPolicy516A6DA7", - "EcsClustergravitonclusterLifecycleHookDrainHookRoleA16C85AD" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2arm64recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/arm64/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json deleted file mode 100644 index d46faf1396a29..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json +++ /dev/null @@ -1,1086 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegTaskDef6FDFB69A", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "EC2", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - }, - "DependsOn": [ - "LBPublicListenerECSGroupD6A32205", - "LBPublicListener6E1F3D94" - ] - }, - "ServiceSecurityGroupC96ED6A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceSecurityGroupfromawsecsintegLBSecurityGroupC30F5EB480CD1B9463": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegLBC73915FE", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "LBSecurityGrouptoawsecsintegServiceSecurityGroup48EE4368807B287D7F": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "LBPublicListener6E1F3D94": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBPublicListenerECSGroupD6A32205": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - }, - "Outputs": { - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json deleted file mode 100644 index d5599176ddb20..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json +++ /dev/null @@ -1,1050 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegecsLBSecurityGroup7DA9012980800B834EB8": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 8080, - "GroupId": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 8080 - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 8080, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegecsTaskDef8DD0C801", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "EC2", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - } - } - ], - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - }, - "DependsOn": [ - "LBPublicListenerECSGroupD6A32205", - "LBPublicListener6E1F3D94" - ] - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegecsLB84BFA683", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "LBSecurityGrouptoawsecsintegecsEcsClusterDefaultAutoScalingGroupInstanceSecurityGroupE3116410808033398DFA": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - }, - "FromPort": 8080, - "ToPort": 8080 - } - }, - "LBPublicListener6E1F3D94": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBPublicListenerECSGroupD6A32205": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "instance", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - }, - "Outputs": { - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json deleted file mode 100644 index 5faebad17a091..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json +++ /dev/null @@ -1,984 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "scorekeep.com", - "Vpc": { - "Ref": "Vpc8378EB38" - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "frontend", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegecsTaskDef8DD0C801", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "FrontendServiceBC94BA93": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FrontendServiceSecurityGroup85470DEC", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "SchedulingStrategy": "REPLICA", - "ServiceRegistries": [ - { - "RegistryArn": { - "Fn::GetAtt": [ - "FrontendServiceCloudmapService6FE76C06", - "Arn" - ] - } - } - ], - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "FrontendServiceCloudmapService6FE76C06": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 60, - "Type": "A" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "HealthCheckCustomConfig": { - "FailureThreshold": 1 - }, - "Name": "frontend", - "NamespaceId": { - "Fn::GetAtt": [ - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F", - "Id" - ] - } - } - }, - "FrontendServiceSecurityGroup85470DEC": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/FrontendService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json deleted file mode 100644 index b5b5299e5dc50..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json +++ /dev/null @@ -1,949 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "scorekeep.com", - "Vpc": { - "Ref": "Vpc8378EB38" - } - } - }, - "frontendTDTaskRole638562A0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "frontendTDB289C8FA": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "frontend", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegecsfrontendTD16AB905D", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "frontendTDTaskRole638562A0", - "Arn" - ] - } - } - }, - "FrontendServiceBC94BA93": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "SchedulingStrategy": "REPLICA", - "ServiceRegistries": [ - { - "ContainerName": "frontend", - "ContainerPort": 80, - "RegistryArn": { - "Fn::GetAtt": [ - "FrontendServiceCloudmapService6FE76C06", - "Arn" - ] - } - } - ], - "TaskDefinition": { - "Ref": "frontendTDB289C8FA" - } - } - }, - "FrontendServiceCloudmapService6FE76C06": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 60, - "Type": "SRV" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "HealthCheckCustomConfig": { - "FailureThreshold": 1 - }, - "Name": "frontend", - "NamespaceId": { - "Fn::GetAtt": [ - "EcsClusterDefaultServiceDiscoveryNamespaceB0971B2F", - "Id" - ] - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.secret-json-field.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.secret-json-field.expected.json deleted file mode 100644 index e48ef0159d603..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.secret-json-field.expected.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "Resources": { - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"user\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 256, - "Name": "web", - "Secrets": [ - { - "Name": "PASSWORD", - "ValueFrom": { - "Fn::Join": [ - "", - [ - { - "Ref": "SecretA720EF05" - }, - ":password::" - ] - ] - } - } - ] - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegsecretjsonfieldTaskDef1C2EE990", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.spot-drain.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.spot-drain.expected.json deleted file mode 100644 index 15f4ab5f3a8fb..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.spot-drain.expected.json +++ /dev/null @@ -1,1365 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterasgSpotInstanceSecurityGroupEA17787D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-spot/EcsCluster/asgSpot/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterasgSpotInstanceRole84AB6F93": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ] - } - }, - "EcsClusterasgSpotInstanceRoleDefaultPolicyB1E3ABFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgSpotInstanceRoleDefaultPolicyB1E3ABFA", - "Roles": [ - { - "Ref": "EcsClusterasgSpotInstanceRole84AB6F93" - } - ] - } - }, - "EcsClusterasgSpotInstanceProfile0D6DD08D": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterasgSpotInstanceRole84AB6F93" - } - ] - } - }, - "EcsClusterasgSpotLaunchConfig75BCA823": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "c5.xlarge", - "IamInstanceProfile": { - "Ref": "EcsClusterasgSpotInstanceProfile0D6DD08D" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterasgSpotInstanceSecurityGroupEA17787D", - "GroupId" - ] - } - ], - "SpotPrice": "0.0735", - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config\necho ECS_ENABLE_SPOT_INSTANCE_DRAINING=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterasgSpotInstanceRoleDefaultPolicyB1E3ABFA", - "EcsClusterasgSpotInstanceRole84AB6F93" - ] - }, - "EcsClusterasgSpotASG0D77F041": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "2", - "DesiredCapacity": "2", - "LaunchConfigurationName": { - "Ref": "EcsClusterasgSpotLaunchConfig75BCA823" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ] - } - }, - "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterasgSpotASG0D77F041" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", - "Roles": [ - { - "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" - } - ] - } - }, - "EcsClusterasgSpotDrainECSHookFunction969F1553": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", - "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" - ] - }, - "EcsClusterasgSpotDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgSpotLifecycleHookDrainHookTopic92E2845E8BD3FE4E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunction969F1553", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - } - } - }, - "EcsClusterasgSpotDrainECSHookFunctionTopic9648CAD4": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunction969F1553", - "Arn" - ] - } - } - }, - "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ] - } - }, - "EcsClusterasgSpotLifecycleHookDrainHookRole1B427C77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" - } - ] - } - }, - "EcsClusterasgSpotLifecycleHookDrainHookRoleDefaultPolicyFC0E3482": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgSpotLifecycleHookDrainHookRoleDefaultPolicyFC0E3482", - "Roles": [ - { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookRole1B427C77" - } - ] - } - }, - "EcsClusterasgSpotLifecycleHookDrainHook91178D34": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterasgSpotASG0D77F041" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterasgSpotLifecycleHookDrainHookRole1B427C77", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterasgSpotLifecycleHookDrainHookRoleDefaultPolicyFC0E3482", - "EcsClusterasgSpotLifecycleHookDrainHookRole1B427C77" - ] - }, - "EcsClusterasgOdInstanceSecurityGroup301DFBED": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-spot/EcsCluster/asgOd/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterasgOdInstanceRoleC8290533": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ] - } - }, - "EcsClusterasgOdInstanceRoleDefaultPolicy0AE7FAB2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgOdInstanceRoleDefaultPolicy0AE7FAB2", - "Roles": [ - { - "Ref": "EcsClusterasgOdInstanceRoleC8290533" - } - ] - } - }, - "EcsClusterasgOdInstanceProfileE5B88756": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterasgOdInstanceRoleC8290533" - } - ] - } - }, - "EcsClusterasgOdLaunchConfigD3B9E271": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.large", - "IamInstanceProfile": { - "Ref": "EcsClusterasgOdInstanceProfileE5B88756" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterasgOdInstanceSecurityGroup301DFBED", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterasgOdInstanceRoleDefaultPolicy0AE7FAB2", - "EcsClusterasgOdInstanceRoleC8290533" - ] - }, - "EcsClusterasgOdASG0E5C30EC": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "1", - "DesiredCapacity": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterasgOdLaunchConfigD3B9E271" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ] - } - }, - "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterasgOdASG0E5C30EC" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", - "Roles": [ - { - "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" - } - ] - } - }, - "EcsClusterasgOdDrainECSHookFunction962490E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", - "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" - ] - }, - "EcsClusterasgOdDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgOdLifecycleHookDrainHookTopicB293D7D8B41B2D12": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunction962490E0", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - } - } - }, - "EcsClusterasgOdDrainECSHookFunctionTopicE6BE4000": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunction962490E0", - "Arn" - ] - } - } - }, - "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ] - } - }, - "EcsClusterasgOdLifecycleHookDrainHookRole695B2DF1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" - } - ] - } - }, - "EcsClusterasgOdLifecycleHookDrainHookRoleDefaultPolicy85FA949A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterasgOdLifecycleHookDrainHookRoleDefaultPolicy85FA949A", - "Roles": [ - { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookRole695B2DF1" - } - ] - } - }, - "EcsClusterasgOdLifecycleHookDrainHook03AC5A9E": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterasgOdASG0E5C30EC" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterasgOdLifecycleHookDrainHookRole695B2DF1", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterasgOdLifecycleHookDrainHookRoleDefaultPolicy85FA949A", - "EcsClusterasgOdLifecycleHookDrainHookRole695B2DF1" - ] - }, - "TaskTaskRoleE98524A1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Task79114B6B": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Memory": 512, - "Name": "PHP", - "PortMappings": [ - { - "ContainerPort": 80, - "HostPort": 0, - "Protocol": "tcp" - } - ] - } - ], - "Family": "awsecsintegspotTask1789BE14", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskTaskRoleE98524A1", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsCluster97242B84" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "EC2", - "SchedulingStrategy": "REPLICA", - "TaskDefinition": { - "Ref": "Task79114B6B" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json deleted file mode 100644 index 8a18b3554d752..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.add-environment-variable.expected.json +++ /dev/null @@ -1,479 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Environment": [ - { - "Name": "nameOne", - "Value": "valueOne" - } - ], - "Essential": true, - "Image": "nginx", - "Name": "nginx", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "Family": "awsecsintegTaskDef6FDFB69A", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "websvcsgA808F313": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/websvc-sg", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "ENABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "websvcsgA808F313", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.capacity-providers.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.capacity-providers.expected.json deleted file mode 100644 index 7eb0eada4f244..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.capacity-providers.expected.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-capacity-provider/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCPCluster668E71F2": { - "Type": "AWS::ECS::Cluster" - }, - "FargateCPClusterBFD66A36": { - "Type": "AWS::ECS::ClusterCapacityProviderAssociations", - "Properties": { - "CapacityProviders": [ - "FARGATE", - "FARGATE_SPOT" - ], - "Cluster": { - "Ref": "FargateCPCluster668E71F2" - }, - "DefaultCapacityProviderStrategy": [] - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web" - } - ], - "Cpu": "256", - "Family": "awsecsintegcapacityproviderTaskDef80D341CB", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "FargateServiceAC2B3B85": { - "Type": "AWS::ECS::Service", - "Properties": { - "CapacityProviderStrategy": [ - { - "CapacityProvider": "FARGATE_SPOT", - "Weight": 2 - }, - { - "CapacityProvider": "FARGATE", - "Weight": 1 - } - ], - "Cluster": { - "Ref": "FargateCPCluster668E71F2" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup0A0E79CB", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "FargateServiceSecurityGroup0A0E79CB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-capacity-provider/FargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.expected.json deleted file mode 100644 index c721e1a88a58f..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.expected.json +++ /dev/null @@ -1,715 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "KmsKey46693ADD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt*", - "kms:Describe*", - "kms:Encrypt*", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Condition": { - "ArnLike": { - "kms:EncryptionContext:aws:logs:arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":*" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "logs.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "KmsKeyId": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "EcsExecBucket4F468651": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster", - "Properties": { - "Configuration": { - "ExecuteCommandConfiguration": { - "KmsKeyId": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - }, - "LogConfiguration": { - "CloudWatchEncryptionEnabled": true, - "CloudWatchLogGroupName": { - "Ref": "LogGroupF5B46931" - }, - "S3BucketName": { - "Ref": "EcsExecBucket4F468651" - }, - "S3EncryptionEnabled": true, - "S3KeyPrefix": "exec-output" - }, - "Logging": "OVERRIDE" - } - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefTaskRoleDefaultPolicyA592CB18": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DescribeLogGroups", - "s3:GetBucketLocation", - "ssmmessages:CreateControlChannel", - "ssmmessages:CreateDataChannel", - "ssmmessages:OpenControlChannel", - "ssmmessages:OpenDataChannel" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:GenerateDataKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "KmsKey46693ADD", - "Arn" - ] - } - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "LogGroupF5B46931" - }, - ":*" - ] - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "EcsExecBucket4F468651" - }, - "/*" - ] - ] - } - }, - { - "Action": "s3:GetEncryptionConfiguration", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "EcsExecBucket4F468651" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefTaskRoleDefaultPolicyA592CB18", - "Roles": [ - { - "Ref": "TaskDefTaskRole1EDB4A67" - } - ] - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web" - } - ], - "Cpu": "256", - "Family": "awsecsintegexeccommandTaskDef44709274", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "FargateServiceAC2B3B85": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "EnableExecuteCommand": true, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceSecurityGroup0A0E79CB", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - }, - "FargateServiceSecurityGroup0A0E79CB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-exec-command/FargateService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.fargate-with-efs.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.fargate-with-efs.expected.json deleted file mode 100644 index 84fa39a570712..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.fargate-with-efs.expected.json +++ /dev/null @@ -1,485 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "etcdata80702D7D": { - "Type": "AWS::EFS::FileSystem", - "Properties": { - "Encrypted": true, - "FileSystemTags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/etcdata" - } - ] - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "etcdataEfsSecurityGroupB0A9B014": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-fargate-efs/etcdata/EfsSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-fargate-efs/etcdata" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "etcdataEfsMountTarget1A2665990": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "etcdata80702D7D" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "etcdataEfsSecurityGroupB0A9B014", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "etcdataEfsMountTarget280CEA26C": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "etcdata80702D7D" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "etcdataEfsSecurityGroupB0A9B014", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web" - } - ], - "Cpu": "256", - "Family": "awsecsfargateefsTaskDefBFA2D408", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - }, - "Volumes": [ - { - "EFSVolumeConfiguration": { - "FilesystemId": { - "Ref": "etcdata80702D7D" - } - }, - "Name": "somedata" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.firelens-cloudwatch.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.firelens-cloudwatch.expected.json deleted file mode 100644 index cb9c0a2de453d..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.firelens-cloudwatch.expected.json +++ /dev/null @@ -1,607 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefTaskRoleDefaultPolicyA592CB18": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefTaskRoleDefaultPolicyA592CB18", - "Roles": [ - { - "Ref": "TaskDefTaskRole1EDB4A67" - } - ] - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "nginx", - "LogConfiguration": { - "LogDriver": "awsfirelens", - "Options": { - "Name": "cloudwatch", - "region": { - "Ref": "AWS::Region" - }, - "log_group_name": "ecs-integ-test", - "auto_create_group": "true", - "log_stream_prefix": "nginx" - } - }, - "Name": "nginx", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - }, - { - "Essential": true, - "FirelensConfiguration": { - "Type": "fluentbit" - }, - "Image": { - "Ref": "SsmParameterValueawsserviceawsforfluentbitlatestC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDeflogrouterLogGroup5C22D15C" - }, - "awslogs-stream-prefix": "firelens", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "MemoryReservation": 50, - "Name": "log-router" - } - ], - "Cpu": "512", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegTaskDef6FDFB69A", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetAuthorizationToken", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDeflogrouterLogGroup5C22D15C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "TaskDeflogrouterLogGroup5C22D15C": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "websvcsgA808F313": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/websvc-sg", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "ENABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "websvcsgA808F313", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceawsforfluentbitlatestC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/aws-for-fluent-bit/latest" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.expected.json deleted file mode 100644 index de47fd2260762..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.expected.json +++ /dev/null @@ -1,675 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "Family": "awsecsintegTaskDef6FDFB69A", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "LBPublicListenerFargateGroup5EE2FBAF" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - }, - "DependsOn": [ - "LBPublicListenerFargateGroup5EE2FBAF", - "LBPublicListener6E1F3D94" - ] - }, - "ServiceSecurityGroupC96ED6A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceSecurityGroupfromawsecsintegLBSecurityGroupC30F5EB480CD1B9463": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "ServiceTaskCountTarget23E25614": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 10, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "FargateCluster7CCD5F93" - }, - "/", - { - "Fn::GetAtt": [ - "ServiceD69D759B", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - } - }, - "ServiceTaskCountTargetReasonableCpu4174EFCE": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecsintegServiceTaskCountTargetReasonableCpuDB6AEA73", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "ServiceTaskCountTarget23E25614" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 10 - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsecsintegLBC73915FE", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "LBSecurityGrouptoawsecsintegServiceSecurityGroup48EE4368807B287D7F": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "LBPublicListener6E1F3D94": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBPublicListenerFargateGroup5EE2FBAF" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBPublicListenerFargateGroup5EE2FBAF": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Outputs": { - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.nlb-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.nlb-awsvpc-nw.expected.json deleted file mode 100644 index ac09689318787..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.nlb-awsvpc-nw.expected.json +++ /dev/null @@ -1,601 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "512", - "Family": "awsecsintegTaskDef6FDFB69A", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "ServiceD69D759B": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "web", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupC96ED6A7", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDef54694570" - } - }, - "DependsOn": [ - "LBPublicListenerECSGroupD6A32205", - "LBPublicListener6E1F3D94" - ] - }, - "ServiceSecurityGroupC96ED6A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceTaskCountTarget23E25614": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 10, - "MinCapacity": 1, - "ResourceId": { - "Fn::Join": [ - "", - [ - "service/", - { - "Ref": "FargateCluster7CCD5F93" - }, - "/", - { - "Fn::GetAtt": [ - "ServiceD69D759B", - "Name" - ] - } - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" - ] - ] - }, - "ScalableDimension": "ecs:service:DesiredCount", - "ServiceNamespace": "ecs" - } - }, - "ServiceTaskCountTargetReasonableCpu4174EFCE": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awsecsintegServiceTaskCountTargetReasonableCpuDB6AEA73", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "ServiceTaskCountTarget23E25614" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "ECSServiceAverageCPUUtilization" - }, - "TargetValue": 10 - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBPublicListener6E1F3D94": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBPublicListenerECSGroupD6A32205" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "LBPublicListenerECSGroupD6A32205": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Outputs": { - "LoadBalancerDNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.runtime.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.runtime.expected.json deleted file mode 100644 index 839283e8c6c46..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.runtime.expected.json +++ /dev/null @@ -1,712 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-runtime/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefWindowsTaskRole87844D4F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefWindows46D24ABF": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefWindowswindowsservercoreLogGroupCF570877" - }, - "awslogs-stream-prefix": "win-iis-on-fargate", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "windowsservercore", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "1024", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefWindowsExecutionRole7DDEBC2E", - "Arn" - ] - }, - "Family": "awsecsintegruntimeTaskDefWindows19C23F8C", - "Memory": "2048", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "RuntimePlatform": { - "CpuArchitecture": "X86_64", - "OperatingSystemFamily": "WINDOWS_SERVER_2019_CORE" - }, - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefWindowsTaskRole87844D4F", - "Arn" - ] - } - } - }, - "TaskDefWindowswindowsservercoreLogGroupCF570877": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefWindowsExecutionRole7DDEBC2E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefWindowsExecutionRoleDefaultPolicyF0E0215E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefWindowswindowsservercoreLogGroupCF570877", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefWindowsExecutionRoleDefaultPolicyF0E0215E", - "Roles": [ - { - "Ref": "TaskDefWindowsExecutionRole7DDEBC2E" - } - ] - } - }, - "TaskDefGraviton2TaskRole32C7B421": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefGraviton21BE43931": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "public.ecr.aws/nginx/nginx:latest-arm64v8", - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefGraviton2webarm64LogGroup7D0FFEB3" - }, - "awslogs-stream-prefix": "graviton2-on-fargate", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "webarm64", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefGraviton2ExecutionRoleFB11C2FF", - "Arn" - ] - }, - "Family": "awsecsintegruntimeTaskDefGraviton28E28B263", - "Memory": "1024", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "RuntimePlatform": { - "CpuArchitecture": "ARM64", - "OperatingSystemFamily": "LINUX" - }, - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefGraviton2TaskRole32C7B421", - "Arn" - ] - } - } - }, - "TaskDefGraviton2webarm64LogGroup7D0FFEB3": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefGraviton2ExecutionRoleFB11C2FF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefGraviton2ExecutionRoleDefaultPolicyB09F36E7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefGraviton2webarm64LogGroup7D0FFEB3", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefGraviton2ExecutionRoleDefaultPolicyB09F36E7", - "Roles": [ - { - "Ref": "TaskDefGraviton2ExecutionRoleFB11C2FF" - } - ] - } - }, - "FargateServiceWindowsRuntimeServiceBBDEC2BF": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceWindowsRuntimeSecurityGroupABEA7E23", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDefWindows46D24ABF" - } - } - }, - "FargateServiceWindowsRuntimeSecurityGroupABEA7E23": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-runtime/FargateServiceWindowsRuntime/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FargateServiceGraviton2RuntimeService2BDDD2C2": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "FargateCluster7CCD5F93" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateServiceGraviton2RuntimeSecurityGroup9D707C93", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "TaskDefGraviton21BE43931" - } - } - }, - "FargateServiceGraviton2RuntimeSecurityGroup9D707C93": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-runtime/FargateServiceGraviton2Runtime/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json deleted file mode 100644 index b67b0d4c5df1d..0000000000000 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.secret.expected.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "Resources": { - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"user\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "amazon/amazon-ecs-sample", - "Name": "web", - "Secrets": [ - { - "Name": "SECRET", - "ValueFrom": { - "Ref": "SecretA720EF05" - } - }, - { - "Name": "PASSWORD", - "ValueFrom": { - "Fn::Join": [ - "", - [ - { - "Ref": "SecretA720EF05" - }, - ":password::" - ] - ] - } - } - ] - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegsecretTaskDef58AA207D", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.expected.json b/packages/@aws-cdk/aws-efs/test/integ.efs.expected.json deleted file mode 100644 index 3ceefb75f5c10..0000000000000 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.expected.json +++ /dev/null @@ -1,567 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "FileSystem8A8E25C0": { - "Type": "AWS::EFS::FileSystem", - "Properties": { - "Encrypted": true, - "FileSystemTags": [ - { - "Key": "Name", - "Value": "test-efs-integ/FileSystem" - } - ] - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "FileSystemEfsSecurityGroup212D3ACB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "test-efs-integ/FileSystem/EfsSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "test-efs-integ/FileSystem" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "FileSystemEfsMountTarget1586453F0": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "FileSystem8A8E25C0" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FileSystemEfsSecurityGroup212D3ACB", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "FileSystemEfsMountTarget24B8EBB43": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "FileSystem8A8E25C0" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FileSystemEfsSecurityGroup212D3ACB", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "FileSystemEfsMountTarget37C2F9139": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "FileSystem8A8E25C0" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FileSystemEfsSecurityGroup212D3ACB", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "FileSystemAccessPointF8178182": { - "Type": "AWS::EFS::AccessPoint", - "Properties": { - "FileSystemId": { - "Ref": "FileSystem8A8E25C0" - }, - "PosixUser": { - "Gid": "1000", - "Uid": "1000" - }, - "RootDirectory": { - "CreationInfo": { - "OwnerGid": "1000", - "OwnerUid": "1000", - "Permissions": "755" - }, - "Path": "/custom-path" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.defaults.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.defaults.expected.json deleted file mode 100644 index 5c74a6682063e..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.defaults.expected.json +++ /dev/null @@ -1,1315 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "ClusterDefaultVpcFA9F2722": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet1Subnet3BFE1BDA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet1RouteTable1DCCDD98": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet1RouteTableAssociationAFBE6789": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet1RouteTable1DCCDD98" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet1Subnet3BFE1BDA" - } - } - }, - "ClusterDefaultVpcPublicSubnet1DefaultRouteCF22EF6E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet1RouteTable1DCCDD98" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "ClusterDefaultVpcIGW756BE43E" - } - }, - "DependsOn": [ - "ClusterDefaultVpcVPCGWC1D00388" - ] - }, - "ClusterDefaultVpcPublicSubnet1EIP498E2BD2": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet1NATGateway6E21013E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet1Subnet3BFE1BDA" - }, - "AllocationId": { - "Fn::GetAtt": [ - "ClusterDefaultVpcPublicSubnet1EIP498E2BD2", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet2SubnetC4E9A966": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet2RouteTable6F1F5F47": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet2RouteTableAssociationA8539C50": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet2RouteTable6F1F5F47" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet2SubnetC4E9A966" - } - } - }, - "ClusterDefaultVpcPublicSubnet2DefaultRoute1FA8621E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet2RouteTable6F1F5F47" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "ClusterDefaultVpcIGW756BE43E" - } - }, - "DependsOn": [ - "ClusterDefaultVpcVPCGWC1D00388" - ] - }, - "ClusterDefaultVpcPublicSubnet2EIP265F4810": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet2NATGateway4AF4B728": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet2SubnetC4E9A966" - }, - "AllocationId": { - "Fn::GetAtt": [ - "ClusterDefaultVpcPublicSubnet2EIP265F4810", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet3Subnet1A46184A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet3RouteTableC81F99EF": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet3RouteTableAssociation7C5D21CC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet3RouteTableC81F99EF" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet3Subnet1A46184A" - } - } - }, - "ClusterDefaultVpcPublicSubnet3DefaultRouteB6080504": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPublicSubnet3RouteTableC81F99EF" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "ClusterDefaultVpcIGW756BE43E" - } - }, - "DependsOn": [ - "ClusterDefaultVpcVPCGWC1D00388" - ] - }, - "ClusterDefaultVpcPublicSubnet3EIP0CBF6D05": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPublicSubnet3NATGatewayEF4BA49A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "ClusterDefaultVpcPublicSubnet3Subnet1A46184A" - }, - "AllocationId": { - "Fn::GetAtt": [ - "ClusterDefaultVpcPublicSubnet3EIP0CBF6D05", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet1Subnet03F39409": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet1RouteTable7844020C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet1RouteTableAssociationF8A67D95": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet1RouteTable7844020C" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPrivateSubnet1Subnet03F39409" - } - } - }, - "ClusterDefaultVpcPrivateSubnet1DefaultRouteD624C8BD": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet1RouteTable7844020C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "ClusterDefaultVpcPublicSubnet1NATGateway6E21013E" - } - } - }, - "ClusterDefaultVpcPrivateSubnet2SubnetA526AEA7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet2RouteTable1F9A5298": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet2RouteTableAssociationE1240DF2": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet2RouteTable1F9A5298" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPrivateSubnet2SubnetA526AEA7" - } - } - }, - "ClusterDefaultVpcPrivateSubnet2DefaultRouteAB55737C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet2RouteTable1F9A5298" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "ClusterDefaultVpcPublicSubnet2NATGateway4AF4B728" - } - } - }, - "ClusterDefaultVpcPrivateSubnet3SubnetB64BC839": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet3RouteTableF71314D0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "ClusterDefaultVpcPrivateSubnet3RouteTableAssociation3007DC36": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet3RouteTableF71314D0" - }, - "SubnetId": { - "Ref": "ClusterDefaultVpcPrivateSubnet3SubnetB64BC839" - } - } - }, - "ClusterDefaultVpcPrivateSubnet3DefaultRoute932EDFF0": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "ClusterDefaultVpcPrivateSubnet3RouteTableF71314D0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "ClusterDefaultVpcPublicSubnet3NATGatewayEF4BA49A" - } - } - }, - "ClusterDefaultVpcIGW756BE43E": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultVpc" - } - ] - } - }, - "ClusterDefaultVpcVPCGWC1D00388": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - }, - "InternetGatewayId": { - "Ref": "ClusterDefaultVpcIGW756BE43E" - } - } - }, - "ClusterClusterRoleCE5C05DD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - } - } - }, - "ClusterControlPlaneSecurityGroupfromeksintegdefaultsClusterDefaultCapacityInstanceSecurityGroup913A261E44376C54A34": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegdefaultsClusterDefaultCapacityInstanceSecurityGroup913A261E:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterResourceHandlerServiceRole7FB16465": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "ClusterResourceHandlerServiceRoleDefaultPolicy333D0E3A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "eks:CreateCluster", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterClusterRoleCE5C05DD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterResourceHandlerServiceRoleDefaultPolicy333D0E3A", - "Roles": [ - { - "Ref": "ClusterResourceHandlerServiceRole7FB16465" - } - ] - } - }, - "ClusterResourceHandler28BF924D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "ClusterResourceHandlerServiceRole7FB16465", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "ClusterResourceHandlerServiceRoleDefaultPolicy333D0E3A", - "ClusterResourceHandlerServiceRole7FB16465" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "ClusterResourceHandler28BF924D", - "Arn" - ] - }, - "Config": { - "roleArn": { - "Fn::GetAtt": [ - "ClusterClusterRoleCE5C05DD", - "Arn" - ] - }, - "resourcesVpcConfig": { - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "subnetIds": [ - { - "Ref": "ClusterDefaultVpcPublicSubnet1Subnet3BFE1BDA" - }, - { - "Ref": "ClusterDefaultVpcPublicSubnet2SubnetC4E9A966" - }, - { - "Ref": "ClusterDefaultVpcPublicSubnet3Subnet1A46184A" - }, - { - "Ref": "ClusterDefaultVpcPrivateSubnet1Subnet03F39409" - }, - { - "Ref": "ClusterDefaultVpcPrivateSubnet2SubnetA526AEA7" - }, - { - "Ref": "ClusterDefaultVpcPrivateSubnet3SubnetB64BC839" - } - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubernetesResourceHandler81C19BC8": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "ClusterResourceHandlerServiceRole7FB16465", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "Cluster9EE0221C" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "ClusterResourceHandlerServiceRoleDefaultPolicy333D0E3A", - "ClusterResourceHandlerServiceRole7FB16465" - ] - }, - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "eks-integ-defaults/Cluster/DefaultCapacity/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultCapacity" - } - ], - "VpcId": { - "Ref": "ClusterDefaultVpcFA9F2722" - } - } - }, - "ClusterDefaultCapacityInstanceSecurityGroupfromeksintegdefaultsClusterDefaultCapacityInstanceSecurityGroup913A261EALLTRAFFICA8163873": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from eksintegdefaultsClusterDefaultCapacityInstanceSecurityGroup913A261E:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - } - } - }, - "ClusterDefaultCapacityInstanceSecurityGroupfromeksintegdefaultsClusterControlPlaneSecurityGroup0FA4E3AB4436B585189": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegdefaultsClusterControlPlaneSecurityGroup0FA4E3AB:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterDefaultCapacityInstanceSecurityGroupfromeksintegdefaultsClusterControlPlaneSecurityGroup0FA4E3AB102565535C02D6CB8": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegdefaultsClusterControlPlaneSecurityGroup0FA4E3AB:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterDefaultCapacityInstanceRole3E209969": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-defaults/Cluster/DefaultCapacity" - } - ] - } - }, - "ClusterDefaultCapacityInstanceProfile70387741": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterDefaultCapacityInstanceRole3E209969" - } - ] - } - }, - "ClusterDefaultCapacityLaunchConfig72790CF7": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "m5.large", - "IamInstanceProfile": { - "Ref": "ClusterDefaultCapacityInstanceProfile70387741" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceSecurityGroup8FDF4D48", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack eks-integ-defaults --resource ClusterDefaultCapacityASG00CC9431 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterDefaultCapacityInstanceRole3E209969" - ] - }, - "ClusterDefaultCapacityASG00CC9431": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "1", - "DesiredCapacity": "2", - "LaunchConfigurationName": { - "Ref": "ClusterDefaultCapacityLaunchConfig72790CF7" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "eks-integ-defaults/Cluster/DefaultCapacity" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "ClusterDefaultVpcPrivateSubnet1Subnet03F39409" - }, - { - "Ref": "ClusterDefaultVpcPrivateSubnet2SubnetA526AEA7" - }, - { - "Ref": "ClusterDefaultVpcPrivateSubnet3SubnetB64BC839" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "ClusterKubernetesResourceHandler81C19BC8", - "Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterDefaultCapacityInstanceRole3E209969", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "1.13.7" - }, - "Parameters": { - "LayerName": "kubectl-459230f5f24751b9afdd68c6a69be4c7" - } - } - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region test-region" - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region test-region" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8": { - "Type": "String", - "Description": "S3 bucket for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD": { - "Type": "String", - "Description": "S3 key for asset version \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204ArtifactHashB80B497F": { - "Type": "String", - "Description": "Artifact hash for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB": { - "Type": "String", - "Description": "S3 bucket for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54": { - "Type": "String", - "Description": "S3 key for asset version \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444ArtifactHash606C8127": { - "Type": "String", - "Description": "Artifact hash for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.kubectl-disabled.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.kubectl-disabled.expected.json deleted file mode 100644 index 66e63cb1a7497..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.kubectl-disabled.expected.json +++ /dev/null @@ -1,1044 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "EKSClusterClusterRoleB72F3251": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "EKSClusterControlPlaneSecurityGroup580AD1FE": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "EKSClusterControlPlaneSecurityGroupfromeksintegkubectldisabledEKSClusterNodesInstanceSecurityGroup1E8EEB07443828A1FF0": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegkubectldisabledEKSClusterNodesInstanceSecurityGroup1E8EEB07:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "EKSClusterBA6ECF8F": { - "Type": "AWS::EKS::Cluster", - "Properties": { - "ResourcesVpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "EKSClusterClusterRoleB72F3251", - "Arn" - ] - } - } - }, - "EKSClusterNodesInstanceSecurityGroup460A275E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "eks-integ-kubectl-disabled/EKSCluster/Nodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterBA6ECF8F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/EKSCluster/Nodes" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegkubectldisabledEKSClusterNodesInstanceSecurityGroup1E8EEB07ALLTRAFFIC813BA9BB": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from eksintegkubectldisabledEKSClusterNodesInstanceSecurityGroup1E8EEB07:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - } - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegkubectldisabledEKSClusterControlPlaneSecurityGroupA8D847C7443405A887C": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegkubectldisabledEKSClusterControlPlaneSecurityGroupA8D847C7:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegkubectldisabledEKSClusterControlPlaneSecurityGroupA8D847C71025655350C1AD63E": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegkubectldisabledEKSClusterControlPlaneSecurityGroupA8D847C7:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "EKSClusterNodesInstanceRoleEE5595D6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterBA6ECF8F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-kubectl-disabled/EKSCluster/Nodes" - } - ] - } - }, - "EKSClusterNodesInstanceProfile0F2DB3B9": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EKSClusterNodesInstanceRoleEE5595D6" - } - ] - } - }, - "EKSClusterNodesLaunchConfig921F1106": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.medium", - "IamInstanceProfile": { - "Ref": "EKSClusterNodesInstanceProfile0F2DB3B9" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "EKSClusterBA6ECF8F" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack eks-integ-kubectl-disabled --resource EKSClusterNodesASGC2597E34 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "EKSClusterNodesInstanceRoleEE5595D6" - ] - }, - "EKSClusterNodesASGC2597E34": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "DesiredCapacity": "1", - "LaunchConfigurationName": { - "Ref": "EKSClusterNodesLaunchConfig921F1106" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterBA6ECF8F" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "eks-integ-kubectl-disabled/EKSCluster/Nodes" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - } - }, - "Outputs": { - "EKSClusterConfigCommand3809C9C9": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "EKSClusterBA6ECF8F" - }, - " --region test-region" - ] - ] - } - }, - "EKSClusterGetTokenCommand10DBF41A": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "EKSClusterBA6ECF8F" - }, - " --region test-region" - ] - ] - } - }, - "EKSClusterNodesInstanceRoleARN10992C84": { - "Value": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceRoleEE5595D6", - "Arn" - ] - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.lit.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.lit.expected.json deleted file mode 100644 index d393b5ea37f10..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-cluster.lit.expected.json +++ /dev/null @@ -1,1315 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "eks-integ-test-basic/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "EKSClusterClusterRoleB72F3251": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "EKSClusterControlPlaneSecurityGroup580AD1FE": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "EKSClusterControlPlaneSecurityGroupfromeksintegtestbasicEKSClusterNodesInstanceSecurityGroup5B890E254434E08C84B": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegtestbasicEKSClusterNodesInstanceSecurityGroup5B890E25:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "EKSClusterResourceHandlerServiceRoleFD631254": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "EKSClusterResourceHandlerServiceRoleDefaultPolicy4D087A98": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "eks:CreateCluster", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EKSClusterClusterRoleB72F3251", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EKSClusterResourceHandlerServiceRoleDefaultPolicy4D087A98", - "Roles": [ - { - "Ref": "EKSClusterResourceHandlerServiceRoleFD631254" - } - ] - } - }, - "EKSClusterResourceHandler31198B21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "EKSClusterResourceHandlerServiceRoleFD631254", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "EKSClusterResourceHandlerServiceRoleDefaultPolicy4D087A98", - "EKSClusterResourceHandlerServiceRoleFD631254" - ] - }, - "EKSClusterE11008B6": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "EKSClusterResourceHandler31198B21", - "Arn" - ] - }, - "Config": { - "roleArn": { - "Fn::GetAtt": [ - "EKSClusterClusterRoleB72F3251", - "Arn" - ] - }, - "resourcesVpcConfig": { - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - } - ], - "subnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EKSClusterKubernetesResourceHandler90E6DD64": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "EKSClusterResourceHandlerServiceRoleFD631254", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "EKSClusterE11008B6" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "EKSClusterResourceHandlerServiceRoleDefaultPolicy4D087A98", - "EKSClusterResourceHandlerServiceRoleFD631254" - ] - }, - "EKSClusterNodesInstanceSecurityGroup460A275E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "eks-integ-test-basic/EKSCluster/Nodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterE11008B6" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/EKSCluster/Nodes" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegtestbasicEKSClusterNodesInstanceSecurityGroup5B890E25ALLTRAFFIC17050541": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from eksintegtestbasicEKSClusterNodesInstanceSecurityGroup5B890E25:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - } - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegtestbasicEKSClusterControlPlaneSecurityGroup389B14F14436EFF5343": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegtestbasicEKSClusterControlPlaneSecurityGroup389B14F1:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "EKSClusterNodesInstanceSecurityGroupfromeksintegtestbasicEKSClusterControlPlaneSecurityGroup389B14F1102565535BB0D6C6D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from eksintegtestbasicEKSClusterControlPlaneSecurityGroup389B14F1:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "EKSClusterControlPlaneSecurityGroup580AD1FE", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "EKSClusterNodesInstanceRoleEE5595D6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterE11008B6" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "eks-integ-test-basic/EKSCluster/Nodes" - } - ] - } - }, - "EKSClusterNodesInstanceProfile0F2DB3B9": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EKSClusterNodesInstanceRoleEE5595D6" - } - ] - } - }, - "EKSClusterNodesLaunchConfig921F1106": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.medium", - "IamInstanceProfile": { - "Ref": "EKSClusterNodesInstanceProfile0F2DB3B9" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceSecurityGroup460A275E", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "EKSClusterE11008B6" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack eks-integ-test-basic --resource EKSClusterNodesASGC2597E34 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "EKSClusterNodesInstanceRoleEE5595D6" - ] - }, - "EKSClusterNodesASGC2597E34": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "DesiredCapacity": "1", - "LaunchConfigurationName": { - "Ref": "EKSClusterNodesLaunchConfig921F1106" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "EKSClusterE11008B6" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "eks-integ-test-basic/EKSCluster/Nodes" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EKSClusterAwsAuthmanifestA4E0796C": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "EKSClusterKubernetesResourceHandler90E6DD64", - "Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "EKSClusterNodesInstanceRoleEE5595D6", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "1.13.7" - }, - "Parameters": { - "LayerName": "kubectl-de6ff3f9a59243920be5aeee7fc888a7" - } - } - } - }, - "Outputs": { - "EKSClusterConfigCommand3809C9C9": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "EKSClusterE11008B6" - }, - " --region test-region" - ] - ] - } - }, - "EKSClusterGetTokenCommand10DBF41A": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "EKSClusterE11008B6" - }, - " --region test-region" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8": { - "Type": "String", - "Description": "S3 bucket for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD": { - "Type": "String", - "Description": "S3 key for asset version \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204ArtifactHashB80B497F": { - "Type": "String", - "Description": "Artifact hash for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB": { - "Type": "String", - "Description": "S3 bucket for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54": { - "Type": "String", - "Description": "S3 key for asset version \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444ArtifactHash606C8127": { - "Type": "String", - "Description": "Artifact hash for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-helm.lit.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-helm.lit.expected.json deleted file mode 100644 index 114dd6f18a77c..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-helm.lit.expected.json +++ /dev/null @@ -1,1336 +0,0 @@ -[ - { - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "k8s-vpc/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "k8s-vpc/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - } - }, - "Outputs": { - "ExportsOutputRefvpcA2121C384D1B3CDE": { - "Value": { - "Ref": "vpcA2121C38" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - }, - "ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041": { - "Value": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041" - } - }, - "ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242": { - "Value": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242" - } - }, - "ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271": { - "Value": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - } - }, - "ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE": { - "Value": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - } - } - }, - { - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "cluster22ClusterRole5FC933B4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "cluster22ControlPlaneSecurityGroup2648B9CD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - } - }, - "cluster22ControlPlaneSecurityGroupfromk8sclustercluster22NodesInstanceSecurityGroupF903AE86443C3EDA943": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22NodesInstanceSecurityGroupF903AE86:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "cluster22ResourceHandlerServiceRoleC2E4F327": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "eks:CreateCluster", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "cluster22ClusterRole5FC933B4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "Roles": [ - { - "Ref": "cluster22ResourceHandlerServiceRoleC2E4F327" - } - ] - } - }, - "cluster22ResourceHandler6227579A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "cluster22ResourceHandlerServiceRoleC2E4F327", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "cluster22ResourceHandlerServiceRoleC2E4F327" - ] - }, - "cluster227BD1CB20": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22ResourceHandler6227579A", - "Arn" - ] - }, - "Config": { - "roleArn": { - "Fn::GetAtt": [ - "cluster22ClusterRole5FC933B4", - "Arn" - ] - }, - "resourcesVpcConfig": { - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - } - ], - "subnetIds": [ - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "cluster22KubernetesResourceHandler599F07E6": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "cluster22ResourceHandlerServiceRoleC2E4F327", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "cluster227BD1CB20" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "cluster22ResourceHandlerServiceRoleC2E4F327" - ] - }, - "cluster22AwsAuthmanifest4685C84D": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22KubernetesResourceHandler599F07E6", - "Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "cluster22NodesInstanceRole51CD052F", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "cluster22NodesInstanceSecurityGroup4A3CDC24": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "k8s-cluster/cluster22/Nodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "k8s-cluster/cluster22/Nodes" - } - ], - "VpcId": { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22NodesInstanceSecurityGroupF903AE86ALLTRAFFIC774C7781": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from k8sclustercluster22NodesInstanceSecurityGroupF903AE86:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - } - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22ControlPlaneSecurityGroup3B5F21B44434A6E344D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22ControlPlaneSecurityGroup3B5F21B4:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22ControlPlaneSecurityGroup3B5F21B41025655355658FCAA": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22ControlPlaneSecurityGroup3B5F21B4:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "cluster22NodesInstanceRole51CD052F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "k8s-cluster/cluster22/Nodes" - } - ] - } - }, - "cluster22NodesInstanceProfile3D4963ED": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "cluster22NodesInstanceRole51CD052F" - } - ] - } - }, - "cluster22NodesLaunchConfig184BF3BA": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.medium", - "IamInstanceProfile": { - "Ref": "cluster22NodesInstanceProfile3D4963ED" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "cluster227BD1CB20" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack k8s-cluster --resource cluster22NodesASGC0A97398 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "cluster22NodesInstanceRole51CD052F" - ] - }, - "cluster22NodesASGC0A97398": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "3", - "MinSize": "1", - "DesiredCapacity": "3", - "LaunchConfigurationName": { - "Ref": "cluster22NodesLaunchConfig184BF3BA" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "k8s-cluster/cluster22/Nodes" - } - ], - "VPCZoneIdentifier": [ - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "cluster22chartdashboard616811AB": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22HelmChartHandler0BAF302E", - "Arn" - ] - }, - "Release": "k8sclustercluster22chartdashboard3844c297", - "Chart": "kubernetes-dashboard", - "Namespace": "default", - "Repository": "https://kubernetes-charts.storage.googleapis.com" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "cluster22HelmChartHandler0BAF302E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653S3BucketD01BFA78" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653S3VersionKeyD67E9179" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653S3VersionKeyD67E9179" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "cluster22ResourceHandlerServiceRoleC2E4F327", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "cluster227BD1CB20" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer200beta1B9303363", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "cluster22ResourceHandlerServiceRoleC2E4F327" - ] - }, - "cluster22chartnginxingress90C2D506": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22HelmChartHandler0BAF302E", - "Arn" - ] - }, - "Release": "k8sclustercluster22chartnginxingress8b03389e", - "Chart": "nginx-ingress", - "Namespace": "kube-system", - "Repository": "https://helm.nginx.com/stable" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "1.13.7" - }, - "Parameters": { - "LayerName": "kubectl-bedb92f2e70f45155fba70d3425dd148" - } - } - }, - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "kubectllayer200beta1B9303363": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "2.0.0-beta1" - }, - "Parameters": { - "LayerName": "kubectl-aa3d1881d348da39094e6b1ce165f580" - } - } - } - }, - "Outputs": { - "cluster22ConfigCommand96B20279": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "cluster227BD1CB20" - }, - " --region test-region" - ] - ] - } - }, - "cluster22GetTokenCommand99DB9B02": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "cluster227BD1CB20" - }, - " --region test-region" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8": { - "Type": "String", - "Description": "S3 bucket for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD": { - "Type": "String", - "Description": "S3 key for asset version \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204ArtifactHashB80B497F": { - "Type": "String", - "Description": "Artifact hash for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB": { - "Type": "String", - "Description": "S3 bucket for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54": { - "Type": "String", - "Description": "S3 key for asset version \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444ArtifactHash606C8127": { - "Type": "String", - "Description": "Artifact hash for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653S3BucketD01BFA78": { - "Type": "String", - "Description": "S3 bucket for asset \"8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653\"" - }, - "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653S3VersionKeyD67E9179": { - "Type": "String", - "Description": "S3 key for asset version \"8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653\"" - }, - "AssetParameters8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653ArtifactHash77099D9F": { - "Type": "String", - "Description": "Artifact hash for asset \"8e2989bd32b411eba804b201a0f3984c984893c7fe6daa0b572fdd59c63e3653\"" - }, - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-kubectl.lit.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-kubectl.lit.expected.json deleted file mode 100644 index a940f5d6d2f91..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-kubectl.lit.expected.json +++ /dev/null @@ -1,1220 +0,0 @@ -[ - { - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "k8s-vpc/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "k8s-vpc/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "k8s-vpc/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - } - }, - "Outputs": { - "ExportsOutputRefvpcA2121C384D1B3CDE": { - "Value": { - "Ref": "vpcA2121C38" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - }, - "ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041": { - "Value": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041" - } - }, - "ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242": { - "Value": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242" - } - }, - "ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271": { - "Value": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - } - }, - "ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE": { - "Value": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - "Export": { - "Name": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - } - } - }, - { - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "cluster22ClusterRole5FC933B4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "cluster22ControlPlaneSecurityGroup2648B9CD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - } - }, - "cluster22ControlPlaneSecurityGroupfromk8sclustercluster22NodesInstanceSecurityGroupF903AE86443C3EDA943": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22NodesInstanceSecurityGroupF903AE86:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "cluster22ResourceHandlerServiceRoleC2E4F327": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "eks:CreateCluster", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "cluster22ClusterRole5FC933B4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "Roles": [ - { - "Ref": "cluster22ResourceHandlerServiceRoleC2E4F327" - } - ] - } - }, - "cluster22ResourceHandler6227579A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "cluster22ResourceHandlerServiceRoleC2E4F327", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "cluster22ResourceHandlerServiceRoleC2E4F327" - ] - }, - "cluster227BD1CB20": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22ResourceHandler6227579A", - "Arn" - ] - }, - "Config": { - "roleArn": { - "Fn::GetAtt": [ - "cluster22ClusterRole5FC933B4", - "Arn" - ] - }, - "resourcesVpcConfig": { - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - } - ], - "subnetIds": [ - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPublicSubnet1Subnet2E65531ECCB85041" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPublicSubnet2Subnet009B674FB900C242" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "cluster22KubernetesResourceHandler599F07E6": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "cluster22ResourceHandlerServiceRoleC2E4F327", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "cluster227BD1CB20" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "cluster22ResourceHandlerServiceRoleDefaultPolicy1D33C3AC", - "cluster22ResourceHandlerServiceRoleC2E4F327" - ] - }, - "cluster22AwsAuthmanifest4685C84D": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22KubernetesResourceHandler599F07E6", - "Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "cluster22NodesInstanceRole51CD052F", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "cluster22NodesInstanceSecurityGroup4A3CDC24": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "k8s-cluster/cluster22/Nodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "k8s-cluster/cluster22/Nodes" - } - ], - "VpcId": { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcA2121C384D1B3CDE" - } - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22NodesInstanceSecurityGroupF903AE86ALLTRAFFIC774C7781": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from k8sclustercluster22NodesInstanceSecurityGroupF903AE86:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - } - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22ControlPlaneSecurityGroup3B5F21B44434A6E344D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22ControlPlaneSecurityGroup3B5F21B4:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "cluster22NodesInstanceSecurityGroupfromk8sclustercluster22ControlPlaneSecurityGroup3B5F21B41025655355658FCAA": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from k8sclustercluster22ControlPlaneSecurityGroup3B5F21B4:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "cluster22ControlPlaneSecurityGroup2648B9CD", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "cluster22NodesInstanceRole51CD052F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "k8s-cluster/cluster22/Nodes" - } - ] - } - }, - "cluster22NodesInstanceProfile3D4963ED": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "cluster22NodesInstanceRole51CD052F" - } - ] - } - }, - "cluster22NodesLaunchConfig184BF3BA": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.medium", - "IamInstanceProfile": { - "Ref": "cluster22NodesInstanceProfile3D4963ED" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "cluster22NodesInstanceSecurityGroup4A3CDC24", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "cluster227BD1CB20" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack k8s-cluster --resource cluster22NodesASGC0A97398 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "cluster22NodesInstanceRole51CD052F" - ] - }, - "cluster22NodesASGC0A97398": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "3", - "MinSize": "1", - "DesiredCapacity": "3", - "LaunchConfigurationName": { - "Ref": "cluster22NodesLaunchConfig184BF3BA" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "cluster227BD1CB20" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "k8s-cluster/cluster22/Nodes" - } - ], - "VPCZoneIdentifier": [ - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet1Subnet934893E8236E2271" - }, - { - "Fn::ImportValue": "k8s-vpc:ExportsOutputRefvpcPrivateSubnet2Subnet7031C2BA60DCB1EE" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "cluster22manifesthellokubernetes849F52EA": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "cluster22KubernetesResourceHandler599F07E6", - "Arn" - ] - }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-kubernetes\"},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":80,\"targetPort\":8080}],\"selector\":{\"app\":\"hello-kubernetes\"}}},{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-kubernetes\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"hello-kubernetes\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"hello-kubernetes\"}},\"spec\":{\"containers\":[{\"name\":\"hello-kubernetes\",\"image\":\"paulbouwer/hello-kubernetes:1.5\",\"ports\":[{\"containerPort\":8080}]}]}}}}]" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "1.13.7" - }, - "Parameters": { - "LayerName": "kubectl-bedb92f2e70f45155fba70d3425dd148" - } - } - }, - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - } - }, - "Outputs": { - "cluster22ConfigCommand96B20279": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "cluster227BD1CB20" - }, - " --region test-region" - ] - ] - } - }, - "cluster22GetTokenCommand99DB9B02": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "cluster227BD1CB20" - }, - " --region test-region" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8": { - "Type": "String", - "Description": "S3 bucket for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD": { - "Type": "String", - "Description": "S3 key for asset version \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204ArtifactHashB80B497F": { - "Type": "String", - "Description": "Artifact hash for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB": { - "Type": "String", - "Description": "S3 bucket for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54": { - "Type": "String", - "Description": "S3 key for asset version \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444ArtifactHash606C8127": { - "Type": "String", - "Description": "Artifact hash for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-spot.expected.json b/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-spot.expected.json deleted file mode 100644 index 86083856ff4db..0000000000000 --- a/packages/@aws-cdk/aws-eks-legacy/test/integ.eks-spot.expected.json +++ /dev/null @@ -1,1451 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-eks-spot/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-eks-spot/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "myClusterClusterRoleF3B08D5F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSServicePolicy" - ] - ] - } - ] - } - }, - "myClusterControlPlaneSecurityGroupD42800D0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - } - }, - "myClusterControlPlaneSecurityGroupfromintegeksspotmyClusterDefaultCapacityInstanceSecurityGroup8EBC6D914435857A9D2": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterDefaultCapacityInstanceSecurityGroup8EBC6D91:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "myClusterControlPlaneSecurityGroupfromintegeksspotmyClusterspotInstanceSecurityGroup4D0BAA4D443BF12370D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterspotInstanceSecurityGroup4D0BAA4D:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "myClusterResourceHandlerServiceRole95F554E2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myClusterResourceHandlerServiceRoleDefaultPolicyB0BF3AD3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "eks:CreateCluster", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myClusterClusterRoleF3B08D5F", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "myClusterResourceHandlerServiceRoleDefaultPolicyB0BF3AD3", - "Roles": [ - { - "Ref": "myClusterResourceHandlerServiceRole95F554E2" - } - ] - } - }, - "myClusterResourceHandler19D131C9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myClusterResourceHandlerServiceRole95F554E2", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "myClusterResourceHandlerServiceRoleDefaultPolicyB0BF3AD3", - "myClusterResourceHandlerServiceRole95F554E2" - ] - }, - "myClusterE51CD07F": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "myClusterResourceHandler19D131C9", - "Arn" - ] - }, - "Config": { - "roleArn": { - "Fn::GetAtt": [ - "myClusterClusterRoleF3B08D5F", - "Arn" - ] - }, - "resourcesVpcConfig": { - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - } - ], - "subnetIds": [ - { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ] - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myClusterKubernetesResourceHandler50297E32": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myClusterResourceHandlerServiceRole95F554E2", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER_NAME": { - "Ref": "myClusterE51CD07F" - } - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::GetAtt": [ - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA", - "Outputs.LayerVersionArn" - ] - } - ], - "MemorySize": 256, - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "myClusterResourceHandlerServiceRoleDefaultPolicyB0BF3AD3", - "myClusterResourceHandlerServiceRole95F554E2" - ] - }, - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-eks-spot/myCluster/DefaultCapacity/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/myCluster/DefaultCapacity" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - } - }, - "myClusterDefaultCapacityInstanceSecurityGroupfromintegeksspotmyClusterDefaultCapacityInstanceSecurityGroup8EBC6D91ALLTRAFFIC50C0DBE7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from integeksspotmyClusterDefaultCapacityInstanceSecurityGroup8EBC6D91:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - } - } - }, - "myClusterDefaultCapacityInstanceSecurityGroupfromintegeksspotmyClusterControlPlaneSecurityGroupC4434A844430734956F": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterControlPlaneSecurityGroupC4434A84:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "myClusterDefaultCapacityInstanceSecurityGroupfromintegeksspotmyClusterControlPlaneSecurityGroupC4434A84102565535234C3C38": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterControlPlaneSecurityGroupC4434A84:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "myClusterDefaultCapacityInstanceRoleA36E0984": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/myCluster/DefaultCapacity" - } - ] - } - }, - "myClusterDefaultCapacityInstanceProfileE7E48198": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "myClusterDefaultCapacityInstanceRoleA36E0984" - } - ] - } - }, - "myClusterDefaultCapacityLaunchConfigCF6D4B81": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "m5.large", - "IamInstanceProfile": { - "Ref": "myClusterDefaultCapacityInstanceProfileE7E48198" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceSecurityGroup22595F6B", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "myClusterE51CD07F" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack integ-eks-spot --resource myClusterDefaultCapacityASGF3FE3A19 --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "myClusterDefaultCapacityInstanceRoleA36E0984" - ] - }, - "myClusterDefaultCapacityASGF3FE3A19": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "1", - "DesiredCapacity": "2", - "LaunchConfigurationName": { - "Ref": "myClusterDefaultCapacityLaunchConfigCF6D4B81" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "integ-eks-spot/myCluster/DefaultCapacity" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "myClusterAwsAuthmanifest66DDDCBC": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "myClusterKubernetesResourceHandler50297E32", - "Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "myClusterDefaultCapacityInstanceRoleA36E0984", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "myClusterspotInstanceRole03AE80B5", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "myClusterspotInstanceSecurityGroupE76CC584": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-eks-spot/myCluster/spot/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/myCluster/spot" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - } - }, - "myClusterspotInstanceSecurityGroupfromintegeksspotmyClusterspotInstanceSecurityGroup4D0BAA4DALLTRAFFIC6AB5F7A7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from integeksspotmyClusterspotInstanceSecurityGroup4D0BAA4D:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - } - } - }, - "myClusterspotInstanceSecurityGroupfromintegeksspotmyClusterControlPlaneSecurityGroupC4434A84443CAF82847": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterControlPlaneSecurityGroupC4434A84:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "myClusterspotInstanceSecurityGroupfromintegeksspotmyClusterControlPlaneSecurityGroupC4434A8410256553577BCEBCC": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from integeksspotmyClusterControlPlaneSecurityGroupC4434A84:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "myClusterControlPlaneSecurityGroupD42800D0", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "myClusterspotInstanceRole03AE80B5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "integ-eks-spot/myCluster/spot" - } - ] - } - }, - "myClusterspotInstanceProfile93D80EE5": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "myClusterspotInstanceRole03AE80B5" - } - ] - } - }, - "myClusterspotLaunchConfig6681F311": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.large", - "IamInstanceProfile": { - "Ref": "myClusterspotInstanceProfile93D80EE5" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "myClusterspotInstanceSecurityGroupE76CC584", - "GroupId" - ] - } - ], - "SpotPrice": "0.1094", - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "myClusterE51CD07F" - }, - " --kubelet-extra-args \"--node-labels lifecycle=Ec2Spot --register-with-taints=spotInstance=true:PreferNoSchedule --node-labels foo=bar,goo=far\" --use-max-pods true --aws-api-retry-attempts 5\n/opt/aws/bin/cfn-signal --exit-code $? --stack integ-eks-spot --resource myClusterspotASG5D95FD2F --region test-region" - ] - ] - } - } - }, - "DependsOn": [ - "myClusterspotInstanceRole03AE80B5" - ] - }, - "myClusterspotASG5D95FD2F": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "10", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "myClusterspotLaunchConfig6681F311" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "myClusterE51CD07F" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "integ-eks-spot/myCluster/spot" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ] - }, - "UpdatePolicy": { - "AutoScalingRollingUpdate": { - "WaitOnResourceSignals": false, - "PauseTime": "PT0S", - "SuspendProcesses": [ - "HealthCheck", - "ReplaceUnhealthy", - "AZRebalance", - "AlarmNotification", - "ScheduledActions" - ] - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "myClustermanifestspotinterrupthandler0542CCD2": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "myClusterKubernetesResourceHandler50297E32", - "Arn" - ] - }, - "Manifest": "[{\"kind\":\"ClusterRole\",\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"metadata\":{\"name\":\"node-termination-handler\",\"namespace\":\"default\"},\"rules\":[{\"apiGroups\":[\"apps\"],\"resources\":[\"daemonsets\"],\"verbs\":[\"get\",\"delete\"]},{\"apiGroups\":[\"\"],\"resources\":[\"*\"],\"verbs\":[\"*\"]},{\"apiGroups\":[\"rbac.authorization.k8s.io\"],\"resources\":[\"*\"],\"verbs\":[\"*\"]},{\"apiGroups\":[\"apiextensions.k8s.io\"],\"resources\":[\"customresourcedefinitions\"],\"verbs\":[\"get\",\"list\",\"watch\",\"create\",\"delete\"]}]},{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"node-termination-handler\"}},{\"kind\":\"ClusterRoleBinding\",\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"metadata\":{\"name\":\"node-termination-handler\",\"namespace\":\"default\"},\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"node-termination-handler\",\"namespace\":\"default\"}],\"roleRef\":{\"kind\":\"ClusterRole\",\"name\":\"node-termination-handler\",\"apiGroup\":\"rbac.authorization.k8s.io\"}},{\"apiVersion\":\"apps/v1beta2\",\"kind\":\"DaemonSet\",\"metadata\":{\"name\":\"node-termination-handler\",\"namespace\":\"default\"},\"spec\":{\"selector\":{\"matchLabels\":{\"app\":\"node-termination-handler\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"node-termination-handler\"}},\"spec\":{\"serviceAccountName\":\"node-termination-handler\",\"containers\":[{\"name\":\"node-termination-handler\",\"image\":\"amazon/aws-node-termination-handler:v1.0.0\",\"imagePullPolicy\":\"Always\",\"env\":[{\"name\":\"NODE_NAME\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"spec.nodeName\"}}},{\"name\":\"POD_NAME\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"metadata.name\"}}},{\"name\":\"NAMESPACE\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"metadata.namespace\"}}},{\"name\":\"SPOT_POD_IP\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"status.podIP\"}}}],\"resources\":{\"requests\":{\"memory\":\"64Mi\",\"cpu\":\"50m\"},\"limits\":{\"memory\":\"128Mi\",\"cpu\":\"100m\"}}}],\"nodeSelector\":{\"lifecycle\":\"Ec2Spot\"}}}}}]" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "kubectllayer8C2542BCBF2B4DFEB765E181FD30A9A0617C4ADA": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": "arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl", - "SemanticVersion": "1.13.7" - }, - "Parameters": { - "LayerName": "kubectl-e3c1a5897fab23abec558d991fea218c" - } - } - } - }, - "Outputs": { - "myClusterConfigCommandAC521B60": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "myClusterE51CD07F" - }, - " --region test-region" - ] - ] - } - }, - "myClusterGetTokenCommandF3F07390": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "myClusterE51CD07F" - }, - " --region test-region" - ] - ] - } - } - }, - "Parameters": { - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3Bucket371D99F8": { - "Type": "String", - "Description": "S3 bucket for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204S3VersionKeyFDCB25DD": { - "Type": "String", - "Description": "S3 key for asset version \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParametersea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204ArtifactHashB80B497F": { - "Type": "String", - "Description": "Artifact hash for asset \"ea4957b16062595851e7d293ee45835db05c5693669a729cc02944b6ad19a204\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3Bucket919126CB": { - "Type": "String", - "Description": "S3 bucket for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444S3VersionKey529BEF54": { - "Type": "String", - "Description": "S3 key for asset version \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "AssetParameters640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444ArtifactHash606C8127": { - "Type": "String", - "Description": "Artifact hash for asset \"640847533c8a00b3133aeb128edcac41fb7b60349c9e18764fcf7ea4af14d444\"" - }, - "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json b/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json deleted file mode 100644 index b040d284e6b1a..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.alb-controller.expected.json +++ /dev/null @@ -1,2150 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.64.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.128.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.192.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProviderframeworkonEventB8A2CF0DArn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterMastersRole9AA35625": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterOpenIdConnectProviderE7EB0530": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "sts.amazonaws.com" - ], - "ThumbprintList": [ - "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" - ], - "Url": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuerUrl" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "Clusterechoserver5815619F": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-server-deployment-c852e88c\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"}},\"template\":{\"metadata\":{\"labels\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"}},\"spec\":{\"containers\":[{\"args\":[\"-text\",\"hello\"],\"env\":[],\"image\":\"hashicorp/http-echo\",\"imagePullPolicy\":\"Always\",\"name\":\"main\",\"ports\":[{\"containerPort\":5678}],\"volumeMounts\":[]}],\"volumes\":[]}}}},{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-server-deployment-service-c8fd9c61\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"externalIPs\":[],\"ports\":[{\"port\":5678,\"targetPort\":5678}],\"selector\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"},\"type\":\"NodePort\"}},{\"apiVersion\":\"networking.k8s.io/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"kubernetes.io/ingress.class\":\"alb\",\"alb.ingress.kubernetes.io/scheme\":\"internal\",\"alb.ingress.kubernetes.io/inbound-cidrs\":\"", - { - "Fn::GetAtt": [ - "Vpc8378EB38", - "CidrBlock" - ] - }, - "\"},\"name\":\"hello-server-deployment-service-ingress-c896bd7e\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"rules\":[{\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"hello-server-deployment-service-c8fd9c61\",\"servicePort\":5678},\"path\":\"/\"}]}}]}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04" - }, - "DependsOn": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86", - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0": { - "Type": "Custom::AWSCDK-EKS-KubernetesObjectValue", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "ObjectType": "ingress", - "ObjectName": "hello-server-deployment-service-ingress-c896bd7e", - "ObjectNamespace": "default", - "JsonPath": ".status.loadBalancer.ingress[0].hostname", - "TimeoutSeconds": 600 - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbS3Bucket38E77E5E" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbS3VersionKeyED8A3BD8" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbS3VersionKeyED8A3BD8" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket11BD506ARef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyCDACFD96Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketC19FFBF9Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey33198584Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8S3Bucket9955477E" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8S3VersionKey29F6626C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8S3VersionKey29F6626C" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3BucketA8BA1BB9Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKey9A9C820BRef": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketF1164D42Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyB222EFA5Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket65F5BE5ARef": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey036DDFD3Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketC19FFBF9Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey33198584Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A": { - "Type": "Custom::AWSCDKCfnJson", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", - "Arn" - ] - }, - "Value": { - "Fn::Join": [ - "", - [ - "{\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":aud\":\"sts.amazonaws.com\",\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":sub\":\"system:serviceaccount:kube-system:aws-load-balancer-controller\"}" - ] - ] - } - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "Fn::GetAtt": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "Value" - ] - } - }, - "Effect": "Allow", - "Principal": { - "Federated": { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ] - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Condition": { - "StringEquals": { - "iam:AWSServiceName": "elasticloadbalancing.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "acm:DescribeCertificate", - "acm:ListCertificates", - "cognito-idp:DescribeUserPoolClient", - "ec2:AuthorizeSecurityGroupIngress", - "ec2:CreateSecurityGroup", - "ec2:DescribeAccountAttributes", - "ec2:DescribeAddresses", - "ec2:DescribeAvailabilityZones", - "ec2:DescribeCoipPools", - "ec2:DescribeInstances", - "ec2:DescribeInternetGateways", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeTags", - "ec2:DescribeVpcPeeringConnections", - "ec2:DescribeVpcs", - "ec2:GetCoipPoolUsage", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:AddListenerCertificates", - "elasticloadbalancing:CreateListener", - "elasticloadbalancing:CreateRule", - "elasticloadbalancing:DeleteListener", - "elasticloadbalancing:DeleteRule", - "elasticloadbalancing:DescribeListenerCertificates", - "elasticloadbalancing:DescribeListeners", - "elasticloadbalancing:DescribeLoadBalancerAttributes", - "elasticloadbalancing:DescribeLoadBalancers", - "elasticloadbalancing:DescribeRules", - "elasticloadbalancing:DescribeSSLPolicies", - "elasticloadbalancing:DescribeTags", - "elasticloadbalancing:DescribeTargetGroupAttributes", - "elasticloadbalancing:DescribeTargetGroups", - "elasticloadbalancing:DescribeTargetHealth", - "elasticloadbalancing:ModifyListener", - "elasticloadbalancing:ModifyRule", - "elasticloadbalancing:RemoveListenerCertificates", - "elasticloadbalancing:SetWebAcl", - "iam:GetServerCertificate", - "iam:ListServerCertificates", - "shield:CreateProtection", - "shield:DeleteProtection", - "shield:DescribeProtection", - "shield:GetSubscriptionState", - "waf-regional:AssociateWebACL", - "waf-regional:DisassociateWebACL", - "waf-regional:GetWebACL", - "waf-regional:GetWebACLForResource", - "wafv2:AssociateWebACL", - "wafv2:DisassociateWebACL", - "wafv2:GetWebACL", - "wafv2:GetWebACLForResource" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "ec2:CreateTags", - "Condition": { - "StringEquals": { - "ec2:CreateAction": "CreateSecurityGroup" - }, - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:CreateTags", - "ec2:DeleteTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:AuthorizeSecurityGroupIngress", - "ec2:DeleteSecurityGroup", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:DeleteLoadBalancer", - "elasticloadbalancing:DeleteTargetGroup", - "elasticloadbalancing:ModifyLoadBalancerAttributes", - "elasticloadbalancing:ModifyTargetGroup", - "elasticloadbalancing:ModifyTargetGroupAttributes", - "elasticloadbalancing:SetIpAddressType", - "elasticloadbalancing:SetSecurityGroups", - "elasticloadbalancing:SetSubnets" - ], - "Condition": { - "Null": { - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:CreateLoadBalancer", - "elasticloadbalancing:CreateTargetGroup" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*", - "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*", - "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:DeregisterTargets", - "elasticloadbalancing:RegisterTargets" - ], - "Effect": "Allow", - "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "Roles": [ - { - "Ref": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927" - } - ] - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ] - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"aws-load-balancer-controller\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0\":\"\",\"app.kubernetes.io/name\":\"aws-load-balancer-controller\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", - { - "Fn::GetAtt": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "Arn" - ] - }, - "\"}}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "aws-load-balancer-controller", - "Chart": "aws-load-balancer-controller", - "Version": "1.2.7", - "Wait": true, - "Timeout": "900s", - "Values": { - "Fn::Join": [ - "", - [ - "{\"clusterName\":\"", - { - "Ref": "Cluster9EE0221C" - }, - "\",\"serviceAccount\":{\"create\":false,\"name\":\"aws-load-balancer-controller\"},\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"vpcId\":\"", - { - "Ref": "Vpc8378EB38" - }, - "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.4.1\"}}" - ] - ] - }, - "Namespace": "kube-system", - "Repository": "https://aws.github.io/eks-charts", - "CreateNamespace": true - }, - "DependsOn": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "ClusterAwsAuthmanifestFE51F8AE", - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3", - "ClusterOpenIdConnectProviderE7EB0530" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "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", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } - ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" - ] - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { - "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" - } - ] - } - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" - ] - }, - "IngressPingerFunctionServiceRoleD01E9C19": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - } - }, - "IngressPingerFunctionSecurityGroup77C60B1A": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function awscdkeksclusteralbcontrollertestIngressPingerFunction2F7B2C81", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "IngressPingerFunction54746D9B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "IngressPingerFunctionServiceRoleD01E9C19", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6", - "Timeout": 600, - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "IngressPingerFunctionSecurityGroup77C60B1A", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "DependsOn": [ - "IngressPingerFunctionServiceRoleD01E9C19" - ] - }, - "IngressPingerProviderframeworkonEventServiceRole89300FAD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", - "Roles": [ - { - "Ref": "IngressPingerProviderframeworkonEventServiceRole89300FAD" - } - ] - } - }, - "IngressPingerProviderframeworkonEventEE5AD360": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "IngressPingerProviderframeworkonEventServiceRole89300FAD", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-eks-cluster-alb-controller-test/IngressPinger/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", - "IngressPingerProviderframeworkonEventServiceRole89300FAD" - ] - }, - "IngressPinger1AD9E831": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "IngressPingerProviderframeworkonEventEE5AD360", - "Arn" - ] - }, - "Url": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0", - "Value" - ] - } - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - } - ] - ] - } - }, - "IngressPingerResponse": { - "Value": { - "Fn::GetAtt": [ - "IngressPinger1AD9E831", - "Value" - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959": { - "Type": "String", - "Description": "S3 bucket for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E": { - "Type": "String", - "Description": "S3 key for asset version \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550": { - "Type": "String", - "Description": "S3 bucket for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65": { - "Type": "String", - "Description": "S3 key for asset version \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dArtifactHashBEC87846": { - "Type": "String", - "Description": "Artifact hash for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbS3Bucket38E77E5E": { - "Type": "String", - "Description": "S3 bucket for asset \"faabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdb\"" - }, - "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbS3VersionKeyED8A3BD8": { - "Type": "String", - "Description": "S3 key for asset version \"faabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdb\"" - }, - "AssetParametersfaabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdbArtifactHash5910F260": { - "Type": "String", - "Description": "Artifact hash for asset \"faabc35449c3d0930c43d4a87d32bab8602cd36f0b6b304771fed2da1c595bdb\"" - }, - "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8S3Bucket9955477E": { - "Type": "String", - "Description": "S3 bucket for asset \"c6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8\"" - }, - "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8S3VersionKey29F6626C": { - "Type": "String", - "Description": "S3 key for asset version \"c6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8\"" - }, - "AssetParametersc6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8ArtifactHash4C30B00A": { - "Type": "String", - "Description": "Artifact hash for asset \"c6b89b7f99b418347c3be5d29c397a47430f726c4b891481397fc66c420a1cb8\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.expected.json deleted file mode 100644 index bc0c2b9ceb7f1..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.expected.json +++ /dev/null @@ -1,1432 +0,0 @@ -{ - "Resources": { - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclustertestawscdkawseksClusterResourceProviderframeworkonEvent503C1667Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupBottlerocketNG1NodeGroupRoleF0E6A2C6", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupBottlerocketNG2NodeGroupRole8BD62EDB", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupBottlerocketNG1NodeGroupRoleF0E6A2C6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupBottlerocketNG1B78D1784": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupBottlerocketNG1NodeGroupRoleF0E6A2C6", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "BOTTLEROCKET_x86_64", - "ForceUpdateEnabled": true, - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 1 - } - } - }, - "ClusterNodegroupBottlerocketNG2NodeGroupRole8BD62EDB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupBottlerocketNG299226DAB": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupBottlerocketNG2NodeGroupRole8BD62EDB", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "BOTTLEROCKET_ARM_64", - "ForceUpdateEnabled": true, - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 1 - } - } - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dS3BucketD96275A1" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dS3VersionKey024E5D87" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dS3VersionKey024E5D87" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket1BB3BF46Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyC416ABD8Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclustertestClusterCreationRole95F44854Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket21BC7ECERef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey31720EE9Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket98314848Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4302577BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9S3Bucket4CF1C673" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9S3VersionKeyE65071B2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9S3VersionKeyE65071B2" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclustertestClusterD76DFF87Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclustertestClusterCreationRole95F44854Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket1FA24F91Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyA4D2B6C0Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet2Subnet5CC53627Ref": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet3Subnet7F5D6918Ref": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - }, - "referencetoawscdkeksclustertestClusterD76DFF87ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3Bucket33751354Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKey6157E093Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket6ADB5CE5Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey314C5B11Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket98314848Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4302577BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dS3BucketD96275A1": { - "Type": "String", - "Description": "S3 bucket for asset \"1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1d\"" - }, - "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dS3VersionKey024E5D87": { - "Type": "String", - "Description": "S3 key for asset version \"1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1d\"" - }, - "AssetParameters1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1dArtifactHashA74D92A4": { - "Type": "String", - "Description": "Artifact hash for asset \"1f3c4682820cbd547d94116e520edc61871b31f04ecb3e8e539eb0736ba0eb1d\"" - }, - "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9S3Bucket4CF1C673": { - "Type": "String", - "Description": "S3 bucket for asset \"88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9\"" - }, - "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9S3VersionKeyE65071B2": { - "Type": "String", - "Description": "S3 key for asset version \"88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9\"" - }, - "AssetParameters88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9ArtifactHash9B245753": { - "Type": "String", - "Description": "Artifact hash for asset \"88761c50eaebe4af50884d1d19067e4ca6bb185a81b1ec81465d6c5fa51de2e9\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-handlers-vpc.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-handlers-vpc.expected.json deleted file mode 100644 index 206f14ce63a1c..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-handlers-vpc.expected.json +++ /dev/null @@ -1,1435 +0,0 @@ -{ - "Resources": { - "EksAllHandlersInVpcStackDefaultVpcBE11D4AE": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTableAssociation1012ACB8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1DefaultRoute8E294BC5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1" - } - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4" - ] - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1EIP9380B54C": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1NATGatewayFD57AC6C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1EIP9380B54C", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableAssociation5DFA3BFD": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2DefaultRouteC7B27F81": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1" - } - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4" - ] - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2EIP9186922F": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2NATGatewayEC0B8252": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2EIP9186922F", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTableAssociationEA306E19": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3DefaultRoute965D74B7": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1" - } - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4" - ] - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3EIPBF5ED908": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3NATGateway7AE6F6B3": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3EIPBF5ED908", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableAssociationC09E4B48": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1DefaultRoute27B45BF6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1NATGatewayFD57AC6C" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTableAssociation475205D6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2DefaultRoute8A741F7F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2NATGatewayEC0B8252" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTableAssociationC07A6A83": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C" - }, - "SubnetId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3DefaultRoute203EAFA4": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3NATGateway7AE6F6B3" - } - } - }, - "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-handlers-in-vpc-test/EksAllHandlersInVpcStack/DefaultVpc" - } - ] - } - }, - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "InternetGatewayId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1" - } - } - }, - "EksAllHandlersInVpcStackRoleC36F09F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "EksAllHandlersInVpcStackControlPlaneSecurityGroup10B6E594": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - } - } - }, - "EksAllHandlersInVpcStackCreationRole0BAA4CDC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1DefaultRoute27B45BF6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableAssociationC09E4B48", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2DefaultRoute8A741F7F", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTableAssociation475205D6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3DefaultRoute203EAFA4", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTableAssociationC07A6A83", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1DefaultRoute8E294BC5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1EIP9380B54C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1NATGatewayFD57AC6C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTableAssociation1012ACB8", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2DefaultRouteC7B27F81", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2EIP9186922F", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2NATGatewayEC0B8252", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableAssociation5DFA3BFD", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3DefaultRoute965D74B7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3EIPBF5ED908", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3NATGateway7AE6F6B3", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTableAssociationEA306E19", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F", - "EksAllHandlersInVpcStackDefaultVpcBE11D4AE", - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4" - ] - }, - "EksAllHandlersInVpcStackCreationRoleDefaultPolicy783D59F3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackRoleC36F09F0", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EksAllHandlersInVpcStackCreationRoleDefaultPolicy783D59F3", - "Roles": [ - { - "Ref": "EksAllHandlersInVpcStackCreationRole0BAA4CDC" - } - ] - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1DefaultRoute27B45BF6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableAssociationC09E4B48", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2DefaultRoute8A741F7F", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTableAssociation475205D6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3DefaultRoute203EAFA4", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTableAssociationC07A6A83", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1DefaultRoute8E294BC5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1EIP9380B54C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1NATGatewayFD57AC6C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTableAssociation1012ACB8", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2DefaultRouteC7B27F81", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2EIP9186922F", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2NATGatewayEC0B8252", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableAssociation5DFA3BFD", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3DefaultRoute965D74B7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3EIPBF5ED908", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3NATGateway7AE6F6B3", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTableAssociationEA306E19", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F", - "EksAllHandlersInVpcStackDefaultVpcBE11D4AE", - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4" - ] - }, - "EksAllHandlersInVpcStack9ED695D7": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkekshandlersinvpctestawscdkawseksClusterResourceProviderframeworkonEvent5C6C2463Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackRoleC36F09F0", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackControlPlaneSecurityGroup10B6E594", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackCreationRole0BAA4CDC", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "EksAllHandlersInVpcStackDefaultVpcIGW916D42F1", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1DefaultRoute27B45BF6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableF214D04E", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1RouteTableAssociationC09E4B48", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2DefaultRoute8A741F7F", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTable22627B70", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2RouteTableAssociation475205D6", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3DefaultRoute203EAFA4", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTable19D4047C", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3RouteTableAssociationC07A6A83", - "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1DefaultRoute8E294BC5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1EIP9380B54C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1NATGatewayFD57AC6C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTable183714C5", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1RouteTableAssociation1012ACB8", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet1SubnetEA05A5C7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2DefaultRouteC7B27F81", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2EIP9186922F", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2NATGatewayEC0B8252", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableE4762B74", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2RouteTableAssociation5DFA3BFD", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet2Subnet8A9F7D50", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3DefaultRoute965D74B7", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3EIPBF5ED908", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3NATGateway7AE6F6B3", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTable85E4266C", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3RouteTableAssociationEA306E19", - "EksAllHandlersInVpcStackDefaultVpcPublicSubnet3SubnetB436275F", - "EksAllHandlersInVpcStackDefaultVpcBE11D4AE", - "EksAllHandlersInVpcStackDefaultVpcVPCGW5DC3BDB4", - "EksAllHandlersInVpcStackCreationRoleDefaultPolicy783D59F3", - "EksAllHandlersInVpcStackCreationRole0BAA4CDC" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EksAllHandlersInVpcStackKubectlReadyBarrier8687350F": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "EksAllHandlersInVpcStackCreationRoleDefaultPolicy783D59F3", - "EksAllHandlersInVpcStackCreationRole0BAA4CDC", - "EksAllHandlersInVpcStack9ED695D7" - ] - }, - "EksAllHandlersInVpcStackMastersRole825EE5E6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EksAllHandlersInVpcStackAwsAuthmanifest66335CD9": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkekshandlersinvpctestawscdkawseksKubectlProviderframeworkonEventB8D0A5E7Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c8fa2698c0d935568a51a7732ad19350286b302ae8\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackMastersRole825EE5E6", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackMastersRole825EE5E6", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackNodegroupDefaultCapacityNodeGroupRoleFFBF949C", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "EksAllHandlersInVpcStack9ED695D7" - }, - "RoleArn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackCreationRole0BAA4CDC", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8fa2698c0d935568a51a7732ad19350286b302ae8", - "Overwrite": true - }, - "DependsOn": [ - "EksAllHandlersInVpcStackKubectlReadyBarrier8687350F" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EksAllHandlersInVpcStackNodegroupDefaultCapacityNodeGroupRoleFFBF949C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "EksAllHandlersInVpcStackNodegroupDefaultCapacityD8DD5ECF": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "EksAllHandlersInVpcStack9ED695D7" - }, - "NodeRole": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackNodegroupDefaultCapacityNodeGroupRoleFFBF949C", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3" - }, - { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeS3Bucket8B2B79B2" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeS3VersionKey7CAD92BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeS3VersionKey7CAD92BE" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkekshandlersinvpctestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket6DC627E9Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey9AC6A4FARef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackCreationRoleADAAC7FDArn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackCreationRole0BAA4CDC", - "Arn" - ] - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcE40EA7ACRef": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3BucketCEF22FB7Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey64FA2EA1Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet1Subnet9479BAA8Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet2Subnet9480A740Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet3Subnet1B127970Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket87D96D8BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyEADC88E8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daS3Bucket271A108D" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daS3VersionKey2F59CF05" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daS3VersionKey2F59CF05" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStack429D29C0Arn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStack9ED695D7", - "Arn" - ] - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackCreationRoleADAAC7FDArn": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackCreationRole0BAA4CDC", - "Arn" - ] - }, - "referencetoawscdkekshandlersinvpctestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket00F0F0C9Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkekshandlersinvpctestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyD069F335Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet1Subnet9479BAA8Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet1SubnetE2B86978" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet2Subnet9480A740Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet2SubnetFBAAF3E3" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcPrivateSubnet3Subnet1B127970Ref": { - "Ref": "EksAllHandlersInVpcStackDefaultVpcPrivateSubnet3SubnetA75A8BA9" - }, - "referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStack429D29C0ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStack9ED695D7", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkekshandlersinvpctestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3Bucket627417C4Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKey8A2E8A40Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkekshandlersinvpctestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket95C9D5A0Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkekshandlersinvpctestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey2505ECB3Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket87D96D8BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkekshandlersinvpctestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyEADC88E8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "EksAllHandlersInVpcStackConfigCommandE25F67E8": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "EksAllHandlersInVpcStack9ED695D7" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackMastersRole825EE5E6", - "Arn" - ] - } - ] - ] - } - }, - "EksAllHandlersInVpcStackGetTokenCommand5EB9ED5B": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "EksAllHandlersInVpcStack9ED695D7" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "EksAllHandlersInVpcStackMastersRole825EE5E6", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeS3Bucket8B2B79B2": { - "Type": "String", - "Description": "S3 bucket for asset \"13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3ee\"" - }, - "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeS3VersionKey7CAD92BE": { - "Type": "String", - "Description": "S3 key for asset version \"13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3ee\"" - }, - "AssetParameters13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3eeArtifactHashA3116254": { - "Type": "String", - "Description": "Artifact hash for asset \"13bd645d17feafb9e322f596cb459dd8e172b0575f4d6eaf96629f0f9532a3ee\"" - }, - "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daS3Bucket271A108D": { - "Type": "String", - "Description": "S3 bucket for asset \"f1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6da\"" - }, - "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daS3VersionKey2F59CF05": { - "Type": "String", - "Description": "S3 key for asset version \"f1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6da\"" - }, - "AssetParametersf1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6daArtifactHash5D3D03A6": { - "Type": "String", - "Description": "Artifact hash for asset \"f1d28323e153b4f0ff593a7ac4c84ed0bcf9c509b6b34b4509cf55d1a8dea6da\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.expected.json deleted file mode 100644 index c1e6b872731de..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.expected.json +++ /dev/null @@ -1,1356 +0,0 @@ -{ - "Resources": { - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-private-endpoint-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclusterprivateendpointtestawscdkawseksClusterResourceProviderframeworkonEvent080B290CArn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": false, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterprivateendpointtestawscdkawseksKubectlProviderframeworkonEventC2C76E2FArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "Clustermanifestconfigmap3F180550": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterprivateendpointtestawscdkawseksKubectlProviderframeworkonEventC2C76E2FArn" - ] - }, - "Manifest": "[{\"kind\":\"ConfigMap\",\"apiVersion\":\"v1\",\"data\":{\"hello\":\"world\"},\"metadata\":{\"name\":\"config-map\"}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - } - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cS3Bucket04044F75" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cS3VersionKey64086FC0" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cS3VersionKey64086FC0" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusterprivateendpointtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket34ED2DA8Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyCF24561BRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclusterprivateendpointtestClusterCreationRole990BAAEAArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3BucketEC0E9C9FRef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey90699F60Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket8625E205Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyE4510C91Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1S3BucketD1155820" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1S3VersionKeyEFB2586A" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1S3VersionKeyEFB2586A" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusterprivateendpointtestClusterF4CF4FE8Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclusterprivateendpointtestClusterCreationRole990BAAEAArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket985EEE34Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKey705FAD72Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksclusterprivateendpointtestVpcPrivateSubnet1Subnet94DAD769Ref": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclusterprivateendpointtestVpcPrivateSubnet2Subnet04963C08Ref": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclusterprivateendpointtestVpcPrivateSubnet3SubnetC47FD39ARef": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - }, - "referencetoawscdkeksclusterprivateendpointtestClusterF4CF4FE8ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketA7D94D8BRef": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyF4F9C0EARef": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket99203424Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey74D35E51Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket8625E205Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusterprivateendpointtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyE4510C91Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cS3Bucket04044F75": { - "Type": "String", - "Description": "S3 bucket for asset \"a7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7c\"" - }, - "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cS3VersionKey64086FC0": { - "Type": "String", - "Description": "S3 key for asset version \"a7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7c\"" - }, - "AssetParametersa7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7cArtifactHash06AB8ACE": { - "Type": "String", - "Description": "Artifact hash for asset \"a7b05582e4198d7f2ad1c0948ac2951666b8b66b261877720ba33d5944a60d7c\"" - }, - "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1S3BucketD1155820": { - "Type": "String", - "Description": "S3 bucket for asset \"b5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1\"" - }, - "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1S3VersionKeyEFB2586A": { - "Type": "String", - "Description": "S3 key for asset version \"b5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1\"" - }, - "AssetParametersb5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1ArtifactHashEB3C1F22": { - "Type": "String", - "Description": "Artifact hash for asset \"b5fee21199806c07866afaa2777e4f43378a788ef71bed827bec0945a271b9a1\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json deleted file mode 100644 index a4f411b00175b..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ /dev/null @@ -1,3987 +0,0 @@ -{ - "Resources": { - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "SecretsKey317DCF94": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterControlPlaneSecurityGroupfromawscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C54443795AF111": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C54:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterControlPlaneSecurityGroupfromawscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858443B84847DA": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterControlPlaneSecurityGroupfromawscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914443ECEF3F30": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterControlPlaneSecurityGroupfromawscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D474431DE5485F": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D47:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "ClusterfargateprofiledefaultPodExecutionRole09952CFF", - "Arn" - ] - } - ] - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "kms:CreateGrant", - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "SecretsKey317DCF94", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclustertestawscdkawseksClusterResourceProviderframeworkonEvent503C1667Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "encryptionConfig": [ - { - "provider": { - "keyArn": { - "Fn::GetAtt": [ - "SecretsKey317DCF94", - "Arn" - ] - } - }, - "resources": [ - "secrets" - ] - } - ], - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - }, - "tags": { - "foo": "bar" - }, - "logging": { - "clusterLogging": [ - { - "enabled": true, - "types": [ - "api", - "authenticator", - "scheduler" - ] - } - ] - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterfargateprofiledefaultPodExecutionRole09952CFF", - "ClusterfargateprofiledefaultEFC59F14", - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterClusterSecurityGroupfromawscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C544432C10EDB4": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C54:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterClusterSecurityGroupfromawscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858443A88C1345": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterClusterSecurityGroupfromawscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914443A80EB501": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterClusterSecurityGroupfromawscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D474432A818F38": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D47:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterfargateprofiledefaultPodExecutionRole09952CFF", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{SessionName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\",\\\"system:node-proxier\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodesInstanceRoleC3C01328", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceRoleB93D3298", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceRole68E4BCFB", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterspotInstanceRole39043830", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupextrangNodeGroupRole23AE23D0", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupextrangarmNodeGroupRoleADF5749F", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c842be348c45337cd97b8759de76d5a68b4910d487", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "ClusterfargateprofiledefaultPodExecutionRole09952CFF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks-fargate-pods.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy" - ] - ] - } - ] - } - }, - "ClusterfargateprofiledefaultEFC59F14": { - "Type": "Custom::AWSCDK-EKS-FargateProfile", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclustertestawscdkawseksClusterResourceProviderframeworkonEvent503C1667Arn" - ] - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Config": { - "clusterName": { - "Ref": "Cluster9EE0221C" - }, - "podExecutionRoleArn": { - "Fn::GetAtt": [ - "ClusterfargateprofiledefaultPodExecutionRole09952CFF", - "Arn" - ] - }, - "selectors": [ - { - "namespace": "default" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodesInstanceSecurityGroup899246BD": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/Nodes" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterNodesInstanceSecurityGroupfromawscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C54ALLTRAFFICBC5FBE2E": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from awscdkeksclustertestClusterNodesInstanceSecurityGroupD0B64C54:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - } - } - }, - "ClusterNodesInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32443DC7FAF39": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterNodesInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F130134443AE10EB12": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterNodesInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32102565535D6A46ADB": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterNodesInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F1301341025655359F401D0D": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterNodesInstanceRoleC3C01328": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/Nodes" - } - ] - } - }, - "ClusterNodesInstanceProfileF2DD0E21": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterNodesInstanceRoleC3C01328" - } - ] - } - }, - "ClusterNodesLaunchConfig7C420A27": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.medium", - "IamInstanceProfile": { - "Ref": "ClusterNodesInstanceProfileF2DD0E21" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterNodesInstanceSecurityGroup899246BD", - "GroupId" - ] - }, - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --apiserver-endpoint '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - }, - "' --b64-cluster-ca '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - }, - "' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack aws-cdk-eks-cluster-test --resource ClusterNodesASGF172BD19 --region us-east-1" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterNodesInstanceRoleC3C01328" - ] - }, - "ClusterNodesASGF172BD19": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "3", - "MinSize": "3", - "LaunchConfigurationName": { - "Ref": "ClusterNodesLaunchConfig7C420A27" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-eks-cluster-test/Cluster/Nodes" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClusterNodesArmInstanceSecurityGroup599F388B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/NodesArm" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterNodesArmInstanceSecurityGroupfromawscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858ALLTRAFFIC83BB7106": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from awscdkeksclustertestClusterNodesArmInstanceSecurityGroup52C45858:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - } - } - }, - "ClusterNodesArmInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32443AC8AE5BF": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterNodesArmInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F13013444328ED4211": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterNodesArmInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32102565535F5718241": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterNodesArmInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F13013410256553586052D07": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterNodesArmInstanceRoleB93D3298": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/NodesArm" - } - ] - } - }, - "ClusterNodesArmInstanceProfile158C5C9F": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterNodesArmInstanceRoleB93D3298" - } - ] - } - }, - "ClusterNodesArmLaunchConfigAAF61344": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2arm64recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "m6g.medium", - "IamInstanceProfile": { - "Ref": "ClusterNodesArmInstanceProfile158C5C9F" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterNodesArmInstanceSecurityGroup599F388B", - "GroupId" - ] - }, - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --apiserver-endpoint '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - }, - "' --b64-cluster-ca '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - }, - "' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack aws-cdk-eks-cluster-test --resource ClusterNodesArmASG40A593D0 --region us-east-1" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterNodesArmInstanceRoleB93D3298" - ] - }, - "ClusterNodesArmASG40A593D0": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ClusterNodesArmLaunchConfigAAF61344" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-eks-cluster-test/Cluster/NodesArm" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroupfromawscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914ALLTRAFFIC7B6353A7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from awscdkeksclustertestClusterBottlerocketNodesInstanceSecurityGroup83FE7914:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - } - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32443D1686B16": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F130134443A6D43789": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A32102565535674E85A7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterBottlerocketNodesInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F1301341025655352CE8AD9A": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterBottlerocketNodesInstanceRole68E4BCFB": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes" - } - ] - } - }, - "ClusterBottlerocketNodesInstanceProfileB6E2F25A": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterBottlerocketNodesInstanceRole68E4BCFB" - } - ] - } - }, - "ClusterBottlerocketNodesLaunchConfig76D7BEBE": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsservicebottlerocketawsk8s121x8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.small", - "IamInstanceProfile": { - "Ref": "ClusterBottlerocketNodesInstanceProfileB6E2F25A" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterBottlerocketNodesInstanceSecurityGroup3794A94B", - "GroupId" - ] - }, - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "\n[settings.kubernetes]\napi-server=\"", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - }, - "\"\ncluster-certificate=\"", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - }, - "\"\ncluster-name=\"", - { - "Ref": "Cluster9EE0221C" - }, - "\"" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterBottlerocketNodesInstanceRole68E4BCFB" - ] - }, - "ClusterBottlerocketNodesASGA27A9B70": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "2", - "MinSize": "2", - "LaunchConfigurationName": { - "Ref": "ClusterBottlerocketNodesLaunchConfig76D7BEBE" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClusterspotInstanceSecurityGroup01F7B1CE": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/spot" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterspotInstanceSecurityGroupfromawscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D47ALLTRAFFIC2B1A12D9": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from awscdkeksclustertestClusterspotInstanceSecurityGroupF50F5D47:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - } - } - }, - "ClusterspotInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A324438F751704": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterspotInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F1301344430650F325": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterspotInstanceSecurityGroupfromawscdkeksclustertestClusterClusterSecurityGroupF7265A321025655350D837827": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterClusterSecurityGroupF7265A32:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterspotInstanceSecurityGroupfromawscdkeksclustertestClusterControlPlaneSecurityGroup2F130134102565535C7203235": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclustertestClusterControlPlaneSecurityGroup2F130134:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterspotInstanceRole39043830": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-test/Cluster/spot" - } - ] - } - }, - "ClusterspotInstanceProfileAB88D077": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterspotInstanceRole39043830" - } - ] - } - }, - "ClusterspotLaunchConfigCC19F2E6": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.large", - "IamInstanceProfile": { - "Ref": "ClusterspotInstanceProfileAB88D077" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterspotInstanceSecurityGroup01F7B1CE", - "GroupId" - ] - }, - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - ], - "SpotPrice": "0.1094", - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - }, - " --kubelet-extra-args \"--node-labels lifecycle=Ec2Spot --register-with-taints=spotInstance=true:PreferNoSchedule --node-labels foo=bar,goo=far\" --apiserver-endpoint '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - }, - "' --b64-cluster-ca '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - }, - "' --use-max-pods true --aws-api-retry-attempts 5\n/opt/aws/bin/cfn-signal --exit-code $? --stack aws-cdk-eks-cluster-test --resource ClusterspotASG857494B6 --region us-east-1" - ] - ] - } - } - }, - "DependsOn": [ - "ClusterspotInstanceRole39043830" - ] - }, - "ClusterspotASG857494B6": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "10", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ClusterspotLaunchConfigCC19F2E6" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-eks-cluster-test/Cluster/spot" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "Clusterchartspotinterrupthandler79E2D768": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "ksclustertestclusterchartspotinterrupthandlerf41ba997", - "Chart": "aws-node-termination-handler", - "Version": "0.18.0", - "Values": "{\"nodeSelector\":{\"lifecycle\":\"Ec2Spot\"}}", - "Namespace": "kube-system", - "Repository": "https://aws.github.io/eks-charts", - "CreateNamespace": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupextrangNodeGroupRole23AE23D0": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupextrangF9406A09": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupextrangNodeGroupRole23AE23D0", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "t3.small" - ], - "ScalingConfig": { - "DesiredSize": 1, - "MaxSize": 1, - "MinSize": 1 - } - } - }, - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupextrangspotB327AE6B": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupextrangspotNodeGroupRoleB53B4857", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "CapacityType": "SPOT", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "c5.large", - "c5a.large", - "c5d.large" - ], - "ScalingConfig": { - "DesiredSize": 3, - "MaxSize": 3, - "MinSize": 3 - } - } - }, - "ClusterNodegroupextrangarmNodeGroupRoleADF5749F": { - "Type": "AWS::IAM::Role", - "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/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupextrangarm7773987A": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupextrangarmNodeGroupRoleADF5749F", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_ARM_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m6g.medium" - ], - "ScalingConfig": { - "DesiredSize": 1, - "MaxSize": 1, - "MinSize": 1 - } - } - }, - "ClusterNodegroupextrang2F1FB0D40": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "ForceUpdateEnabled": true, - "LaunchTemplate": { - "Id": { - "Ref": "LaunchTemplate" - }, - "Version": { - "Fn::GetAtt": [ - "LaunchTemplate", - "DefaultVersionNumber" - ] - } - }, - "ScalingConfig": { - "DesiredSize": 1, - "MaxSize": 1, - "MinSize": 1 - } - } - }, - "ClustermanifestHelloApp078A45D8": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-kubernetes\",\"labels\":{\"aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4\":\"\"}},\"spec\":{\"type\":\"LoadBalancer\",\"ports\":[{\"port\":80,\"targetPort\":8080}],\"selector\":{\"app\":\"hello-kubernetes\"}}},{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-kubernetes\",\"labels\":{\"aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4\":\"\"}},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"hello-kubernetes\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"hello-kubernetes\"}},\"spec\":{\"containers\":[{\"name\":\"hello-kubernetes\",\"image\":\"paulbouwer/hello-kubernetes:1.5\",\"ports\":[{\"containerPort\":8080}]}]}}}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8f0f7140f7358e29b7f58e81b507dcf744a3908f4" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clusterchartdashboard4AA45F3F": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "awscdkeksclustertestclusterchartdashboard1f3d83fe", - "Chart": "kubernetes-dashboard", - "Namespace": "default", - "Repository": "https://kubernetes.github.io/dashboard/", - "CreateNamespace": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clustercharttestchart9FD698EB": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "awscdkeksclustertestclustercharttestchart9d337ff7", - "ChartAssetURL": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF" - } - ] - } - ] - } - ] - ] - }, - "Namespace": "default", - "CreateNamespace": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clustercdk8schartDADD257F": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"data\":{\"clusterName\":\"", - { - "Ref": "Cluster9EE0221C" - }, - "\"},\"metadata\":{\"name\":\"chart-config-map-c820e51c\",\"labels\":{\"aws.cdk.eks/prune-c89c99db0e333353528b2e912b1fb988b6870edc75\":\"\"}}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c89c99db0e333353528b2e912b1fb988b6870edc75" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClustermanifestnginxnamespaceA68B4CE0": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"name\":\"nginx\",\"labels\":{\"aws.cdk.eks/prune-c84fd26f70b01a84daa5d3646e813820af6fde0970\":\"\"}}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c84fd26f70b01a84daa5d3646e813820af6fde0970" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clusterchartnginxingress1193EC3F": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "awscdkeksclustertestclusterchartnginxingressa7f70129", - "Chart": "nginx-ingress", - "Wait": true, - "Timeout": "900s", - "Namespace": "nginx", - "Repository": "https://helm.nginx.com/stable" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF", - "ClustermanifestnginxnamespaceA68B4CE0" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterMyServiceAccountConditionJson671C0633": { - "Type": "Custom::AWSCDKCfnJson", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", - "Arn" - ] - }, - "Value": { - "Fn::Join": [ - "", - [ - "{\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":aud\":\"sts.amazonaws.com\",\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":sub\":\"system:serviceaccount:default:awscdkeksclustertestclustermyserviceaccount4080bcdd\"}" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterMyServiceAccountRole85337B29": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "Fn::GetAtt": [ - "ClusterMyServiceAccountConditionJson671C0633", - "Value" - ] - } - }, - "Effect": "Allow", - "Principal": { - "Federated": { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ClusterMyServiceAccountmanifestMyServiceAccountServiceAccountResource67018F11": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\",\"namespace\":\"default\",\"labels\":{\"aws.cdk.eks/prune-c8f8dbf23319159cc2fef46283f7450b814e818252\":\"\",\"app.kubernetes.io/name\":\"awscdkeksclustertestclustermyserviceaccount4080bcdd\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", - { - "Fn::GetAtt": [ - "ClusterMyServiceAccountRole85337B29", - "Arn" - ] - }, - "\"}}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8f8dbf23319159cc2fef46283f7450b814e818252" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterOpenIdConnectProviderE7EB0530": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "sts.amazonaws.com" - ], - "ThumbprintList": [ - "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" - ], - "Url": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuerUrl" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.us-east-1.", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1S3Bucket1C2E79EB" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1S3VersionKeyF894E330" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1S3VersionKeyF894E330" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket1BB3BF46Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyC416ABD8Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclustertestClusterCreationRole95F44854Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket21BC7ECERef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey31720EE9Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket98314848Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4302577BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.us-east-1.", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cS3Bucket6F835E17" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cS3VersionKey56A43943" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cS3VersionKey56A43943" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclustertestClusterD76DFF87Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclustertestClusterCreationRole95F44854Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclustertestAssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketE84D6FBERef": { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB" - }, - "referencetoawscdkeksclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket1FA24F91Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyA4D2B6C0Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet1Subnet32A4EC2ARef": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet2Subnet5CC53627Ref": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclustertestVpcPrivateSubnet3Subnet7F5D6918Ref": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - }, - "referencetoawscdkeksclustertestClusterD76DFF87ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3Bucket33751354Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKey6157E093Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket6ADB5CE5Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey314C5B11Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket98314848Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4302577BRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LaunchTemplate": { - "Type": "AWS::EC2::LaunchTemplate", - "Properties": { - "LaunchTemplateData": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.small", - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - } - } - } - } - }, - "HelloAppWithoutValidation7C638ACB": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" - ] - }, - "Manifest": "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"data\":{\"hello\":\"world\"},\"metadata\":{\"name\":\"config-map\",\"labels\":{\"aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e\":\"\"}},\"unknown\":{\"key\":\"value\"}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c89cbcc5d9bdd35cfc69c0334c0a9af21d1e0e372e", - "SkipValidation": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "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", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } - ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" - ] - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { - "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" - } - ] - } - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" - ] - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region us-east-1 --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region us-east-1 --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - }, - "ClusterEndpoint": { - "Value": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - } - }, - "ClusterArn": { - "Value": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - } - }, - "ClusterCertificateAuthorityData": { - "Value": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - } - }, - "ClusterSecurityGroupId": { - "Value": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - }, - "ClusterEncryptionConfigKeyArn": { - "Value": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "EncryptionConfigKeyArn" - ] - } - }, - "ClusterName": { - "Value": { - "Ref": "Cluster9EE0221C" - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB": { - "Type": "String", - "Description": "S3 bucket for asset \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF": { - "Type": "String", - "Description": "S3 key for asset version \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfArtifactHash5A9B7775": { - "Type": "String", - "Description": "Artifact hash for asset \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959": { - "Type": "String", - "Description": "S3 bucket for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E": { - "Type": "String", - "Description": "S3 key for asset version \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1S3Bucket1C2E79EB": { - "Type": "String", - "Description": "S3 bucket for asset \"74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1\"" - }, - "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1S3VersionKeyF894E330": { - "Type": "String", - "Description": "S3 key for asset version \"74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1\"" - }, - "AssetParameters74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1ArtifactHashDA9F6BFA": { - "Type": "String", - "Description": "Artifact hash for asset \"74855369309afc5adae9e0c2c8aca51c80f4e32ed70f547b05985a61cd24e4a1\"" - }, - "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cS3Bucket6F835E17": { - "Type": "String", - "Description": "S3 bucket for asset \"4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129c\"" - }, - "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cS3VersionKey56A43943": { - "Type": "String", - "Description": "S3 key for asset version \"4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129c\"" - }, - "AssetParameters4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129cArtifactHashAC3DD08C": { - "Type": "String", - "Description": "Artifact hash for asset \"4e9b35054b4d4d206c33c65400dcfae51f6dc1804d2cfd6d80b1eda0e598129c\"" - }, - "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2/recommended/image_id" - }, - "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2arm64recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2-arm64/recommended/image_id" - }, - "SsmParameterValueawsservicebottlerocketawsk8s121x8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/bottlerocket/aws-k8s-1.21/x86_64/latest/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.expected.json deleted file mode 100644 index 72b4ba733affb..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.expected.json +++ /dev/null @@ -1,1458 +0,0 @@ -{ - "Resources": { - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-helm-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkekshelmtestawscdkawseksClusterResourceProviderframeworkonEventFCDC8710Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - }, - "tags": { - "foo": "bar" - }, - "logging": { - "clusterLogging": [ - { - "enabled": true, - "types": [ - "api", - "authenticator", - "scheduler" - ] - } - ] - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPrivateSubnet3DefaultRoute94B74F0D", - "VpcPrivateSubnet3RouteTableD98824C7", - "VpcPrivateSubnet3RouteTableAssociation16BDDC43", - "VpcPrivateSubnet3SubnetF258B56E", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "VpcPublicSubnet3DefaultRoute4697774F", - "VpcPublicSubnet3RouteTable93458DBB", - "VpcPublicSubnet3RouteTableAssociation1F1EDF02", - "VpcPublicSubnet3SubnetBE12F0B6", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkekshelmtestawscdkawseksKubectlProviderframeworkonEvent9D93C644Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c8d0612c947a128ccc926ff6124bd5462ab86f86d6\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8d0612c947a128ccc926ff6124bd5462ab86f86d6", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "Clustercharttestchart9FD698EB": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkekshelmtestawscdkawseksKubectlProviderframeworkonEvent9D93C644Arn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "awscdkekshelmtestclustercharttestchart0449715f", - "ChartAssetURL": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF" - } - ] - } - ] - } - ] - ] - }, - "Namespace": "default", - "CreateNamespace": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clustercharttestocichart9C188967": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkekshelmtestawscdkawseksKubectlProviderframeworkonEvent9D93C644Arn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "s3-chart", - "Chart": "s3-chart", - "Version": "v0.0.19", - "Namespace": "ack-system", - "Repository": "oci://public.ecr.aws/aws-controllers-k8s/s3-chart", - "CreateNamespace": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852S3Bucket6110578F" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852S3VersionKey3090022B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852S3VersionKey3090022B" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkekshelmtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket085ACFA1Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkekshelmtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey455E4CBARef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkekshelmtestClusterCreationRole906A8995Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkekshelmtestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket264B14F8Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkekshelmtestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey814B7FA0Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkekshelmtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket0A18730ERef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkekshelmtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey0E52DE29Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efS3Bucket2C1AF85C" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efS3VersionKey27D35864" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efS3VersionKey27D35864" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkekshelmtestCluster35BA672BArn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkekshelmtestClusterCreationRole906A8995Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkekshelmtestAssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3Bucket5EAB45FARef": { - "Ref": "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB" - }, - "referencetoawscdkekshelmtestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3BucketEC27A5F2Ref": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881" - }, - "referencetoawscdkekshelmtestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey5772F015Ref": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2" - }, - "referencetoawscdkekshelmtestVpcPrivateSubnet1Subnet3D2B5C0BRef": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkekshelmtestVpcPrivateSubnet2SubnetF5E4AFE9Ref": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkekshelmtestVpcPrivateSubnet3Subnet7C40A2F3Ref": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - }, - "referencetoawscdkekshelmtestCluster35BA672BClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkekshelmtestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3Bucket97C2B0FARef": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkekshelmtestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKey149985B9Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkekshelmtestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket8229D3A2Ref": { - "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F" - }, - "referencetoawscdkekshelmtestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey0C91EE3ERef": { - "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055" - }, - "referencetoawscdkekshelmtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket0A18730ERef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkekshelmtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey0E52DE29Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881": { - "Type": "String", - "Description": "S3 bucket for asset \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2": { - "Type": "String", - "Description": "S3 key for asset version \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963ArtifactHash41646C3F": { - "Type": "String", - "Description": "Artifact hash for asset \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F": { - "Type": "String", - "Description": "S3 bucket for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055": { - "Type": "String", - "Description": "S3 key for asset version \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedArtifactHash2C972BAF": { - "Type": "String", - "Description": "Artifact hash for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3BucketBFD29DFB": { - "Type": "String", - "Description": "S3 bucket for asset \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfS3VersionKeyD1F874DF": { - "Type": "String", - "Description": "S3 key for asset version \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParametersd65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbfArtifactHash5A9B7775": { - "Type": "String", - "Description": "Artifact hash for asset \"d65fbdc11b108e0386ed8577c454d4544f6d4e7960f84a0d2e211478d6324dbf\"" - }, - "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852S3Bucket6110578F": { - "Type": "String", - "Description": "S3 bucket for asset \"8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852\"" - }, - "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852S3VersionKey3090022B": { - "Type": "String", - "Description": "S3 key for asset version \"8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852\"" - }, - "AssetParameters8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852ArtifactHash3BC91380": { - "Type": "String", - "Description": "Artifact hash for asset \"8da8ef613cd1b5a7cebfe44577f36e7ab0b4b00b97a7789401a48c80b78f0852\"" - }, - "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efS3Bucket2C1AF85C": { - "Type": "String", - "Description": "S3 bucket for asset \"0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289ef\"" - }, - "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efS3VersionKey27D35864": { - "Type": "String", - "Description": "S3 key for asset version \"0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289ef\"" - }, - "AssetParameters0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289efArtifactHash9EB43449": { - "Type": "String", - "Description": "Artifact hash for asset \"0f0fca85b345e05ce2d9856ebaef0bec86a728074139a71a31b68c96b20289ef\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json deleted file mode 100644 index 5d8820ecdeff8..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-inference.expected.json +++ /dev/null @@ -1,2210 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.64.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.128.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.192.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterControlPlaneSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26F443F2D42F76": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26F:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } - ] - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclusterinferencetestawscdkawseksClusterResourceProviderframeworkonEventD8B63F01Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterClusterSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26F443B80CEDBD": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26F:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterMastersRole9AA35625": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterinferencetestawscdkawseksKubectlProviderframeworkonEvent96006823Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c82054d8b149d8310a04e51ad7e30cde4cd28cf27e\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceRole59AC6F56", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c82054d8b149d8310a04e51ad7e30cde4cd28cf27e", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterOpenIdConnectProviderE7EB0530": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "sts.amazonaws.com" - ], - "ThumbprintList": [ - "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" - ], - "Url": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuerUrl" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-eks-cluster-inference-test/Cluster/InferenceInstances/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Cluster/InferenceInstances" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "-1", - "Description": "from awscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26F:ALL TRAFFIC", - "GroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - } - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 443 - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F:1025-65535", - "FromPort": 1025, - "GroupId": { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - }, - "ToPort": 65535 - } - }, - "ClusterInferenceInstancesInstanceRole59AC6F56": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ], - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "Value": "owned" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-inference-test/Cluster/InferenceInstances" - } - ] - } - }, - "ClusterInferenceInstancesInstanceProfile5A1209B4": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ClusterInferenceInstancesInstanceRole59AC6F56" - } - ] - } - }, - "ClusterInferenceInstancesLaunchConfig03BF48FE": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2gpurecommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "inf1.2xlarge", - "IamInstanceProfile": { - "Ref": "ClusterInferenceInstancesInstanceProfile5A1209B4" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "GroupId" - ] - }, - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ", - { - "Ref": "Cluster9EE0221C" - }, - " --kubelet-extra-args \"--node-labels lifecycle=OnDemand\" --apiserver-endpoint '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Endpoint" - ] - }, - "' --b64-cluster-ca '", - { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "CertificateAuthorityData" - ] - }, - "' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack aws-cdk-eks-cluster-inference-test --resource ClusterInferenceInstancesASGE90717C7 --region ", - { - "Ref": "AWS::Region" - } - ] - ] - } - } - }, - "DependsOn": [ - "ClusterInferenceInstancesInstanceRole59AC6F56" - ] - }, - "ClusterInferenceInstancesASGE90717C7": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "ClusterInferenceInstancesLaunchConfig03BF48FE" - }, - "Tags": [ - { - "Key": { - "Fn::Join": [ - "", - [ - "kubernetes.io/cluster/", - { - "Ref": "Cluster9EE0221C" - } - ] - ] - }, - "PropagateAtLaunch": true, - "Value": "owned" - }, - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-cdk-eks-cluster-inference-test/Cluster/InferenceInstances" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - }, - "UpdatePolicy": { - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "ClustermanifestNeuronDevicePlugin0B3E0D17": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterinferencetestawscdkawseksKubectlProviderframeworkonEvent96006823Arn" - ] - }, - "Manifest": "[{\"apiVersion\":\"apps/v1\",\"kind\":\"DaemonSet\",\"metadata\":{\"name\":\"neuron-device-plugin-daemonset\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c863e4201358c09b3f92695ba8b0faf739f572311b\":\"\"}},\"spec\":{\"selector\":{\"matchLabels\":{\"name\":\"neuron-device-plugin-ds\"}},\"updateStrategy\":{\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"annotations\":{\"scheduler.alpha.kubernetes.io/critical-pod\":\"\"},\"labels\":{\"name\":\"neuron-device-plugin-ds\"}},\"spec\":{\"tolerations\":[{\"key\":\"CriticalAddonsOnly\",\"operator\":\"Exists\"},{\"key\":\"aws.amazon.com/neuron\",\"operator\":\"Exists\",\"effect\":\"NoSchedule\"}],\"priorityClassName\":\"system-node-critical\",\"affinity\":{\"nodeAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"beta.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.4xlarge\"]}]},{\"matchExpressions\":[{\"key\":\"node.kubernetes.io/instance-type\",\"operator\":\"In\",\"values\":[\"inf1.xlarge\",\"inf1.2xlarge\",\"inf1.6xlarge\",\"inf1.24xlarge\"]}]}]}}},\"containers\":[{\"image\":\"790709498068.dkr.ecr.us-west-2.amazonaws.com/neuron-device-plugin:1.0.9043.0\",\"imagePullPolicy\":\"Always\",\"name\":\"k8s-neuron-device-plugin-ctr\",\"securityContext\":{\"allowPrivilegeEscalation\":false,\"capabilities\":{\"drop\":[\"ALL\"]}},\"volumeMounts\":[{\"name\":\"device-plugin\",\"mountPath\":\"/var/lib/kubelet/device-plugins\"}]}],\"volumes\":[{\"name\":\"device-plugin\",\"hostPath\":{\"path\":\"/var/lib/kubelet/device-plugins\"}}]}}}}]", - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c863e4201358c09b3f92695ba8b0faf739f572311b" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bS3Bucket7A603DAE" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bS3VersionKeyC8FE6B38" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bS3VersionKeyC8FE6B38" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusterinferencetestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket59232CCDRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey7F3246C3Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclusterinferencetestClusterCreationRoleE75B6E1BArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusterinferencetestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3BucketB7D3ABF2Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyB89C9D83Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketFC7DE683Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyA3D6C7B6Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fS3BucketCFBB1BB5" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fS3VersionKey9D894EF8" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fS3VersionKey9D894EF8" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusterinferencetestClusterF6AC11E0Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclusterinferencetestClusterCreationRoleE75B6E1BArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusterinferencetestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket74E76A7FRef": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksclusterinferencetestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKey690A3E90Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksclusterinferencetestVpcPrivateSubnet1Subnet57B9547BRef": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclusterinferencetestVpcPrivateSubnet2Subnet006B3B78Ref": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclusterinferencetestClusterF6AC11E0ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclusterinferencetestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3Bucket0DF84F43Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyF91C7957Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksclusterinferencetestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketB71217D7Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksclusterinferencetestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyAAC64236Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketFC7DE683Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksclusterinferencetestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyA3D6C7B6Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaConditionJson1B3BEA47": { - "Type": "Custom::AWSCDKCfnJson", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", - "Arn" - ] - }, - "Value": { - "Fn::Join": [ - "", - [ - "{\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":aud\":\"sts.amazonaws.com\",\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":sub\":\"system:serviceaccount:kube-system:aws-load-balancer-controller\"}" - ] - ] - } - }, - "DependsOn": [ - "ClusterInferenceInstancesASGE90717C7", - "ClusterInferenceInstancesInstanceProfile5A1209B4", - "ClusterInferenceInstancesInstanceRole59AC6F56", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F", - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "ClusterInferenceInstancesLaunchConfig03BF48FE", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRole836823A9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "Fn::GetAtt": [ - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaConditionJson1B3BEA47", - "Value" - ] - } - }, - "Effect": "Allow", - "Principal": { - "Federated": { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "ClusterInferenceInstancesASGE90717C7", - "ClusterInferenceInstancesInstanceProfile5A1209B4", - "ClusterInferenceInstancesInstanceRole59AC6F56", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F", - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "ClusterInferenceInstancesLaunchConfig03BF48FE", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ] - }, - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRoleDefaultPolicyD7901D6C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Condition": { - "StringEquals": { - "iam:AWSServiceName": "elasticloadbalancing.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "acm:DescribeCertificate", - "acm:ListCertificates", - "cognito-idp:DescribeUserPoolClient", - "ec2:AuthorizeSecurityGroupIngress", - "ec2:CreateSecurityGroup", - "ec2:DescribeAccountAttributes", - "ec2:DescribeAddresses", - "ec2:DescribeAvailabilityZones", - "ec2:DescribeCoipPools", - "ec2:DescribeInstances", - "ec2:DescribeInternetGateways", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeTags", - "ec2:DescribeVpcPeeringConnections", - "ec2:DescribeVpcs", - "ec2:GetCoipPoolUsage", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:AddListenerCertificates", - "elasticloadbalancing:CreateListener", - "elasticloadbalancing:CreateRule", - "elasticloadbalancing:DeleteListener", - "elasticloadbalancing:DeleteRule", - "elasticloadbalancing:DescribeListenerCertificates", - "elasticloadbalancing:DescribeListeners", - "elasticloadbalancing:DescribeLoadBalancerAttributes", - "elasticloadbalancing:DescribeLoadBalancers", - "elasticloadbalancing:DescribeRules", - "elasticloadbalancing:DescribeSSLPolicies", - "elasticloadbalancing:DescribeTags", - "elasticloadbalancing:DescribeTargetGroupAttributes", - "elasticloadbalancing:DescribeTargetGroups", - "elasticloadbalancing:DescribeTargetHealth", - "elasticloadbalancing:ModifyListener", - "elasticloadbalancing:ModifyRule", - "elasticloadbalancing:RemoveListenerCertificates", - "elasticloadbalancing:SetWebAcl", - "iam:GetServerCertificate", - "iam:ListServerCertificates", - "shield:CreateProtection", - "shield:DeleteProtection", - "shield:DescribeProtection", - "shield:GetSubscriptionState", - "waf-regional:AssociateWebACL", - "waf-regional:DisassociateWebACL", - "waf-regional:GetWebACL", - "waf-regional:GetWebACLForResource", - "wafv2:AssociateWebACL", - "wafv2:DisassociateWebACL", - "wafv2:GetWebACL", - "wafv2:GetWebACLForResource" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "ec2:CreateTags", - "Condition": { - "StringEquals": { - "ec2:CreateAction": "CreateSecurityGroup" - }, - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:CreateTags", - "ec2:DeleteTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:AuthorizeSecurityGroupIngress", - "ec2:DeleteSecurityGroup", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:DeleteLoadBalancer", - "elasticloadbalancing:DeleteTargetGroup", - "elasticloadbalancing:ModifyLoadBalancerAttributes", - "elasticloadbalancing:ModifyTargetGroup", - "elasticloadbalancing:ModifyTargetGroupAttributes", - "elasticloadbalancing:SetIpAddressType", - "elasticloadbalancing:SetSecurityGroups", - "elasticloadbalancing:SetSubnets" - ], - "Condition": { - "Null": { - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:CreateLoadBalancer", - "elasticloadbalancing:CreateTargetGroup" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*", - "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*", - "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:DeregisterTargets", - "elasticloadbalancing:RegisterTargets" - ], - "Effect": "Allow", - "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRoleDefaultPolicyD7901D6C", - "Roles": [ - { - "Ref": "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRole836823A9" - } - ] - }, - "DependsOn": [ - "ClusterInferenceInstancesASGE90717C7", - "ClusterInferenceInstancesInstanceProfile5A1209B4", - "ClusterInferenceInstancesInstanceRole59AC6F56", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F", - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "ClusterInferenceInstancesLaunchConfig03BF48FE", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ] - }, - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsamanifestalbsaServiceAccountResourceCB9C8B9F": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterinferencetestawscdkawseksKubectlProviderframeworkonEvent96006823Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"aws-load-balancer-controller\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c8cb19ec57bf1ebd84c9b96a69357098c59bdf4023\":\"\",\"app.kubernetes.io/name\":\"aws-load-balancer-controller\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", - { - "Fn::GetAtt": [ - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRole836823A9", - "Arn" - ] - }, - "\"}}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8cb19ec57bf1ebd84c9b96a69357098c59bdf4023" - }, - "DependsOn": [ - "ClusterInferenceInstancesASGE90717C7", - "ClusterInferenceInstancesInstanceProfile5A1209B4", - "ClusterInferenceInstancesInstanceRole59AC6F56", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F", - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "ClusterInferenceInstancesLaunchConfig03BF48FE", - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControllerACDC8D4F": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusterinferencetestawscdkawseksKubectlProviderframeworkonEvent96006823Arn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "Release": "aws-load-balancer-controller", - "Chart": "aws-load-balancer-controller", - "Version": "1.2.7", - "Wait": true, - "Timeout": "900s", - "Values": { - "Fn::Join": [ - "", - [ - "{\"clusterName\":\"", - { - "Ref": "Cluster9EE0221C" - }, - "\",\"serviceAccount\":{\"create\":false,\"name\":\"aws-load-balancer-controller\"},\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"vpcId\":\"", - { - "Ref": "Vpc8378EB38" - }, - "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.4.1\"}}" - ] - ] - }, - "Namespace": "kube-system", - "Repository": "https://aws.github.io/eks-charts", - "CreateNamespace": true - }, - "DependsOn": [ - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaConditionJson1B3BEA47", - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsamanifestalbsaServiceAccountResourceCB9C8B9F", - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRoleDefaultPolicyD7901D6C", - "awscdkeksclusterinferencetestClusterEBBBA1ACAlbControlleralbsaRole836823A9", - "ClusterAwsAuthmanifestFE51F8AE", - "ClusterInferenceInstancesASGE90717C7", - "ClusterInferenceInstancesInstanceProfile5A1209B4", - "ClusterInferenceInstancesInstanceRole59AC6F56", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D50102565535161321E6", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterClusterSecurityGroupAFDB8D5044357063ABC", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F102565535438D562E", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterControlPlaneSecurityGroupDA4CA86F44333DD9D3A", - "ClusterInferenceInstancesInstanceSecurityGroupfromawscdkeksclusterinferencetestClusterInferenceInstancesInstanceSecurityGroupAC01F26FALLTRAFFICE41AF78F", - "ClusterInferenceInstancesInstanceSecurityGroupECB3FC45", - "ClusterInferenceInstancesLaunchConfig03BF48FE", - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3", - "ClusterOpenIdConnectProviderE7EB0530" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "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", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } - ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" - ] - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { - "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" - } - ] - } - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" - ] - } - }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - } - ] - ] - } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959": { - "Type": "String", - "Description": "S3 bucket for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E": { - "Type": "String", - "Description": "S3 key for asset version \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bS3Bucket7A603DAE": { - "Type": "String", - "Description": "S3 bucket for asset \"8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2b\"" - }, - "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bS3VersionKeyC8FE6B38": { - "Type": "String", - "Description": "S3 key for asset version \"8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2b\"" - }, - "AssetParameters8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2bArtifactHash0CB3078B": { - "Type": "String", - "Description": "Artifact hash for asset \"8b31d4e83253be21206da15320a2f2a09a9d465d4e04c918e435c53f60beab2b\"" - }, - "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fS3BucketCFBB1BB5": { - "Type": "String", - "Description": "S3 bucket for asset \"265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2f\"" - }, - "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fS3VersionKey9D894EF8": { - "Type": "String", - "Description": "S3 key for asset version \"265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2f\"" - }, - "AssetParameters265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2fArtifactHash4331F5C3": { - "Type": "String", - "Description": "Artifact hash for asset \"265e3c09860438ac7ca2ce843632a08962e3d331933f7b86695138b844d11a2f\"" - }, - "SsmParameterValueawsserviceeksoptimizedami121amazonlinux2gpurecommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2-gpu/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json deleted file mode 100644 index 8a9b6ea626e05..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.expected.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "Resources": { - "NoClientsNoThumbprint8BF1533F": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "sts.amazonaws.com" - ], - "ThumbprintList": [ - "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" - ], - "Url": { - "Fn::Join": [ - "", - [ - "https://oidc.eks.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/id/test2" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "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", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } - ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" - ] - } - }, - "Parameters": { - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.expected.json deleted file mode 100644 index 70017c66ddff4..0000000000000 --- a/packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.expected.json +++ /dev/null @@ -1,1431 +0,0 @@ -{ - "Resources": { - "FargateClusterDefaultVpcE69D3A13": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet1RouteTableAssociation43821F5B": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC" - } - } - }, - "FargateClusterDefaultVpcPublicSubnet1DefaultRouteA0A93C70": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterDefaultVpcIGWFD9278DA" - } - }, - "DependsOn": [ - "FargateClusterDefaultVpcVPCGWA7F012E1" - ] - }, - "FargateClusterDefaultVpcPublicSubnet1EIP0093A4E0": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet1NATGatewayEC4DEB51": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterDefaultVpcPublicSubnet1EIP0093A4E0", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet2RouteTableAssociationCF18C87A": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93" - } - } - }, - "FargateClusterDefaultVpcPublicSubnet2DefaultRouteABE51CF2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterDefaultVpcIGWFD9278DA" - } - }, - "DependsOn": [ - "FargateClusterDefaultVpcVPCGWA7F012E1" - ] - }, - "FargateClusterDefaultVpcPublicSubnet2EIPA4C07B68": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet2NATGateway77D6A579": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterDefaultVpcPublicSubnet2EIPA4C07B68", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet3RouteTableAssociation93B95514": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9" - } - } - }, - "FargateClusterDefaultVpcPublicSubnet3DefaultRoute8341F833": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterDefaultVpcIGWFD9278DA" - } - }, - "DependsOn": [ - "FargateClusterDefaultVpcVPCGWA7F012E1" - ] - }, - "FargateClusterDefaultVpcPublicSubnet3EIP46E028EF": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPublicSubnet3NATGateway0AAE540F": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterDefaultVpcPublicSubnet3EIP46E028EF", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet1RouteTableAssociationDC34627F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA" - } - } - }, - "FargateClusterDefaultVpcPrivateSubnet1DefaultRouteE93D7B93": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet1NATGatewayEC4DEB51" - } - } - }, - "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet2RouteTableAssociation6C0234FE": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154" - } - } - }, - "FargateClusterDefaultVpcPrivateSubnet2DefaultRouteABCE20FF": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet2NATGateway77D6A579" - } - } - }, - "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "FargateClusterDefaultVpcPrivateSubnet3RouteTableAssociationCC0949D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96" - }, - "SubnetId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1" - } - } - }, - "FargateClusterDefaultVpcPrivateSubnet3DefaultRouteEFE144B5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterDefaultVpcPublicSubnet3NATGateway0AAE540F" - } - } - }, - "FargateClusterDefaultVpcIGWFD9278DA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-fargate-cluster-test/FargateCluster/DefaultVpc" - } - ] - } - }, - "FargateClusterDefaultVpcVPCGWA7F012E1": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - }, - "InternetGatewayId": { - "Ref": "FargateClusterDefaultVpcIGWFD9278DA" - } - } - }, - "FargateClusterRole8E36B33A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "FargateClusterControlPlaneSecurityGroup1021A150": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "FargateClusterDefaultVpcE69D3A13" - } - } - }, - "FargateClusterCreationRole8C524AD8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "FargateClusterDefaultVpcIGWFD9278DA", - "FargateClusterDefaultVpcPrivateSubnet1DefaultRouteE93D7B93", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableAssociationDC34627F", - "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA", - "FargateClusterDefaultVpcPrivateSubnet2DefaultRouteABCE20FF", - "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C", - "FargateClusterDefaultVpcPrivateSubnet2RouteTableAssociation6C0234FE", - "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154", - "FargateClusterDefaultVpcPrivateSubnet3DefaultRouteEFE144B5", - "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96", - "FargateClusterDefaultVpcPrivateSubnet3RouteTableAssociationCC0949D8", - "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1", - "FargateClusterDefaultVpcPublicSubnet1DefaultRouteA0A93C70", - "FargateClusterDefaultVpcPublicSubnet1EIP0093A4E0", - "FargateClusterDefaultVpcPublicSubnet1NATGatewayEC4DEB51", - "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434", - "FargateClusterDefaultVpcPublicSubnet1RouteTableAssociation43821F5B", - "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC", - "FargateClusterDefaultVpcPublicSubnet2DefaultRouteABE51CF2", - "FargateClusterDefaultVpcPublicSubnet2EIPA4C07B68", - "FargateClusterDefaultVpcPublicSubnet2NATGateway77D6A579", - "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9", - "FargateClusterDefaultVpcPublicSubnet2RouteTableAssociationCF18C87A", - "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93", - "FargateClusterDefaultVpcPublicSubnet3DefaultRoute8341F833", - "FargateClusterDefaultVpcPublicSubnet3EIP46E028EF", - "FargateClusterDefaultVpcPublicSubnet3NATGateway0AAE540F", - "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182", - "FargateClusterDefaultVpcPublicSubnet3RouteTableAssociation93B95514", - "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9", - "FargateClusterDefaultVpcE69D3A13", - "FargateClusterDefaultVpcVPCGWA7F012E1" - ] - }, - "FargateClusterCreationRoleDefaultPolicy629049D0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "FargateClusterRole8E36B33A", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "FargateClusterfargateprofiledefaultPodExecutionRole66F2610E", - "Arn" - ] - } - ] - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClusterCreationRoleDefaultPolicy629049D0", - "Roles": [ - { - "Ref": "FargateClusterCreationRole8C524AD8" - } - ] - }, - "DependsOn": [ - "FargateClusterDefaultVpcIGWFD9278DA", - "FargateClusterDefaultVpcPrivateSubnet1DefaultRouteE93D7B93", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableAssociationDC34627F", - "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA", - "FargateClusterDefaultVpcPrivateSubnet2DefaultRouteABCE20FF", - "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C", - "FargateClusterDefaultVpcPrivateSubnet2RouteTableAssociation6C0234FE", - "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154", - "FargateClusterDefaultVpcPrivateSubnet3DefaultRouteEFE144B5", - "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96", - "FargateClusterDefaultVpcPrivateSubnet3RouteTableAssociationCC0949D8", - "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1", - "FargateClusterDefaultVpcPublicSubnet1DefaultRouteA0A93C70", - "FargateClusterDefaultVpcPublicSubnet1EIP0093A4E0", - "FargateClusterDefaultVpcPublicSubnet1NATGatewayEC4DEB51", - "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434", - "FargateClusterDefaultVpcPublicSubnet1RouteTableAssociation43821F5B", - "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC", - "FargateClusterDefaultVpcPublicSubnet2DefaultRouteABE51CF2", - "FargateClusterDefaultVpcPublicSubnet2EIPA4C07B68", - "FargateClusterDefaultVpcPublicSubnet2NATGateway77D6A579", - "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9", - "FargateClusterDefaultVpcPublicSubnet2RouteTableAssociationCF18C87A", - "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93", - "FargateClusterDefaultVpcPublicSubnet3DefaultRoute8341F833", - "FargateClusterDefaultVpcPublicSubnet3EIP46E028EF", - "FargateClusterDefaultVpcPublicSubnet3NATGateway0AAE540F", - "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182", - "FargateClusterDefaultVpcPublicSubnet3RouteTableAssociation93B95514", - "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9", - "FargateClusterDefaultVpcE69D3A13", - "FargateClusterDefaultVpcVPCGWA7F012E1" - ] - }, - "FargateCluster019F03E8": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksfargateclustertestawscdkawseksClusterResourceProviderframeworkonEventC85EBDF3Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "FargateClusterRole8E36B33A", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC" - }, - { - "Ref": "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93" - }, - { - "Ref": "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9" - }, - { - "Ref": "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA" - }, - { - "Ref": "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154" - }, - { - "Ref": "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "FargateClusterControlPlaneSecurityGroup1021A150", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "FargateClusterDefaultVpcIGWFD9278DA", - "FargateClusterDefaultVpcPrivateSubnet1DefaultRouteE93D7B93", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableA42013EB", - "FargateClusterDefaultVpcPrivateSubnet1RouteTableAssociationDC34627F", - "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA", - "FargateClusterDefaultVpcPrivateSubnet2DefaultRouteABCE20FF", - "FargateClusterDefaultVpcPrivateSubnet2RouteTable1691B33C", - "FargateClusterDefaultVpcPrivateSubnet2RouteTableAssociation6C0234FE", - "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154", - "FargateClusterDefaultVpcPrivateSubnet3DefaultRouteEFE144B5", - "FargateClusterDefaultVpcPrivateSubnet3RouteTable7D0EEC96", - "FargateClusterDefaultVpcPrivateSubnet3RouteTableAssociationCC0949D8", - "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1", - "FargateClusterDefaultVpcPublicSubnet1DefaultRouteA0A93C70", - "FargateClusterDefaultVpcPublicSubnet1EIP0093A4E0", - "FargateClusterDefaultVpcPublicSubnet1NATGatewayEC4DEB51", - "FargateClusterDefaultVpcPublicSubnet1RouteTableC2D2B434", - "FargateClusterDefaultVpcPublicSubnet1RouteTableAssociation43821F5B", - "FargateClusterDefaultVpcPublicSubnet1Subnet96AFDABC", - "FargateClusterDefaultVpcPublicSubnet2DefaultRouteABE51CF2", - "FargateClusterDefaultVpcPublicSubnet2EIPA4C07B68", - "FargateClusterDefaultVpcPublicSubnet2NATGateway77D6A579", - "FargateClusterDefaultVpcPublicSubnet2RouteTableEDDB89D9", - "FargateClusterDefaultVpcPublicSubnet2RouteTableAssociationCF18C87A", - "FargateClusterDefaultVpcPublicSubnet2Subnet92A9CC93", - "FargateClusterDefaultVpcPublicSubnet3DefaultRoute8341F833", - "FargateClusterDefaultVpcPublicSubnet3EIP46E028EF", - "FargateClusterDefaultVpcPublicSubnet3NATGateway0AAE540F", - "FargateClusterDefaultVpcPublicSubnet3RouteTable4E802182", - "FargateClusterDefaultVpcPublicSubnet3RouteTableAssociation93B95514", - "FargateClusterDefaultVpcPublicSubnet3SubnetB408ADA9", - "FargateClusterDefaultVpcE69D3A13", - "FargateClusterDefaultVpcVPCGWA7F012E1", - "FargateClusterCreationRoleDefaultPolicy629049D0", - "FargateClusterCreationRole8C524AD8" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "FargateClusterKubectlReadyBarrier93746934": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "FargateClusterfargateprofiledefaultPodExecutionRole66F2610E", - "FargateClusterfargateprofiledefault10E54561", - "FargateClusterCreationRoleDefaultPolicy629049D0", - "FargateClusterCreationRole8C524AD8", - "FargateCluster019F03E8" - ] - }, - "FargateClusterMastersRole50BAF9FD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "FargateClusterAwsAuthmanifest1F7A5553": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksfargateclustertestawscdkawseksKubectlProviderframeworkonEvent33B2ACA4Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\"},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "FargateClusterMastersRole50BAF9FD", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "FargateClusterMastersRole50BAF9FD", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "FargateClusterfargateprofiledefaultPodExecutionRole66F2610E", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{SessionName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\",\\\"system:node-proxier\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "FargateCluster019F03E8" - }, - "RoleArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "Overwrite": true - }, - "DependsOn": [ - "FargateClusterKubectlReadyBarrier93746934" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "FargateClusterCoreDnsComputeTypePatch711BF1B2": { - "Type": "Custom::AWSCDK-EKS-KubernetesPatch", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksfargateclustertestawscdkawseksKubectlProviderframeworkonEvent33B2ACA4Arn" - ] - }, - "ResourceName": "deployment/coredns", - "ResourceNamespace": "kube-system", - "ApplyPatchJson": "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"eks.amazonaws.com/compute-type\":\"fargate\"}}}}}", - "RestorePatchJson": "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"eks.amazonaws.com/compute-type\":\"ec2\"}}}}}", - "ClusterName": { - "Ref": "FargateCluster019F03E8" - }, - "RoleArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "PatchType": "strategic" - }, - "DependsOn": [ - "FargateClusterKubectlReadyBarrier93746934" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "FargateClusterfargateprofiledefaultPodExecutionRole66F2610E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks-fargate-pods.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy" - ] - ] - } - ] - } - }, - "FargateClusterfargateprofiledefault10E54561": { - "Type": "Custom::AWSCDK-EKS-FargateProfile", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksfargateclustertestawscdkawseksClusterResourceProviderframeworkonEventC85EBDF3Arn" - ] - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "Config": { - "clusterName": { - "Ref": "FargateCluster019F03E8" - }, - "podExecutionRoleArn": { - "Fn::GetAtt": [ - "FargateClusterfargateprofiledefaultPodExecutionRole66F2610E", - "Arn" - ] - }, - "selectors": [ - { - "namespace": "default" - }, - { - "namespace": "kube-system" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aS3BucketBFDBF6BA" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aS3VersionKey9325890D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aS3VersionKey9325890D" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksfargateclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3BucketDC76B2E5Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksfargateclustertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyA7127FF2Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksfargateclustertestFargateClusterCreationRoleFB2229CFArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "referencetoawscdkeksfargateclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket299AF51BRef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksfargateclustertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey44C0D711Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksfargateclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket3204D5E8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksfargateclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4ABEA862Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aS3Bucket69836FE4" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aS3VersionKey7CCC6C3E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aS3VersionKey7CCC6C3E" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksfargateclustertestFargateCluster8588769EArn": { - "Fn::GetAtt": [ - "FargateCluster019F03E8", - "Arn" - ] - }, - "referencetoawscdkeksfargateclustertestFargateClusterCreationRoleFB2229CFArn": { - "Fn::GetAtt": [ - "FargateClusterCreationRole8C524AD8", - "Arn" - ] - }, - "referencetoawscdkeksfargateclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3BucketC8170E38Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawscdkeksfargateclustertestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyFC5034F5Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawscdkeksfargateclustertestFargateClusterDefaultVpcPrivateSubnet1Subnet0278E6BCRef": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet1Subnet50EA43AA" - }, - "referencetoawscdkeksfargateclustertestFargateClusterDefaultVpcPrivateSubnet2Subnet1F1EC575Ref": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet2Subnet0C9D6154" - }, - "referencetoawscdkeksfargateclustertestFargateClusterDefaultVpcPrivateSubnet3Subnet3A4CBF94Ref": { - "Ref": "FargateClusterDefaultVpcPrivateSubnet3Subnet1F8A52F1" - }, - "referencetoawscdkeksfargateclustertestFargateCluster8588769EClusterSecurityGroupId": { - "Fn::GetAtt": [ - "FargateCluster019F03E8", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksfargateclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketCDE77E92Ref": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B" - }, - "referencetoawscdkeksfargateclustertestAssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEEEBF2BBRef": { - "Ref": "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD" - }, - "referencetoawscdkeksfargateclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket899EE5ABRef": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawscdkeksfargateclustertestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey1296E713Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawscdkeksfargateclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket3204D5E8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawscdkeksfargateclustertestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4ABEA862Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "FargateClusterConfigCommand46D4A6C7": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "FargateCluster019F03E8" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "FargateClusterMastersRole50BAF9FD", - "Arn" - ] - } - ] - ] - } - }, - "FargateClusterGetTokenCommand4ADED7BB": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "FargateCluster019F03E8" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "FargateClusterMastersRole50BAF9FD", - "Arn" - ] - } - ] - ] - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3BucketC479E94B": { - "Type": "String", - "Description": "S3 bucket for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4S3VersionKeyEF78B2AD": { - "Type": "String", - "Description": "S3 key for asset version \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParameters92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4ArtifactHash4190C3A3": { - "Type": "String", - "Description": "Artifact hash for asset \"92c405c4551a308bcdd55823f8b16268bd3c38fd2a011edaaf3ed72a80f557c4\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aS3BucketBFDBF6BA": { - "Type": "String", - "Description": "S3 bucket for asset \"2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23a\"" - }, - "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aS3VersionKey9325890D": { - "Type": "String", - "Description": "S3 key for asset version \"2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23a\"" - }, - "AssetParameters2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23aArtifactHash9461EAF0": { - "Type": "String", - "Description": "Artifact hash for asset \"2883c201a3eb42914ed90ac177158cae230d0b494abda1104dc43c9f228ac23a\"" - }, - "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aS3Bucket69836FE4": { - "Type": "String", - "Description": "S3 bucket for asset \"3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857a\"" - }, - "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aS3VersionKey7CCC6C3E": { - "Type": "String", - "Description": "S3 key for asset version \"3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857a\"" - }, - "AssetParameters3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857aArtifactHashC5379F3B": { - "Type": "String", - "Description": "Artifact hash for asset \"3c3dafe452613d5f9f73626c05994c3aa44a57e6250f053ee5628df3def3857a\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.expected.json b/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.expected.json deleted file mode 100644 index 673c4d55bf81f..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.expected.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elb-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-elb-integ/LB/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Default rule allow on 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancing::LoadBalancer", - "Properties": { - "Listeners": [ - { - "InstancePort": "80", - "InstanceProtocol": "http", - "LoadBalancerPort": "80", - "Protocol": "http" - } - ], - "CrossZone": true, - "HealthCheck": { - "HealthyThreshold": "2", - "Interval": "30", - "Target": "HTTP:80/", - "Timeout": "5", - "UnhealthyThreshold": "5" - }, - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - ] - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/test/integ.cognito.lit.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/test/integ.cognito.lit.expected.json deleted file mode 100644 index 206ab8458383d..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/test/integ.cognito.lit.expected.json +++ /dev/null @@ -1,555 +0,0 @@ -{ - "Resources": { - "Stack8A423254": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack" - } - ] - } - }, - "StackPublicSubnet1Subnet0AD81D22": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1RouteTable5057189D": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1RouteTableAssociation74F1C1B6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet1RouteTable5057189D" - }, - "SubnetId": { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - } - } - }, - "StackPublicSubnet1DefaultRoute16154E3D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet1RouteTable5057189D" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "StackIGW2F0A1126" - } - }, - "DependsOn": [ - "StackVPCGWFFCB6290" - ] - }, - "StackPublicSubnet1EIPBDAAB2A5": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1NATGatewayD2E1ABF7": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "StackPublicSubnet1EIPBDAAB2A5", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet2Subnet3C7D2288": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet2" - } - ] - } - }, - "StackPublicSubnet2RouteTableCD306445": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet2" - } - ] - } - }, - "StackPublicSubnet2RouteTableAssociation5E8F73F1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet2RouteTableCD306445" - }, - "SubnetId": { - "Ref": "StackPublicSubnet2Subnet3C7D2288" - } - } - }, - "StackPublicSubnet2DefaultRoute0319539B": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet2RouteTableCD306445" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "StackIGW2F0A1126" - } - }, - "DependsOn": [ - "StackVPCGWFFCB6290" - ] - }, - "StackPublicSubnet2EIP8CDBC8C2": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet2" - } - ] - } - }, - "StackPublicSubnet2NATGatewayA8E03AB3": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "StackPublicSubnet2EIP8CDBC8C2", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "StackPublicSubnet2Subnet3C7D2288" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PublicSubnet2" - } - ] - } - }, - "StackPrivateSubnet1Subnet47AC2BC7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-cognito/Stack/PrivateSubnet1" - } - ] - } - }, - "StackPrivateSubnet1RouteTable8ADA6A0C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PrivateSubnet1" - } - ] - } - }, - "StackPrivateSubnet1RouteTableAssociationFFE38495": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet1RouteTable8ADA6A0C" - }, - "SubnetId": { - "Ref": "StackPrivateSubnet1Subnet47AC2BC7" - } - } - }, - "StackPrivateSubnet1DefaultRouteFBF81BA5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet1RouteTable8ADA6A0C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "StackPublicSubnet1NATGatewayD2E1ABF7" - } - } - }, - "StackPrivateSubnet2SubnetA2F8EDD8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-cognito/Stack/PrivateSubnet2" - } - ] - } - }, - "StackPrivateSubnet2RouteTableA5546697": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack/PrivateSubnet2" - } - ] - } - }, - "StackPrivateSubnet2RouteTableAssociation68ACB8C1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet2RouteTableA5546697" - }, - "SubnetId": { - "Ref": "StackPrivateSubnet2SubnetA2F8EDD8" - } - } - }, - "StackPrivateSubnet2DefaultRoute22004492": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet2RouteTableA5546697" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "StackPublicSubnet2NATGatewayA8E03AB3" - } - } - }, - "StackIGW2F0A1126": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-cognito/Stack" - } - ] - } - }, - "StackVPCGWFFCB6290": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "InternetGatewayId": { - "Ref": "StackIGW2F0A1126" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - }, - { - "Ref": "StackPublicSubnet2Subnet3C7D2288" - } - ], - "Type": "application" - }, - "DependsOn": [ - "StackPublicSubnet1DefaultRoute16154E3D", - "StackPublicSubnet2DefaultRoute0319539B" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB integcognitoLBFBBBA626", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 443", - "FromPort": 443, - "IpProtocol": "tcp", - "ToPort": 443 - } - ], - "VpcId": { - "Ref": "Stack8A423254" - } - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "AuthenticateCognitoConfig": { - "UserPoolArn": { - "Fn::GetAtt": [ - "UserPool6BA7E5F2", - "Arn" - ] - }, - "UserPoolClientId": { - "Ref": "Client4A7F64DF" - }, - "UserPoolDomain": { - "Ref": "Domain66AC69E0" - } - }, - "Order": 1, - "Type": "authenticate-cognito" - }, - { - "FixedResponseConfig": { - "ContentType": "text/plain", - "MessageBody": "Authenticated", - "StatusCode": "200" - }, - "Order": 2, - "Type": "fixed-response" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Certificates": [ - { - "CertificateArn": "" - } - ], - "Port": 443, - "Protocol": "HTTPS" - } - }, - "UserPool6BA7E5F2": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_phone_number", - "Priority": 1 - }, - { - "Name": "verified_email", - "Priority": 2 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": true - }, - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "SmsVerificationMessage": "The verification code to your new account is {####}", - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Client4A7F64DF": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "UserPoolId": { - "Ref": "UserPool6BA7E5F2" - }, - "AllowedOAuthFlows": [ - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "email", - "openid" - ], - "CallbackURLs": [ - { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - }, - "/oauth2/idpresponse" - ] - ] - } - ], - "ExplicitAuthFlows": [ - "ALLOW_USER_PASSWORD_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "GenerateSecret": true, - "RefreshTokenValidity": 1, - "SupportedIdentityProviders": [ - "COGNITO" - ] - } - }, - "Domain66AC69E0": { - "Type": "AWS::Cognito::UserPoolDomain", - "Properties": { - "Domain": "test-cdk-prefix", - "UserPoolId": { - "Ref": "UserPool6BA7E5F2" - } - } - } - }, - "Outputs": { - "DNS": { - "Value": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.alb-target.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.alb-target.expected.json deleted file mode 100644 index 79e89e5a01081..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.alb-target.expected.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "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": "TestStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "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": "TestStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "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": "TestStack/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "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": "TestStack/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "TaskTaskRoleE98524A1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Task79114B6B": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": "public.ecr.aws/nginx/nginx:latest", - "Name": "nginx", - "PortMappings": [ - { - "ContainerPort": 80, - "Protocol": "tcp" - } - ] - } - ], - "Cpu": "256", - "Family": "TestStackTask24CEEDF4", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskTaskRoleE98524A1", - "Arn" - ] - } - } - }, - "ServiceLBE9A1ADBC": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceLBSecurityGroupF7435A5C", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "Type": "application" - } - }, - "ServiceLBSecurityGroupF7435A5C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB TestStackServiceLBD3BB32E9", - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceLBSecurityGrouptoTestStackServiceSecurityGroup59159BDD804A6BA8AC": { - "Type": "AWS::EC2::SecurityGroupEgress", - "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "ServiceLBSecurityGroupF7435A5C", - "GroupId" - ] - }, - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "DestinationSecurityGroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupEEA09B68", - "GroupId" - ] - }, - "FromPort": 80, - "ToPort": 80 - } - }, - "ServiceLBPublicListener46709EAA": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "ServiceLBPublicListenerECSGroup0CC8688C" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "ServiceLBE9A1ADBC" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "ServiceLBPublicListenerECSGroup0CC8688C": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Service9571FDD8": { - "Type": "AWS::ECS::Service", - "Properties": { - "Cluster": { - "Ref": "EcsDefaultClusterMnL3mNNYNVpc18E0451A" - }, - "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 50 - }, - "EnableECSManagedTags": false, - "HealthCheckGracePeriodSeconds": 60, - "LaunchType": "FARGATE", - "LoadBalancers": [ - { - "ContainerName": "nginx", - "ContainerPort": 80, - "TargetGroupArn": { - "Ref": "ServiceLBPublicListenerECSGroup0CC8688C" - } - } - ], - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ServiceSecurityGroupEEA09B68", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - } - }, - "TaskDefinition": { - "Ref": "Task79114B6B" - } - }, - "DependsOn": [ - "ServiceLBPublicListenerECSGroup0CC8688C", - "ServiceLBPublicListener46709EAA" - ] - }, - "ServiceSecurityGroupEEA09B68": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "TestStack/Service/Service/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "ServiceSecurityGroupfromTestStackServiceLBSecurityGroup76260E3B8004FB511A": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Load balancer to target", - "FromPort": 80, - "GroupId": { - "Fn::GetAtt": [ - "ServiceSecurityGroupEEA09B68", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "ServiceLBSecurityGroupF7435A5C", - "GroupId" - ] - }, - "ToPort": 80 - } - }, - "EcsDefaultClusterMnL3mNNYNVpc18E0451A": { - "Type": "AWS::ECS::Cluster" - }, - "NlbBCDB97FE": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - }, - { - "Key": "load_balancing.cross_zone.enabled", - "Value": "true" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "NlblistenerBE297616": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "NlblistenerTargetsGroupDD2A3CB0" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "NlbBCDB97FE" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "NlblistenerTargetsGroupDD2A3CB0": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "HealthCheckProtocol": "HTTP", - "Port": 80, - "Protocol": "TCP", - "Targets": [ - { - "Id": { - "Ref": "ServiceLBE9A1ADBC" - }, - "Port": 80 - } - ], - "TargetType": "alb", - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "DependsOn": [ - "ServiceLBPublicListenerECSGroup0CC8688C", - "ServiceLBPublicListener46709EAA" - ] - } - }, - "Outputs": { - "ServiceLoadBalancerDNSEC5B149E": { - "Value": { - "Fn::GetAtt": [ - "ServiceLBE9A1ADBC", - "DNSName" - ] - } - }, - "ServiceServiceURL250C0FB6": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "ServiceLBE9A1ADBC", - "DNSName" - ] - } - ] - ] - } - }, - "NlbEndpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "NlbBCDB97FE", - "DNSName" - ] - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.lambda-target.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.lambda-target.expected.json deleted file mode 100644 index a934646e087ab..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/test/integ.lambda-target.expected.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "Resources": { - "Stack8A423254": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack" - } - ] - } - }, - "StackPublicSubnet1Subnet0AD81D22": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1RouteTable5057189D": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1RouteTableAssociation74F1C1B6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet1RouteTable5057189D" - }, - "SubnetId": { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - } - } - }, - "StackPublicSubnet1DefaultRoute16154E3D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet1RouteTable5057189D" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "StackIGW2F0A1126" - } - }, - "DependsOn": [ - "StackVPCGWFFCB6290" - ] - }, - "StackPublicSubnet1EIPBDAAB2A5": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet1NATGatewayD2E1ABF7": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - }, - "AllocationId": { - "Fn::GetAtt": [ - "StackPublicSubnet1EIPBDAAB2A5", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet1" - } - ] - } - }, - "StackPublicSubnet2Subnet3C7D2288": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet2" - } - ] - } - }, - "StackPublicSubnet2RouteTableCD306445": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PublicSubnet2" - } - ] - } - }, - "StackPublicSubnet2RouteTableAssociation5E8F73F1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet2RouteTableCD306445" - }, - "SubnetId": { - "Ref": "StackPublicSubnet2Subnet3C7D2288" - } - } - }, - "StackPublicSubnet2DefaultRoute0319539B": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPublicSubnet2RouteTableCD306445" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "StackIGW2F0A1126" - } - }, - "DependsOn": [ - "StackVPCGWFFCB6290" - ] - }, - "StackPrivateSubnet1Subnet47AC2BC7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/Stack/PrivateSubnet1" - } - ] - } - }, - "StackPrivateSubnet1RouteTable8ADA6A0C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PrivateSubnet1" - } - ] - } - }, - "StackPrivateSubnet1RouteTableAssociationFFE38495": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet1RouteTable8ADA6A0C" - }, - "SubnetId": { - "Ref": "StackPrivateSubnet1Subnet47AC2BC7" - } - } - }, - "StackPrivateSubnet1DefaultRouteFBF81BA5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet1RouteTable8ADA6A0C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "StackPublicSubnet1NATGatewayD2E1ABF7" - } - } - }, - "StackPrivateSubnet2SubnetA2F8EDD8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Stack8A423254" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "TestStack/Stack/PrivateSubnet2" - } - ] - } - }, - "StackPrivateSubnet2RouteTableA5546697": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack/PrivateSubnet2" - } - ] - } - }, - "StackPrivateSubnet2RouteTableAssociation68ACB8C1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet2RouteTableA5546697" - }, - "SubnetId": { - "Ref": "StackPrivateSubnet2SubnetA2F8EDD8" - } - } - }, - "StackPrivateSubnet2DefaultRoute22004492": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "StackPrivateSubnet2RouteTableA5546697" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "StackPublicSubnet1NATGatewayD2E1ABF7" - } - } - }, - "StackIGW2F0A1126": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "TestStack/Stack" - } - ] - } - }, - "StackVPCGWFFCB6290": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Stack8A423254" - }, - "InternetGatewayId": { - "Ref": "StackIGW2F0A1126" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "StackPublicSubnet1Subnet0AD81D22" - }, - { - "Ref": "StackPublicSubnet2Subnet3C7D2288" - } - ], - "Type": "application" - }, - "DependsOn": [ - "StackPublicSubnet1DefaultRoute16154E3D", - "StackPublicSubnet2DefaultRoute0319539B" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB TestStackLBC7C3DDBD", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "Stack8A423254" - } - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetsGroup76EF81E8" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBListenerTargetsGroup76EF81E8": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Targets": [ - { - "Id": { - "Fn::GetAtt": [ - "FunA2CCED21", - "Arn" - ] - } - } - ], - "TargetType": "lambda" - }, - "DependsOn": [ - "FunInvokeServicePrincipalelasticloadbalancingamazonawscomD2CAC0C4" - ] - }, - "FunServiceRole3CC876D7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FunA2CCED21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\ndef handler(event, context):\n return {\n \"isBase64Encoded\": False,\n \"statusCode\": 200,\n \"statusDescription\": \"200 OK\",\n \"headers\": {\n \"Set-cookie\": \"cookies\",\n \"Content-Type\": \"application/json\"\n },\n \"body\": \"Hello from Lambda\"\n }\n " - }, - "Role": { - "Fn::GetAtt": [ - "FunServiceRole3CC876D7", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "FunServiceRole3CC876D7" - ] - }, - "FunInvokeServicePrincipalelasticloadbalancingamazonawscomD2CAC0C4": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FunA2CCED21", - "Arn" - ] - }, - "Principal": "elasticloadbalancing.amazonaws.com" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.dualstack.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.dualstack.expected.json deleted file mode 100644 index 7e04edcb3bfbf..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.dualstack.expected.json +++ /dev/null @@ -1,805 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/18", - "Ipv6CidrBlock": { - "Fn::Select": [ - 0, - { - "Fn::Cidr": [ - { - "Fn::Select": [ - 0, - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "Ipv6CidrBlocks" - ] - } - ] - }, - 2, - "64" - ] - } - ] - }, - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - }, - "DependsOn": [ - "IPv6Block" - ] - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1IPv6DefaultFD18367E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationIpv6CidrBlock": "::/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.64.0/18", - "Ipv6CidrBlock": { - "Fn::Select": [ - 1, - { - "Fn::Cidr": [ - { - "Fn::Select": [ - 0, - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "Ipv6CidrBlocks" - ] - } - ] - }, - 2, - "64" - ] - } - ] - }, - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - }, - "DependsOn": [ - "IPv6Block" - ] - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2IPv6DefaultDD0476C2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationIpv6CidrBlock": "::/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "IPv6Block": { - "Type": "AWS::EC2::VPCCidrBlock", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AmazonProvidedIpv6CidrBlock": true - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "IpAddressType": "dualstack", - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integLB9950B1E4", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - }, - { - "CidrIpv6": "::/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetGroupF04FCF6D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBListenerTargetGroupF04FCF6D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "Targets": [ - { - "Id": "10.0.128.6" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1IPv6DefaultFD18367E", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2IPv6DefaultDD0476C2", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetGroupA75CCCD9": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "Targets": [ - { - "Id": "10.0.128.5" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1IPv6DefaultFD18367E", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2IPv6DefaultDD0476C2", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetRule91FA260F": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerConditionalTargetGroupA75CCCD9" - }, - "Type": "forward" - } - ], - "Conditions": [ - { - "Field": "host-header", - "Values": [ - "example.com" - ] - } - ], - "ListenerArn": { - "Ref": "LBListener49E825B4" - }, - "Priority": 10 - } - }, - "LBListeneraction1Rule86E405BB": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "FixedResponseConfig": { - "MessageBody": "success", - "StatusCode": "200" - }, - "Type": "fixed-response" - } - ], - "Conditions": [ - { - "Field": "host-header", - "HostHeaderConfig": { - "Values": [ - "example.com" - ] - } - } - ], - "ListenerArn": { - "Ref": "LBListener49E825B4" - }, - "Priority": 1 - } - }, - "ResponseTimeHigh1D16E109F": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerTargetGroupF04FCF6D", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - }, - "ResponseTimeHigh2FFCF1FE1": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerConditionalTargetGroupA75CCCD9", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.expected.json deleted file mode 100644 index 92cf1bc173cd3..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.expected.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integLB9950B1E4", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetGroupF04FCF6D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBListenerTargetGroupF04FCF6D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "true" - }, - { - "Key": "stickiness.type", - "Value": "lb_cookie" - }, - { - "Key": "stickiness.lb_cookie.duration_seconds", - "Value": "300" - } - ], - "Targets": [ - { - "Id": "10.0.128.6" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetGroupA75CCCD9": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "slow_start.duration_seconds", - "Value": "60" - }, - { - "Key": "stickiness.enabled", - "Value": "true" - }, - { - "Key": "stickiness.type", - "Value": "app_cookie" - }, - { - "Key": "stickiness.app_cookie.cookie_name", - "Value": "MyDeliciousCookie" - }, - { - "Key": "stickiness.app_cookie.duration_seconds", - "Value": "300" - } - ], - "Targets": [ - { - "Id": "10.0.128.5" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetRule91FA260F": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerConditionalTargetGroupA75CCCD9" - }, - "Type": "forward" - } - ], - "Conditions": [ - { - "Field": "host-header", - "Values": [ - "example.com" - ] - } - ], - "ListenerArn": { - "Ref": "LBListener49E825B4" - }, - "Priority": 10 - } - }, - "ResponseTimeHigh1D16E109F": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerTargetGroupF04FCF6D", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - }, - "ResponseTimeHigh2FFCF1FE1": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerConditionalTargetGroupA75CCCD9", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb2.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb2.expected.json deleted file mode 100644 index 7a66a180ad66b..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb2.expected.json +++ /dev/null @@ -1,710 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integLB9950B1E4", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetGroupF04FCF6D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "LBListenerTargetGroupF04FCF6D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "Targets": [ - { - "Id": "10.0.128.4" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetGroupA75CCCD9": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "TargetGroupAttributes": [ - { - "Key": "stickiness.enabled", - "Value": "false" - } - ], - "Targets": [ - { - "Id": "10.0.128.5" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet1EIP6AD938E8", - "VPCPublicSubnet1NATGatewayE0556630", - "VPCPublicSubnet1RouteTableFEE4B781", - "VPCPublicSubnet1RouteTableAssociation0B0896DC", - "VPCPublicSubnet1SubnetB4246D30", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet2EIP4947BC00", - "VPCPublicSubnet2NATGateway3C070193", - "VPCPublicSubnet2RouteTable6F1A15F1", - "VPCPublicSubnet2RouteTableAssociation5A808732", - "VPCPublicSubnet2Subnet74179F39" - ] - }, - "LBListenerConditionalTargetRule91FA260F": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerConditionalTargetGroupA75CCCD9" - }, - "Type": "forward" - } - ], - "Conditions": [ - { - "Field": "host-header", - "Values": [ - "example.com" - ] - } - ], - "ListenerArn": { - "Ref": "LBListener49E825B4" - }, - "Priority": 10 - } - }, - "LBListeneraction1Rule86E405BB": { - "Type": "AWS::ElasticLoadBalancingV2::ListenerRule", - "Properties": { - "Actions": [ - { - "FixedResponseConfig": { - "MessageBody": "success", - "StatusCode": "200" - }, - "Type": "fixed-response" - } - ], - "Conditions": [ - { - "Field": "host-header", - "HostHeaderConfig": { - "Values": [ - "example.com" - ] - } - } - ], - "ListenerArn": { - "Ref": "LBListener49E825B4" - }, - "Priority": 1 - } - }, - "ResponseTimeHigh1D16E109F": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerTargetGroupF04FCF6D", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - }, - "ResponseTimeHigh2FFCF1FE1": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "Dimensions": [ - { - "Name": "LoadBalancer", - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "/", - { - "Ref": "LBListener49E825B4" - } - ] - } - ] - } - ] - ] - } - }, - { - "Name": "TargetGroup", - "Value": { - "Fn::GetAtt": [ - "LBListenerConditionalTargetGroupA75CCCD9", - "TargetGroupFullName" - ] - } - } - ], - "MetricName": "TargetResponseTime", - "Namespace": "AWS/ApplicationELB", - "Period": 300, - "Statistic": "Average", - "Threshold": 5 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.expected.json deleted file mode 100644 index 11f85892d9ec8..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.expected.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBListener49E825B4": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "LBListenerTargetGroupF04FCF6D" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "LB8A12904C" - }, - "Port": 443, - "Protocol": "TCP" - } - }, - "LBListenerTargetGroupF04FCF6D": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 443, - "Protocol": "TCP", - "Targets": [ - { - "Id": "10.0.1.1" - } - ], - "TargetType": "ip", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - }, - "DependsOn": [ - "VPCIGWB7E252D3" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.vpc-endpoint-service.expected.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.vpc-endpoint-service.expected.json deleted file mode 100644 index 18a3482e70715..0000000000000 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.vpc-endpoint-service.expected.json +++ /dev/null @@ -1,630 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-ec2-vpc-endpoint-service/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "NLBNoPrincipals25B7CFB1": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "network" - } - }, - "MyVpcEndpointServiceWithNoPrincipals9B24276E": { - "Type": "AWS::EC2::VPCEndpointService", - "Properties": { - "AcceptanceRequired": false, - "NetworkLoadBalancerArns": [ - { - "Ref": "NLBNoPrincipals25B7CFB1" - } - ] - } - }, - "NLBWithPrincipals912E28FF": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "network" - } - }, - "MyVpcEndpointServiceWithPrincipals41EE2DF2": { - "Type": "AWS::EC2::VPCEndpointService", - "Properties": { - "AcceptanceRequired": false, - "NetworkLoadBalancerArns": [ - { - "Ref": "NLBWithPrincipals912E28FF" - } - ] - } - }, - "MyVpcEndpointServiceWithPrincipalsPermissions29F9BD5A": { - "Type": "AWS::EC2::VPCEndpointServicePermissions", - "Properties": { - "ServiceId": { - "Ref": "MyVpcEndpointServiceWithPrincipals41EE2DF2" - }, - "AllowedPrincipals": [ - "arn:aws:iam::123456789012:root" - ] - } - } - }, - "Outputs": { - "MyVpcEndpointServiceWithNoPrincipalsServiceName": { - "Description": "Give this to service consumers so they can connect via VPC Endpoint", - "Value": { - "Fn::Join": [ - ".", - [ - "com.amazonaws.vpce", - { - "Ref": "AWS::Region" - }, - { - "Ref": "MyVpcEndpointServiceWithNoPrincipals9B24276E" - } - ] - ] - }, - "Export": { - "Name": "ServiceName" - } - }, - "MyVpcEndpointServiceWithPrincipalsEndpointServiceId": { - "Description": "Reference this service from other stacks", - "Value": { - "Ref": "MyVpcEndpointServiceWithPrincipals41EE2DF2" - }, - "Export": { - "Name": "EndpointServiceId" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch-vpc.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch-vpc.expected.json deleted file mode 100644 index 1883358d70fe7..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch-vpc.expected.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-elasticsearch-vpc/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "DomainSecurityGroup48AA5FD6": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for domain Domain", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 2, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessConfig": { - "AvailabilityZoneCount": 2 - }, - "ZoneAwarenessEnabled": true - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": false - }, - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": false - }, - "VPCOptions": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DomainSecurityGroup48AA5FD6", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.advancedsecurity.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.advancedsecurity.expected.json deleted file mode 100644 index 84333cb6005d7..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.advancedsecurity.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Resources": { - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "InternalUserDatabaseEnabled": false, - "MasterUserOptions": { - "MasterUserARN": { - "Fn::GetAtt": [ - "User00B015A1", - "Arn" - ] - } - } - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true - }, - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.expected.json deleted file mode 100644 index bad6008645b93..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.expected.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "Resources": { - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DomainSlowSearchLogs5B35A97A": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DomainAppLogs21698C1B": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadCustomResourcePolicy0B41F6DF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadCustomResourcePolicy0B41F6DF", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadA70E756D": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "DomainSlowSearchLogs5B35A97A", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "DomainAppLogs21698C1B", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "DomainSlowSearchLogs5B35A97A", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "DomainAppLogs21698C1B", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadCustomResourcePolicy0B41F6DF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true, - "KmsKeyId": { - "Ref": "Key961B73FD" - } - }, - "LogPublishingOptions": { - "ES_APPLICATION_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "DomainAppLogs21698C1B", - "Arn" - ] - }, - "Enabled": true - }, - "SEARCH_SLOW_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "DomainSlowSearchLogs5B35A97A", - "Arn" - ] - }, - "Enabled": true - } - }, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "DependsOn": [ - "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadCustomResourcePolicy0B41F6DF", - "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadA70E756D" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DomainESAccessPolicyCustomResourcePolicy9747FC42": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateElasticsearchDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DomainESAccessPolicyCustomResourcePolicy9747FC42", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "DomainESAccessPolicy89986F33": { - "Type": "Custom::ElasticsearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "DomainESAccessPolicyCustomResourcePolicy9747FC42" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kms:CreateGrant", - "kms:Describe*", - "kms:List*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.expected.json deleted file mode 100644 index 7d14d86bb2134..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.expected.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "Resources": { - "Domain1SlowSearchLogs8F3B0506": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain1AppLogs6E8D1D67": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6CustomResourcePolicy24436E05": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6CustomResourcePolicy24436E05", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6D8BDCF36": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6CustomResourcePolicy24436E05" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain19FCBCB91": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "AdvancedOptions": { - "rest.action.multi.allow_explicit_index": "false", - "indices.fielddata.cache.size": "25", - "indices.query.bool.max_clause_count": "2048" - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true - }, - "LogPublishingOptions": { - "ES_APPLICATION_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "Enabled": true - }, - "SEARCH_SLOW_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "Enabled": true - } - }, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "DependsOn": [ - "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6CustomResourcePolicy24436E05", - "Domain1ESLogGroupPolicyc8858d5dba055f677469d76cb6ad538fd732ba69a6D8BDCF36" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain1ESAccessPolicyCustomResourcePolicyC04432B6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateElasticsearchDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain19FCBCB91", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain1ESAccessPolicyCustomResourcePolicyC04432B6", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain1ESAccessPolicy5D846A31": { - "Type": "Custom::ElasticsearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain1ESAccessPolicyCustomResourcePolicyC04432B6" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "Domain2SlowSearchLogs0C75F64B": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain2AppLogs810876E2": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71CustomResourcePolicy77691A33": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71CustomResourcePolicy77691A33", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71F1DE93A1": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8405238e455eeabd840cf6933e1814efc51d2de71\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8405238e455eeabd840cf6933e1814efc51d2de71\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc8405238e455eeabd840cf6933e1814efc51d2de71\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71CustomResourcePolicy77691A33" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain2644FE48C": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "AdvancedOptions": { - "rest.action.multi.allow_explicit_index": "false", - "indices.fielddata.cache.size": "25", - "indices.query.bool.max_clause_count": "2048" - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true - }, - "LogPublishingOptions": { - "ES_APPLICATION_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "Enabled": true - }, - "SEARCH_SLOW_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "Enabled": true - } - }, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "DependsOn": [ - "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71CustomResourcePolicy77691A33", - "Domain2ESLogGroupPolicyc8405238e455eeabd840cf6933e1814efc51d2de71F1DE93A1" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain2ESAccessPolicyCustomResourcePolicy8EED1F24": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateElasticsearchDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain2644FE48C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain2ESAccessPolicyCustomResourcePolicy8EED1F24", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain2ESAccessPolicy3DF4C2BA": { - "Type": "Custom::ElasticsearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain2644FE48C" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain2644FE48C" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain2644FE48C" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain2644FE48C" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain2ESAccessPolicyCustomResourcePolicy8EED1F24" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.ultrawarm.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.ultrawarm.expected.json deleted file mode 100644 index 702d302029600..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.ultrawarm.expected.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterCount": 2, - "DedicatedMasterEnabled": true, - "DedicatedMasterType": "r5.large.elasticsearch", - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "WarmCount": 2, - "WarmEnabled": true, - "WarmType": "ultrawarm1.medium.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": false - }, - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": false - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.expected.json b/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.expected.json deleted file mode 100644 index 86297ef04a7dd..0000000000000 --- a/packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.expected.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "Resources": { - "DomainMasterUserBFAFA7D9": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "ExcludeCharacters": "{}'\\*[]()`", - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain66AC69E0": { - "Type": "AWS::Elasticsearch::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "InternalUserDatabaseEnabled": true, - "MasterUserOptions": { - "MasterUserName": "admin", - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DomainMasterUserBFAFA7D9" - }, - ":SecretString:password::}}" - ] - ] - } - } - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "ElasticsearchClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.elasticsearch", - "ZoneAwarenessEnabled": false - }, - "ElasticsearchVersion": "7.1", - "EncryptionAtRestOptions": { - "Enabled": true - }, - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DomainESAccessPolicyCustomResourcePolicy9747FC42": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateElasticsearchDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DomainESAccessPolicyCustomResourcePolicy9747FC42", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "DomainESAccessPolicy89986F33": { - "Type": "Custom::ElasticsearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateElasticsearchDomainConfig\",\"service\":\"ES\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.ElasticsearchClusterConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "DomainESAccessPolicyCustomResourcePolicy9747FC42" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json b/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json deleted file mode 100644 index 966e633dac39f..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.expected.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "Resources": { - "ScheduleRuleDA5BD877": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "cron(0 0 * * ? *)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Id": "Target0", - "Input": "{\"service\":\"ECS\",\"action\":\"updateService\",\"parameters\":{\"service\":\"cool-service\",\"forceNewDeployment\":true}}" - }, - { - "Arn": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Id": "Target1", - "Input": "{\"service\":\"RDS\",\"action\":\"stopDBInstance\",\"parameters\":{\"DBInstanceIdentifier\":\"dev-instance\"}}" - } - ] - } - }, - "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget0HandlerF2C0C898874A4805": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "ScheduleRuleDA5BD877", - "Arn" - ] - } - } - }, - "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget1Handler4688817C0179F894": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "ScheduleRuleDA5BD877", - "Arn" - ] - } - } - }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:UpdateService", - "rds:CreateDBSnapshot", - "rds:StopDBInstance" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", - "Roles": [ - { - "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" - } - ] - } - }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94S3BucketEBC7D1F4" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94S3VersionKeyDC9DCE00" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94S3VersionKeyDC9DCE00" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" - ] - }, - "PatternRule4AF6D328": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "RDS DB Instance Event" - ], - "detail": { - "Message": [ - "DB instance restarted" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Id": "Target0", - "InputTransformer": { - "InputPathsMap": { - "detail-SourceArn": "$.detail.SourceArn" - }, - "InputTemplate": "{\"service\":\"RDS\",\"action\":\"createDBSnapshot\",\"parameters\":{\"DBInstanceIdentifier\":}}" - } - } - ] - } - }, - "PatternRuleAllowEventRuleawscdkawsapitargetintegPatternRulePatternRuleTarget0HandlerA0821464BB49C5D3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "PatternRule4AF6D328", - "Arn" - ] - } - } - } - }, - "Parameters": { - "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94S3BucketEBC7D1F4": { - "Type": "String", - "Description": "S3 bucket for asset \"6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94\"" - }, - "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94S3VersionKeyDC9DCE00": { - "Type": "String", - "Description": "S3 key for asset version \"6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94\"" - }, - "AssetParameters6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94ArtifactHash34B6F705": { - "Type": "String", - "Description": "Artifact hash for asset \"6e29dae9ab5b8a6c0aa8f922991cad784ebd048388ec6587d4832f307ef92f94\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/batch/integ.job-definition-events.expected.json b/packages/@aws-cdk/aws-events-targets/test/batch/integ.job-definition-events.expected.json deleted file mode 100644 index f4dfe0408f63e..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/batch/integ.job-definition-events.expected.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "Resources": { - "ComputeEnvironmentResourceServiceInstanceRoleDC6D4445": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - } - }, - "ComputeEnvironmentC570994D": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "UNMANAGED", - "ServiceRole": { - "Fn::GetAtt": [ - "ComputeEnvironmentResourceServiceInstanceRoleDC6D4445", - "Arn" - ] - }, - "State": "ENABLED" - } - }, - "MyQueueE6CA6235": { - "Type": "AWS::Batch::JobQueue", - "Properties": { - "ComputeEnvironmentOrder": [ - { - "ComputeEnvironment": { - "Ref": "ComputeEnvironmentC570994D" - }, - "Order": 1 - } - ], - "Priority": 1, - "State": "ENABLED" - } - }, - "MyJob8719E923": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "Image": "test-repo", - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { "Type": "VCPU", "Value": "1" }, - { "Type": "MEMORY", "Value": "4" } - ] - }, - "PlatformCapabilities": [ - "EC2" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - }, - "MyJobEventsRoleCF43C336": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyJobEventsRoleDefaultPolicy7266D3A7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "batch:SubmitJob", - "Effect": "Allow", - "Resource": [ - { - "Ref": "MyJob8719E923" - }, - { - "Ref": "MyQueueE6CA6235" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyJobEventsRoleDefaultPolicy7266D3A7", - "Roles": [ - { - "Ref": "MyJobEventsRoleCF43C336" - } - ] - } - }, - "TimerBF6F831F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyQueueE6CA6235" - }, - "BatchParameters": { - "JobDefinition": { - "Ref": "MyJob8719E923" - }, - "JobName": "batcheventsTimer32212B30" - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "MyJobEventsRoleCF43C336", - "Arn" - ] - } - } - ] - } - }, - "Timer2B6F162E9": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyQueueE6CA6235" - }, - "BatchParameters": { - "JobDefinition": { - "Ref": "MyJob8719E923" - }, - "JobName": "batcheventsTimer232549135" - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - }, - "Id": "Target0", - "RetryPolicy": { - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 2 - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyJobEventsRoleCF43C336", - "Arn" - ] - } - } - ] - } - }, - "Queue4A7E3555": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueuePolicy25439813": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Timer2B6F162E9", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - }, - "Sid": "AllowEventRulebatcheventsTimer232549135" - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "Queue4A7E3555" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json b/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json deleted file mode 100644 index e10af31aea26b..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/codebuild/integ.project-events.expected.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "Resources": { - "MyRepoF4F48043": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "aws-cdk-codebuild-events" - } - }, - "MyRepoOnCommit0E80B304": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codecommit" - ], - "resources": [ - { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - ], - "detail-type": [ - "CodeCommit Repository State Change" - ], - "detail": { - "event": [ - "referenceCreated", - "referenceUpdated" - ], - "referenceName": [ - "master" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyProject39F7B0AE", - "Arn" - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - }, - "Id": "Target0", - "RetryPolicy": { - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 2 - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyProjectEventsRole5B7D93F5", - "Arn" - ] - } - }, - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target1", - "InputTransformer": { - "InputPathsMap": { - "detail-repositoryName": "$.detail.repositoryName", - "detail-referenceName": "$.detail.referenceName" - }, - "InputTemplate": "\"A commit was pushed to the repository on branch \"" - } - } - ] - } - }, - "MyProjectRole9BBE5233": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectRoleDefaultPolicyB19B7C29": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codecommit:GitPull", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "Arn" - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "MyProject39F7B0AE" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "MyProject39F7B0AE" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29", - "Roles": [ - { - "Ref": "MyProjectRole9BBE5233" - } - ] - } - }, - "MyProject39F7B0AE": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "MyProjectRole9BBE5233", - "Arn" - ] - }, - "Source": { - "Location": { - "Fn::GetAtt": [ - "MyRepoF4F48043", - "CloneUrlHttp" - ] - }, - "Type": "CODECOMMIT" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3" - } - }, - "MyProjectStateChange2DAB75B7": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codebuild" - ], - "detail": { - "project-name": [ - { - "Ref": "MyProject39F7B0AE" - } - ] - }, - "detail-type": [ - "CodeBuild Build State Change" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0" - } - ] - } - }, - "MyProjectPhaseChangeCE6728A3": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.codebuild" - ], - "detail": { - "project-name": [ - { - "Ref": "MyProject39F7B0AE" - } - ] - }, - "detail-type": [ - "CodeBuild Build Phase Change" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0", - "InputTransformer": { - "InputPathsMap": { - "detail-completed-phase": "$.detail.completed-phase" - }, - "InputTemplate": "\"Build phase changed to \"" - } - } - ] - } - }, - "MyProjectEventsRole5B7D93F5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyProjectEventsRoleDefaultPolicy397DCBF8": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codebuild:StartBuild", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyProject39F7B0AE", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyProjectEventsRoleDefaultPolicy397DCBF8", - "Roles": [ - { - "Ref": "MyProjectEventsRole5B7D93F5" - } - ] - } - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyQueueawscdkcodebuildeventsMyTopic550011DCF72DE3ED": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - }, - "DeadLetterQueue9F481546": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeadLetterQueuePolicyB1FB890C": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyRepoOnCommit0E80B304", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - }, - "Sid": "AllowEventRuleawscdkcodebuildeventsMyRepoOnCommit0ED1137A" - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "DeadLetterQueue9F481546" - } - ] - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyTopicPolicy12A5EC17": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Ref": "MyTopic86869434" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "MyTopic86869434" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.expected.json b/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.expected.json deleted file mode 100644 index 045364b8680cb..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.expected.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "Resources": { - "Repo02AC86CF": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "RepositoryName": "TestRepository" - } - }, - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKey87C796D2": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKeyAlias9530209A": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelineeventspipelinepipeline22f2a91dfbb66895", - "TargetKeyId": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKey87C796D2", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "pipelinePipeline22F2A91DArtifactsBucketC1799DCD": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKey87C796D2", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "pipelinePipeline22F2A91DArtifactsBucketPolicy269103C2": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "pipelinePipeline22F2A91DArtifactsBucketC1799DCD" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketC1799DCD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketC1799DCD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "pipelinePipeline22F2A91DRole58B7B05E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "pipelinePipeline22F2A91DRoleDefaultPolicyCDEE9D19": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketC1799DCD", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketC1799DCD", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKey87C796D2", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DBuildHelloCodePipelineActionRoleA9729116", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DSourceCodeCommitCodePipelineActionRoleE54633E5", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "pipelinePipeline22F2A91DRoleDefaultPolicyCDEE9D19", - "Roles": [ - { - "Ref": "pipelinePipeline22F2A91DRole58B7B05E" - } - ] - } - }, - "pipelinePipeline22F2A91DEB5D089B": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DRole58B7B05E", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "CodeCommit", - "Version": "1" - }, - "Configuration": { - "RepositoryName": { - "Fn::GetAtt": [ - "Repo02AC86CF", - "Name" - ] - }, - "BranchName": "master" - }, - "Name": "CodeCommit", - "OutputArtifacts": [ - { - "Name": "Src" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DSourceCodeCommitCodePipelineActionRoleE54633E5", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Name": "Hello", - "RoleArn": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DBuildHelloCodePipelineActionRoleA9729116", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DArtifactsBucketEncryptionKey87C796D2", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "pipelinePipeline22F2A91DArtifactsBucketC1799DCD" - }, - "Type": "S3" - } - }, - "DependsOn": [ - "pipelinePipeline22F2A91DRoleDefaultPolicyCDEE9D19", - "pipelinePipeline22F2A91DRole58B7B05E" - ] - }, - "pipelinePipeline22F2A91DSourceCodeCommitCodePipelineActionRoleE54633E5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "pipelinePipeline22F2A91DBuildHelloCodePipelineActionRoleA9729116": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "pipelinePipeline22F2A91DEventsRole048D7F59": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "pipelinePipeline22F2A91DEventsRoleDefaultPolicyEED1010F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "codepipeline:StartPipelineExecution", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "pipelinePipeline22F2A91DEB5D089B" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "pipelinePipeline22F2A91DEventsRoleDefaultPolicyEED1010F", - "Roles": [ - { - "Ref": "pipelinePipeline22F2A91DEventsRole048D7F59" - } - ] - } - }, - "dlq09C78ACC": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ruleF2C1DCDC": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codepipeline:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "pipelinePipeline22F2A91DEB5D089B" - } - ] - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "dlq09C78ACC", - "Arn" - ] - } - }, - "Id": "Target0", - "RetryPolicy": { - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 2 - }, - "RoleArn": { - "Fn::GetAtt": [ - "pipelinePipeline22F2A91DEventsRole048D7F59", - "Arn" - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json deleted file mode 100644 index a1423b9e05d3a..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json +++ /dev/null @@ -1,922 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "EcsClusterDefaultAutoScalingGroupInstanceProfile2CE606B3" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupInstanceSecurityGroup912E1231", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "EcsCluster97242B84" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy04DC6C80", - "EcsClusterDefaultAutoScalingGroupInstanceRole3C026863" - ] - }, - "EcsClusterDefaultAutoScalingGroupASGC1A785DB": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "EcsClusterDefaultAutoScalingGroupLaunchConfigB7E376C1" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - } - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "Roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - } - ] - } - }, - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookFFA63029": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - }, - "RoleARN": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B", - "Arn" - ] - } - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy75002F88", - "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "TheContainer" - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegecsTaskDef8DD0C801", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "TaskDefEventsRoleFB3B67B8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefEventsRoleDefaultPolicyA124E85B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Ref": "TaskDef54694570" - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefEventsRoleDefaultPolicyA124E85B", - "Roles": [ - { - "Ref": "TaskDefEventsRoleFB3B67B8" - } - ] - } - }, - "Rule4C995B7F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - }, - "EcsParameters": { - "TaskCount": 1, - "TaskDefinitionArn": { - "Ref": "TaskDef54694570" - } - }, - "Id": "Target0", - "Input": "{\"containerOverrides\":[{\"name\":\"TheContainer\",\"environment\":[{\"name\":\"I_WAS_TRIGGERED\",\"value\":\"From CloudWatch Events\"}]}]}", - "RoleArn": { - "Fn::GetAtt": [ - "TaskDefEventsRoleFB3B67B8", - "Arn" - ] - } - } - ] - } - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json deleted file mode 100644 index bcfc4ef7fb064..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.expected.json +++ /dev/null @@ -1,499 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ-fargate/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "EcsCluster97242B84": { - "Type": "AWS::ECS::Cluster" - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Name": "TheContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsintegfargateTaskDef8878AF94", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "TaskDefEventsRoleFB3B67B8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefEventsRoleDefaultPolicyA124E85B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Ref": "TaskDef54694570" - } - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefEventsRoleDefaultPolicyA124E85B", - "Roles": [ - { - "Ref": "TaskDefEventsRoleFB3B67B8" - } - ] - } - }, - "TaskDefSecurityGroupD50E7CF0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ-fargate/TaskDef/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Rule4C995B7F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - }, - "EcsParameters": { - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsVpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "TaskDefSecurityGroupD50E7CF0", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - } - }, - "TaskCount": 1, - "TaskDefinitionArn": { - "Ref": "TaskDef54694570" - } - }, - "Id": "Target0", - "Input": "{\"containerOverrides\":[{\"name\":\"TheContainer\",\"environment\":[{\"name\":\"I_WAS_TRIGGERED\",\"value\":\"From CloudWatch Events\"}]}]}", - "RoleArn": { - "Fn::GetAtt": [ - "TaskDefEventsRoleFB3B67B8", - "Arn" - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/event-bus/integ.event-bus.expected.json b/packages/@aws-cdk/aws-events-targets/test/event-bus/integ.event-bus.expected.json deleted file mode 100644 index a10603f0b03b5..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/event-bus/integ.event-bus.expected.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Resources": { - "Rule4C995B7F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:aws:events:", - { - "Ref": "AWS::Region" - }, - ":999999999999:event-bus/test-bus" - ] - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "RuleEventsRoleC51A4248", - "Arn" - ] - } - } - ] - } - }, - "RuleEventsRoleC51A4248": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RuleEventsRoleDefaultPolicy0510525D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "events:PutEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:aws:events:", - { - "Ref": "AWS::Region" - }, - ":999999999999:event-bus/test-bus" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RuleEventsRoleDefaultPolicy0510525D", - "Roles": [ - { - "Ref": "RuleEventsRoleC51A4248" - } - ] - } - }, - "Queue4A7E3555": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueuePolicy25439813": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Rule4C995B7F", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - }, - "Sid": "AllowEventRuleeventsourcestackRuleFCA41174" - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "Queue4A7E3555" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json deleted file mode 100644 index 2721bd7c3c250..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "Resources": { - "firehosebucket84C8AE0B": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "firehoseroleDDC4CF0E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "firehoseroleDefaultPolicy3F3F850D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "firehosebucket84C8AE0B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "firehosebucket84C8AE0B", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "firehoseroleDefaultPolicy3F3F850D", - "Roles": [ - { - "Ref": "firehoseroleDDC4CF0E" - } - ] - } - }, - "MyStream": { - "Type": "AWS::KinesisFirehose::DeliveryStream", - "Properties": { - "ExtendedS3DestinationConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "firehosebucket84C8AE0B", - "Arn" - ] - }, - "RoleARN": { - "Fn::GetAtt": [ - "firehoseroleDDC4CF0E", - "Arn" - ] - } - } - } - }, - "MyStreamEventsRole5B6CC6AF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyStreamEventsRoleDefaultPolicy2089B49E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "firehose:PutRecord", - "firehose:PutRecordBatch" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyStream", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyStreamEventsRoleDefaultPolicy2089B49E", - "Roles": [ - { - "Ref": "MyStreamEventsRole5B6CC6AF" - } - ] - } - }, - "EveryMinute2BBCEA8F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyStream", - "Arn" - ] - }, - "Id": "Target0", - "RoleArn": { - "Fn::GetAtt": [ - "MyStreamEventsRole5B6CC6AF", - "Arn" - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/kinesis/integ.kinesis-stream.expected.json b/packages/@aws-cdk/aws-events-targets/test/kinesis/integ.kinesis-stream.expected.json deleted file mode 100644 index babfefc9b5972..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/kinesis/integ.kinesis-stream.expected.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "Resources": { - "MyStream5C050E93": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "ShardCount": 1, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - }, - "RetentionPeriodHours": 24, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - } - } - }, - "MyStreamEventsRole5B6CC6AF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyStreamEventsRoleDefaultPolicy2089B49E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kinesis:PutRecord", - "kinesis:PutRecords" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyStream5C050E93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyStreamEventsRoleDefaultPolicy2089B49E", - "Roles": [ - { - "Ref": "MyStreamEventsRole5B6CC6AF" - } - ] - } - }, - "EveryMinute2BBCEA8F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyStream5C050E93", - "Arn" - ] - }, - "Id": "Target0", - "KinesisParameters": { - "PartitionKeyPath": "$.id" - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyStreamEventsRole5B6CC6AF", - "Arn" - ] - } - } - ] - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} diff --git a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json b/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json deleted file mode 100644 index e55c53c5d4048..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "Resources": { - "MyFuncServiceRole54065130": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunc8A243A2C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFuncServiceRole54065130", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFuncServiceRole54065130" - ] - }, - "TimerBF6F831F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Id": "Target0" - } - ] - } - }, - "TimerAllowEventRulelambdaeventsMyFunc910E580F793D7BBB": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "TimerBF6F831F", - "Arn" - ] - } - } - }, - "Timer2B6F162E9": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Id": "Target0" - } - ] - } - }, - "Timer2AllowEventRulelambdaeventsMyFunc910E580FCCD9CDCE": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "Timer2B6F162E9", - "Arn" - ] - } - } - }, - "Timer30894E3BB": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - }, - "Id": "Target0", - "RetryPolicy": { - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 2 - } - } - ] - } - }, - "Timer3AllowEventRulelambdaeventsMyFunc910E580F79317F73": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunc8A243A2C", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "Timer30894E3BB", - "Arn" - ] - } - } - }, - "Queue4A7E3555": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueuePolicy25439813": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Timer30894E3BB", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - }, - "Sid": "AllowEventRulelambdaeventsTimer3107B9373" - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "Queue4A7E3555" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json b/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json deleted file mode 100644 index c4bb05cf2b33f..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.expected.json +++ /dev/null @@ -1,482 +0,0 @@ -{ - "Resources": { - "loggroupB02AAEB1": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "LogGroupName": "MyLogGroupName", - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "loggroup2F19C5C9B": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "LogGroupName": "MyLogGroupName2", - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "loggroupimportedD91682B5": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "LogGroupName": "MyLogGroupNameToBeImported", - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TimerBF6F831F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "loggroupB02AAEB1" - } - ] - ] - }, - "Id": "Target0" - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimerC63340B0C92153CD": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "loggroupB02AAEB1", - "Arn" - ] - }, - "\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimerC63340B0\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "loggroupB02AAEB1", - "Arn" - ] - }, - "\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimerC63340B0\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "Timer2B6F162E9": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(2 minutes)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "loggroup2F19C5C9B" - } - ] - ] - }, - "Id": "Target0", - "InputTransformer": { - "InputPathsMap": { - "detail-type": "$.detail-type" - }, - "InputTemplate": "{\"data\":}" - } - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimer289E3527E78608648": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "loggroup2F19C5C9B", - "Arn" - ] - }, - "\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimer289E3527E\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "loggroup2F19C5C9B", - "Arn" - ] - }, - "\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimer289E3527E\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer289E3527EF8F6205F\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "dlq09C78ACC": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Timer30894E3BB": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:MyLogGroupNameToBeImported" - ] - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "dlq09C78ACC", - "Arn" - ] - } - }, - "Id": "Target0", - "RetryPolicy": { - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 2 - } - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "EventsLogGroupPolicyloggroupeventsTimer37DF74C174B3D705D": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:MyLogGroupNameToBeImported:*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimer37DF74C17\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Resource\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:MyLogGroupNameToBeImported:*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"EventsLogGroupPolicyloggroupeventsTimer37DF74C17\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/sns/integ.sns-event-rule-target.expected.json b/packages/@aws-cdk/aws-events-targets/test/sns/integ.sns-event-rule-target.expected.json deleted file mode 100644 index 37a78f010d792..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/sns/integ.sns-event-rule-target.expected.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyTopicPolicy12A5EC17": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Ref": "MyTopic86869434" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "MyTopic86869434" - } - ] - } - }, - "EveryMinute2BBCEA8F": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Ref": "MyTopic86869434" - }, - "Id": "Target0" - } - ] - } - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyQueueawscdksnseventtargetMyTopicB7575CD87304D383": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/sqs/integ.sqs-event-rule-target.expected.json b/packages/@aws-cdk/aws-events-targets/test/sqs/integ.sqs-event-rule-target.expected.json deleted file mode 100644 index 9f300d5f03e0f..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/sqs/integ.sqs-event-rule-target.expected.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "Resources": { - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyRuleA44AB831": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - }, - "DeadLetterConfig": { - "Arn": { - "Fn::GetAtt": [ - "MyDeadLetterQueueD997968A", - "Arn" - ] - } - }, - "Id": "Target0" - } - ] - } - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "Properties": { - "KmsMasterKeyId": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyDeadLetterQueueD997968A": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyDeadLetterQueuePolicyCC35D52C": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyRuleA44AB831", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "events.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyDeadLetterQueueD997968A", - "Arn" - ] - }, - "Sid": "AllowEventRuleawscdksqseventtargetMyRule0027A8F4" - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyDeadLetterQueueD997968A" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fsx/test/integ.lustre-file-system.expected.json b/packages/@aws-cdk/aws-fsx/test/integ.lustre-file-system.expected.json deleted file mode 100644 index c5826b996a6bf..0000000000000 --- a/packages/@aws-cdk/aws-fsx/test/integ.lustre-file-system.expected.json +++ /dev/null @@ -1,708 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "FsxLustreFileSystemFsxLustreSecurityGroup1C661EA7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "AwsCdkFsxLustre/FsxLustreFileSystem/FsxLustreSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "FsxLustreFileSystemFsxLustreSecurityGroupfromAwsCdkFsxLustreFsxLustreFileSystemFsxLustreSecurityGroup95767E0C98810230FA2D695": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from AwsCdkFsxLustreFsxLustreFileSystemFsxLustreSecurityGroup95767E0C:988-1023", - "FromPort": 988, - "GroupId": { - "Fn::GetAtt": [ - "FsxLustreFileSystemFsxLustreSecurityGroup1C661EA7", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "FsxLustreFileSystemFsxLustreSecurityGroup1C661EA7", - "GroupId" - ] - }, - "ToPort": 1023 - } - }, - "FsxLustreFileSystemFsxLustreSecurityGroupfromAwsCdkFsxLustreinstInstanceSecurityGroup9566CC4898810234C78D25F": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from AwsCdkFsxLustreinstInstanceSecurityGroup9566CC48:988-1023", - "FromPort": 988, - "GroupId": { - "Fn::GetAtt": [ - "FsxLustreFileSystemFsxLustreSecurityGroup1C661EA7", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "instInstanceSecurityGroup54790689", - "GroupId" - ] - }, - "ToPort": 1023 - } - }, - "FsxLustreFileSystem1F786378": { - "Type": "AWS::FSx::FileSystem", - "Properties": { - "FileSystemType": "LUSTRE", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - ], - "LustreConfiguration": { - "DeploymentType": "SCRATCH_2" - }, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "FsxLustreFileSystemFsxLustreSecurityGroup1C661EA7", - "GroupId" - ] - } - ], - "StorageCapacity": 1200 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "instInstanceSecurityGroup54790689": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "AwsCdkFsxLustre/inst/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/inst" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "instInstanceRoleFE783FB1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/inst" - } - ] - } - }, - "instInstanceProfile59FAEED2": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "instInstanceRoleFE783FB1" - } - ] - } - }, - "instF992429F": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "instInstanceProfile59FAEED2" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.large", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "instInstanceSecurityGroup54790689", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "AwsCdkFsxLustre/inst" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "instInstanceRoleFE783FB1" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/test/integ.globalaccelerator.expected.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/test/integ.globalaccelerator.expected.json deleted file mode 100644 index 3888b9ba5d05d..0000000000000 --- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/test/integ.globalaccelerator.expected.json +++ /dev/null @@ -1,992 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "Accelerator8EB0B6B1": { - "Type": "AWS::GlobalAccelerator::Accelerator", - "Properties": { - "Name": "integglobalacceleratorAccelerator5D88FB42", - "Enabled": true - } - }, - "Listener828B0E81": { - "Type": "AWS::GlobalAccelerator::Listener", - "Properties": { - "AcceleratorArn": { - "Fn::GetAtt": [ - "Accelerator8EB0B6B1", - "AcceleratorArn" - ] - }, - "PortRanges": [ - { - "FromPort": 80, - "ToPort": 80 - } - ], - "Protocol": "TCP", - "ClientAffinity": "NONE" - } - }, - "ALBAEE750D2": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ALBSecurityGroup8B8624F8", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet3DefaultRouteA0D29D46" - ] - }, - "ALBSecurityGroup8B8624F8": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB integglobalacceleratorALBEE1DE7F7", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ALBSecurityGroupfromGlobalAcceleratorGroup4435D2AC398": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from GlobalAcceleratorGroup:443", - "FromPort": 443, - "GroupId": { - "Fn::GetAtt": [ - "ALBSecurityGroup8B8624F8", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "GroupPeerCustomResourceB3A15D36", - "SecurityGroups.0.GroupId" - ] - }, - "ToPort": 443 - } - }, - "NLB55158F82": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - ], - "Type": "network" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA", - "VPCPublicSubnet3DefaultRouteA0D29D46" - ] - }, - "ElasticIpAddress": { - "Type": "AWS::EC2::EIP" - }, - "Instance0InstanceSecurityGroup7897592D": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-globalaccelerator/Instance0/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance0" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "Instance0InstanceRole6927D768": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance0" - } - ] - } - }, - "Instance0InstanceProfile3A61DE71": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Instance0InstanceRole6927D768" - } - ] - } - }, - "Instance008A4B15C": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "Instance0InstanceProfile3A61DE71" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.small", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "Instance0InstanceSecurityGroup7897592D", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance0" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "Instance0InstanceRole6927D768" - ] - }, - "Instance1InstanceSecurityGroup50841F79": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "integ-globalaccelerator/Instance1/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "Instance1InstanceRoleBC4D05C6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance1" - } - ] - } - }, - "Instance1InstanceProfileC04770B7": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Instance1InstanceRoleBC4D05C6" - } - ] - } - }, - "Instance14BC3991D": { - "Type": "AWS::EC2::Instance", - "Properties": { - "AvailabilityZone": "test-region-1a", - "IamInstanceProfile": { - "Ref": "Instance1InstanceProfileC04770B7" - }, - "ImageId": { - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t3.small", - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "Instance1InstanceSecurityGroup50841F79", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-globalaccelerator/Instance1" - } - ], - "UserData": { - "Fn::Base64": "#!/bin/bash" - } - }, - "DependsOn": [ - "Instance1InstanceRoleBC4D05C6" - ] - }, - "GroupC77FDACD": { - "Type": "AWS::GlobalAccelerator::EndpointGroup", - "Properties": { - "EndpointGroupRegion": { - "Ref": "AWS::Region" - }, - "ListenerArn": { - "Fn::GetAtt": [ - "Listener828B0E81", - "ListenerArn" - ] - }, - "EndpointConfigurations": [ - { - "EndpointId": { - "Ref": "ALBAEE750D2" - } - }, - { - "EndpointId": { - "Ref": "NLB55158F82" - } - }, - { - "EndpointId": { - "Fn::GetAtt": [ - "ElasticIpAddress", - "AllocationId" - ] - } - }, - { - "EndpointId": { - "Ref": "Instance008A4B15C" - } - }, - { - "EndpointId": { - "Ref": "Instance14BC3991D" - } - } - ] - } - }, - "GroupPeerCustomResourceCustomResourcePolicy42EF8263": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:DescribeSecurityGroups", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "GroupPeerCustomResourceCustomResourcePolicy42EF8263", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "GroupC77FDACD" - ] - }, - "GroupPeerCustomResourceB3A15D36": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"describeSecurityGroups\",\"parameters\":{\"Filters\":[{\"Name\":\"group-name\",\"Values\":[\"GlobalAccelerator\"]},{\"Name\":\"vpc-id\",\"Values\":[\"", - { - "Ref": "VPCB9E5F0B4" - }, - "\"]}]},\"physicalResourceId\":{\"responsePath\":\"SecurityGroups.0.GroupId\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "GroupPeerCustomResourceCustomResourcePolicy42EF8263", - "GroupC77FDACD" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json b/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json deleted file mode 100644 index b4fa2b7b01f30..0000000000000 --- a/packages/@aws-cdk/aws-glue/test/integ.connection.expected.json +++ /dev/null @@ -1,559 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-glue-connection/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "SecurityGroupDD263621": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-glue-connection/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "NetworkConnection2B07B7E5": { - "Type": "AWS::Glue::Connection", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "ConnectionInput": { - "ConnectionType": "NETWORK", - "PhysicalConnectionRequirements": { - "AvailabilityZone": "test-region-1a", - "SecurityGroupIdList": [ - { - "Fn::GetAtt": [ - "SecurityGroupDD263621", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.expected.json b/packages/@aws-cdk/aws-glue/test/integ.job.expected.json deleted file mode 100644 index 435ffc2516e80..0000000000000 --- a/packages/@aws-cdk/aws-glue/test/integ.job.expected.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "Resources": { - "EtlJobServiceRole837F781B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "glue.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSGlueServiceRole" - ] - ] - } - ] - } - }, - "EtlJobServiceRoleDefaultPolicy8BFE343B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "EtlJobSparkUIBucketBF23744B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "EtlJobSparkUIBucketBF23744B", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EtlJobServiceRoleDefaultPolicy8BFE343B", - "Roles": [ - { - "Ref": "EtlJobServiceRole837F781B" - } - ] - } - }, - "EtlJobSparkUIBucketBF23744B": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "EtlJob7FC88E45": { - "Type": "AWS::Glue::Job", - "Properties": { - "Command": { - "Name": "glueetl", - "PythonVersion": "3", - "ScriptLocation": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "EtlJobServiceRole837F781B", - "Arn" - ] - }, - "DefaultArguments": { - "--job-language": "python", - "--enable-continuous-cloudwatch-log": "true", - "--enable-continuous-log-filter": "true", - "--continuous-log-logStreamPrefix": "EtlJob", - "--enable-spark-ui": "true", - "--spark-event-logs-path": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "EtlJobSparkUIBucketBF23744B" - } - ] - ] - }, - "arg1": "value1", - "arg2": "value2" - }, - "ExecutionProperty": { - "MaxConcurrentRuns": 2 - }, - "GlueVersion": "2.0", - "MaxRetries": 2, - "Name": "EtlJob", - "NotificationProperty": { - "NotifyDelayAfter": 1 - }, - "NumberOfWorkers": 10, - "Tags": { - "key": "value" - }, - "Timeout": 5, - "WorkerType": "G.2X" - } - }, - "EtlJobSuccessMetricRuleA72A3EF6": { - "Type": "AWS::Events::Rule", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Rule triggered when Glue job ", - { - "Ref": "EtlJob7FC88E45" - }, - " is in SUCCEEDED state" - ] - ] - }, - "EventPattern": { - "source": [ - "aws.glue" - ], - "detail-type": [ - "Glue Job State Change", - "Glue Job Run Status" - ], - "detail": { - "jobName": [ - { - "Ref": "EtlJob7FC88E45" - } - ], - "state": [ - "SUCCEEDED" - ] - } - }, - "State": "ENABLED" - } - }, - "StreamingJobServiceRole1B4B8BF9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "glue.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSGlueServiceRole" - ] - ] - } - ] - } - }, - "StreamingJobServiceRoleDefaultPolicyA0CC4C68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StreamingJobServiceRoleDefaultPolicyA0CC4C68", - "Roles": [ - { - "Ref": "StreamingJobServiceRole1B4B8BF9" - } - ] - } - }, - "StreamingJob3783CC17": { - "Type": "AWS::Glue::Job", - "Properties": { - "Command": { - "Name": "gluestreaming", - "PythonVersion": "3", - "ScriptLocation": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "StreamingJobServiceRole1B4B8BF9", - "Arn" - ] - }, - "DefaultArguments": { - "--job-language": "python", - "arg1": "value1", - "arg2": "value2" - }, - "GlueVersion": "2.0", - "Name": "StreamingJob", - "Tags": { - "key": "value" - } - } - }, - "ShellJobServiceRoleCF97BC4B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "glue.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSGlueServiceRole" - ] - ] - } - ] - } - }, - "ShellJobServiceRoleDefaultPolicy7F22D315": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ShellJobServiceRoleDefaultPolicy7F22D315", - "Roles": [ - { - "Ref": "ShellJobServiceRoleCF97BC4B" - } - ] - } - }, - "ShellJob42E81F95": { - "Type": "AWS::Glue::Job", - "Properties": { - "Command": { - "Name": "pythonshell", - "PythonVersion": "3", - "ScriptLocation": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "ShellJobServiceRoleCF97BC4B", - "Arn" - ] - }, - "DefaultArguments": { - "--job-language": "python", - "arg1": "value1", - "arg2": "value2" - }, - "GlueVersion": "1.0", - "Name": "ShellJob", - "Tags": { - "key": "value" - } - } - } - }, - "Parameters": { - "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3Bucket4E517469": { - "Type": "String", - "Description": "S3 bucket for asset \"432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855\"" - }, - "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855S3VersionKeyF7753763": { - "Type": "String", - "Description": "S3 key for asset version \"432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855\"" - }, - "AssetParameters432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855ArtifactHash0C610005": { - "Type": "String", - "Description": "Artifact hash for asset \"432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.partition-index.expected.json b/packages/@aws-cdk/aws-glue/test/integ.partition-index.expected.json deleted file mode 100644 index 6e8f232e62f03..0000000000000 --- a/packages/@aws-cdk/aws-glue/test/integ.partition-index.expected.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "Resources": { - "DataBucketE3889A50": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyDatabase1E2517DB": { - "Type": "AWS::Glue::Database", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseInput": { - "Name": "database" - } - } - }, - "CSVTableE499CABA": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "csv_table generated by CDK", - "Name": "csv_table", - "Parameters": { - "classification": "csv", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - }, - { - "Name": "month", - "Type": "bigint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "string" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.apache.hadoop.hive.serde2.OpenCSVSerde" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "CSVTablepartitionindexindex1CustomResourcePolicy4983F2A9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "glue:CreatePartitionIndex", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CSVTablepartitionindexindex1CustomResourcePolicy4983F2A9", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "CSVTablepartitionindexindex2CustomResourcePolicy4FF1AF9F", - "CSVTablepartitionindexindex29D554319" - ] - }, - "CSVTablepartitionindexindex16247ABF6": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"Glue\",\"action\":\"createPartitionIndex\",\"parameters\":{\"DatabaseName\":\"", - { - "Ref": "MyDatabase1E2517DB" - }, - "\",\"TableName\":\"", - { - "Ref": "CSVTableE499CABA" - }, - "\",\"PartitionIndex\":{\"IndexName\":\"index1\",\"Keys\":[\"month\"]}},\"physicalResourceId\":{\"id\":\"index1\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "CSVTablepartitionindexindex1CustomResourcePolicy4983F2A9", - "CSVTablepartitionindexindex2CustomResourcePolicy4FF1AF9F", - "CSVTablepartitionindexindex29D554319" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CSVTablepartitionindexindex2CustomResourcePolicy4FF1AF9F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "glue:CreatePartitionIndex", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CSVTablepartitionindexindex2CustomResourcePolicy4FF1AF9F", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "CSVTablepartitionindexindex29D554319": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"Glue\",\"action\":\"createPartitionIndex\",\"parameters\":{\"DatabaseName\":\"", - { - "Ref": "MyDatabase1E2517DB" - }, - "\",\"TableName\":\"", - { - "Ref": "CSVTableE499CABA" - }, - "\",\"PartitionIndex\":{\"IndexName\":\"index2\",\"Keys\":[\"month\",\"year\"]}},\"physicalResourceId\":{\"id\":\"index2\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "CSVTablepartitionindexindex2CustomResourcePolicy4FF1AF9F" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "glue:UpdateTable", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":catalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":database/", - { - "Ref": "MyDatabase1E2517DB" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "CSVTableE499CABA" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "JSONTable00348F1D" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "JSONTable00348F1D": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "json_table generated by CDK", - "Name": "json_table", - "Parameters": { - "classification": "json", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - }, - { - "Name": "month", - "Type": "bigint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "string" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "JSONTablepartitionindexyearmonthawscdkglueJSONTable937C116BCustomResourcePolicy92B3C1AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "glue:CreatePartitionIndex", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "JSONTablepartitionindexyearmonthawscdkglueJSONTable937C116BCustomResourcePolicy92B3C1AE", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "JSONTablepartitionindexyearmonthawscdkglueJSONTable937C116B74A5990F": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"Glue\",\"action\":\"createPartitionIndex\",\"parameters\":{\"DatabaseName\":\"", - { - "Ref": "MyDatabase1E2517DB" - }, - "\",\"TableName\":\"", - { - "Ref": "JSONTable00348F1D" - }, - "\",\"PartitionIndex\":{\"IndexName\":\"year-month-awscdkglueJSONTable937C116B\",\"Keys\":[\"year\",\"month\"]}},\"physicalResourceId\":{\"id\":\"year-month-awscdkglueJSONTable937C116B\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "JSONTablepartitionindexyearmonthawscdkglueJSONTable937C116BCustomResourcePolicy92B3C1AE" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - }, - "Outputs": { - "CatalogId": { - "Value": { - "Ref": "AWS::AccountId" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json b/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json deleted file mode 100644 index d1df994ce660c..0000000000000 --- a/packages/@aws-cdk/aws-glue/test/integ.security-configuration.expected.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "Resources": { - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "KeyedSC862A23F3": { - "Type": "AWS::Glue::SecurityConfiguration", - "Properties": { - "EncryptionConfiguration": { - "CloudWatchEncryption": { - "CloudWatchEncryptionMode": "SSE-KMS", - "KmsKeyArn": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - }, - "JobBookmarksEncryption": { - "JobBookmarksEncryptionMode": "CSE-KMS", - "KmsKeyArn": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - }, - "S3Encryptions": [ - { - "KmsKeyArn": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - }, - "S3EncryptionMode": "SSE-KMS" - } - ] - }, - "Name": "KeyedSC" - } - }, - "KeylessSCKey4D3DE803": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "KeylessSC42E312EC": { - "Type": "AWS::Glue::SecurityConfiguration", - "Properties": { - "EncryptionConfiguration": { - "CloudWatchEncryption": { - "CloudWatchEncryptionMode": "SSE-KMS", - "KmsKeyArn": { - "Fn::GetAtt": [ - "KeylessSCKey4D3DE803", - "Arn" - ] - } - }, - "JobBookmarksEncryption": { - "JobBookmarksEncryptionMode": "CSE-KMS", - "KmsKeyArn": { - "Fn::GetAtt": [ - "KeylessSCKey4D3DE803", - "Arn" - ] - } - }, - "S3Encryptions": [ - { - "KmsKeyArn": { - "Fn::GetAtt": [ - "KeylessSCKey4D3DE803", - "Arn" - ] - }, - "S3EncryptionMode": "SSE-KMS" - } - ] - }, - "Name": "KeylessSC" - } - }, - "S3SCE31C83BE": { - "Type": "AWS::Glue::SecurityConfiguration", - "Properties": { - "EncryptionConfiguration": { - "S3Encryptions": [ - { - "S3EncryptionMode": "SSE-S3" - } - ] - }, - "Name": "S3SC" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/integ.table.expected.json b/packages/@aws-cdk/aws-glue/test/integ.table.expected.json deleted file mode 100644 index 8d4308ae40dab..0000000000000 --- a/packages/@aws-cdk/aws-glue/test/integ.table.expected.json +++ /dev/null @@ -1,748 +0,0 @@ -{ - "Resources": { - "DataBucketE3889A50": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyDatabase1E2517DB": { - "Type": "AWS::Glue::Database", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseInput": { - "Name": "my_database" - } - } - }, - "AVROTable58646ABF": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "avro_table generated by CDK", - "Name": "avro_table", - "Parameters": { - "classification": "avro", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Comment": "col2 comment", - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "array" - }, - { - "Name": "col4", - "Type": "map" - }, - { - "Name": "col5", - "Type": "struct" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.apache.hadoop.hive.serde2.avro.AvroSerDe" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "CSVTableE499CABA": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "csv_table generated by CDK", - "Name": "csv_table", - "Parameters": { - "classification": "csv", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Comment": "col2 comment", - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "array" - }, - { - "Name": "col4", - "Type": "map" - }, - { - "Name": "col5", - "Type": "struct" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.apache.hadoop.hive.serde2.OpenCSVSerde" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "JSONTable00348F1D": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "json_table generated by CDK", - "Name": "json_table", - "Parameters": { - "classification": "json", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Comment": "col2 comment", - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "array" - }, - { - "Name": "col4", - "Type": "map" - }, - { - "Name": "col5", - "Type": "struct" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "ParquetTableE84E985F": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "parquet_table generated by CDK", - "Name": "parquet_table", - "Parameters": { - "classification": "parquet", - "has_encrypted_data": false - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Comment": "col2 comment", - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "array" - }, - { - "Name": "col4", - "Type": "map" - }, - { - "Name": "col5", - "Type": "struct" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "DataBucketE3889A50" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyEncryptedTableBucket7B28486D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyEncryptedTable981A88C6": { - "Type": "AWS::Glue::Table", - "Properties": { - "CatalogId": { - "Ref": "AWS::AccountId" - }, - "DatabaseName": { - "Ref": "MyDatabase1E2517DB" - }, - "TableInput": { - "Description": "my_encrypted_table generated by CDK", - "Name": "my_encrypted_table", - "Parameters": { - "classification": "json", - "has_encrypted_data": true - }, - "PartitionKeys": [ - { - "Name": "year", - "Type": "smallint" - } - ], - "StorageDescriptor": { - "Columns": [ - { - "Name": "col1", - "Type": "string" - }, - { - "Comment": "col2 comment", - "Name": "col2", - "Type": "string" - }, - { - "Name": "col3", - "Type": "array" - }, - { - "Name": "col4", - "Type": "map" - }, - { - "Name": "col5", - "Type": "struct" - } - ], - "Compressed": false, - "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", - "Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyEncryptedTableBucket7B28486D" - }, - "/" - ] - ] - }, - "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", - "SerdeInfo": { - "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" - }, - "StoredAsSubDirectories": false - }, - "TableType": "EXTERNAL_TABLE" - } - } - }, - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchGetPartition", - "glue:CreatePartition", - "glue:DeletePartition", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTableVersion", - "glue:GetTableVersions", - "glue:GetTables", - "glue:UpdatePartition" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "CSVTableE499CABA" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "MyEncryptedTable981A88C6" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DataBucketE3889A50", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "MyEncryptedTableBucket7B28486D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "DataBucketE3889A50", - "Arn" - ] - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyEncryptedTableBucket7B28486D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - }, - "AnotherUser254B09E3": { - "Type": "AWS::IAM::User" - }, - "AnotherUserDefaultPolicyDBDB9923": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchGetPartition", - "glue:CreatePartition", - "glue:DeletePartition", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTableVersion", - "glue:GetTableVersions", - "glue:GetTables", - "glue:UpdatePartition" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "AVROTable58646ABF" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "JSONTable00348F1D" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "MyDatabase1E2517DB" - }, - "/", - { - "Ref": "ParquetTableE84E985F" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DataBucketE3889A50", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "DataBucketE3889A50", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AnotherUserDefaultPolicyDBDB9923", - "Users": [ - { - "Ref": "AnotherUser254B09E3" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.expected.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.expected.json deleted file mode 100644 index d0d33a2ebefb3..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.expected.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Resources": { - "TestUser6A619381": { - "Type": "AWS::IAM::User" - }, - "TestAccessKey4BFC5CF5": { - "Type": "AWS::IAM::AccessKey", - "Properties": { - "UserName": { - "Ref": "TestUser6A619381" - } - } - } - }, - "Outputs": { - "AccessKeyId": { - "Value": { - "Ref": "TestAccessKey4BFC5CF5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.expected.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.expected.json deleted file mode 100644 index a715e411d83ae..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.expected.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "Resources": { - "RoleWithCompositePrincipal17538C7F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - }, - "AWS": "*" - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.expected.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.expected.json deleted file mode 100644 index f1f877242877c..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.expected.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "Parameters": { - "PrincipalTag": { - "Type": "String", - "Default": "developer" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959": { - "Type": "String", - "Description": "S3 bucket for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E": { - "Type": "String", - "Description": "S3 key for asset version \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - } - }, - "Resources": { - "PrincipalTagCondition94CCB594": { - "Type": "Custom::AWSCDKCfnJson", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", - "Arn" - ] - }, - "Value": { - "Fn::Join": [ - "", - [ - "{\"aws:PrincipalTag/", - { - "Ref": "PrincipalTag" - }, - "\":\"true\"}" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { - "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" - } - ] - } - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" - ] - }, - "MyRoleF48FFE04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "Fn::GetAtt": [ - "PrincipalTagCondition94CCB594", - "Value" - ] - } - }, - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.expected.json b/packages/@aws-cdk/aws-iam/test/integ.group.expected.json deleted file mode 100644 index 772debd602c16..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.group.expected.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Resources": { - "MyGroupCBA54B1B": { - "Type": "AWS::IAM::Group" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.expected.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.expected.json deleted file mode 100644 index 82bf9aa145c2a..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.expected.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User", - "Properties": { - "ManagedPolicyArns": [ - { - "Ref": "TwoManagedPolicy7E701864" - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/SecurityAudit" - ] - ] - } - ] - } - }, - "OneManagedPolicy77F9185F": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "Description": "My Policy", - "ManagedPolicyName": "Default", - "Path": "/some/path/", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - }, - "TwoManagedPolicy7E701864": { - "Type": "AWS::IAM::ManagedPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "Description": "", - "Path": "/" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.expected.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.expected.json deleted file mode 100644 index 923dd4187af0f..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.expected.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "Resources": { - "NoClientsNoThumbprint8BF1533F": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test2" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "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", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } - ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" - ] - }, - "Clients67031123": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "foo", - "bar" - ], - "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test3" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Thumbprints9CD6AB02": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ThumbprintList": [ - "aa00aa1122aa00aa1122aa00aa1122aa00aa1122", - "aa00aa1122aa00aa1122aa00aa1122aa00aa1111" - ], - "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test4" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.expected.json b/packages/@aws-cdk/aws-iam/test/integ.policy.expected.json deleted file mode 100644 index 44880c4131467..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.expected.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "HelloPolicyD59007DF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Default", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - }, - "GoodbyePolicy739B8974": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "GoodbyePolicy739B8974", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.expected.json b/packages/@aws-cdk/aws-iam/test/integ.role.expected.json deleted file mode 100644 index 0e2dbd39d9e93..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.role.expected.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "Resources": { - "TestRole6C9272DF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "sqs.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestRoleDefaultPolicyD1C92014": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestRoleDefaultPolicyD1C92014", - "Roles": [ - { - "Ref": "TestRole6C9272DF" - } - ] - } - }, - "HelloPolicyD59007DF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Default", - "Roles": [ - { - "Ref": "TestRole6C9272DF" - } - ] - } - }, - "TestRole25D98AB21": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "sts:ExternalId": "supply-me" - } - }, - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestRole3C1F30727": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Condition": { - "StringEquals": { - "aws:PrincipalOrgID": "o-1234" - } - }, - "Effect": "Allow", - "Principal": { - "AWS": "*" - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.expected.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.expected.json deleted file mode 100644 index 6a5263ebc9675..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.expected.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "Resources": { - "Provider2281708E": { - "Type": "AWS::IAM::SAMLProvider", - "Properties": { - "SamlMetadataDocument": "\n\n \n \n \n \n \n \n \n \n \n \n xF+xF7hmYedlu04o41mAyvIFBnXuvGE368C9oNLICCA=\n \n \n cGs8ZgnhtOluTKeRZHWjLrtvP9mUxHvSpKWSM5L4MFwojXZ39HIxCAAB22VseLVn8nMH0JxEAze/SzxraCewvJmYrUYKVgECl8kaQ1AKfbWHmrqyCRm9+WX6Fsj9SEGRNOPRfVpceVZYFrw3rimgjYZq/hyjvuEsp/6Eu+2RrO/mCNT7J0y5luOXLeHwJfeNalcl1mHA0JMCusnwfQOvRjkgOKL8pvDyXti+cvicDKqExeDGTaUoUyyynNWXLBLHHUhq29ej80D6lPVZWFqAgsZPm/O3spLhWl974PzDnX0qMds3aieZbHmuots+Cdy0LXQVHLjhRbDU8F6+BU+lRQ==\n \n \n MIIDBTCCAe2gAwIBAgIQN33ROaIJ6bJBWDCxtmJEbjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIwMTIyMTIwNTAxN1oXDTI1MTIyMDIwNTAxN1owLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKGiy0/YZHEo9rRn2bI27u189Sq7NKhInFz5hLCSjgUB2rmf5ETNR3RJIDiW1M51LKROsTrjkl45cxK6gcVwLuEgr3L1TgmBtr/Rt/riKyxeXbLQ9LGBwaNVaJrSscxfdFbJa5J+qzUIFBiFoL7kE8ZtbkZJWBTxHEyEcNC52JJ8ydOhgvZYykete8AAVa2TZAbg4ECo9+6nMsaGsSBncRHJlRWVycq8Q4HV4faMEZmZ+iyCZRo2fZufXpn7sJwZ7CEBuw4qycHvUl6y153sUUFqsswnZGGjqpKSq7I7sVI9vjB199RarHaSSbDgL2FxjmASiUY4RqxnTjVa2XVHUwUCAwEAAaMhMB8wHQYDVR0OBBYEFI5mN5ftHloEDVNoIa8sQs7kJAeTMA0GCSqGSIb3DQEBCwUAA4IBAQBnaGnojxNgnV4+TCPZ9br4ox1nRn9tzY8b5pwKTW2McJTe0yEvrHyaItK8KbmeKJOBvASf+QwHkp+F2BAXzRiTl4Z+gNFQULPzsQWpmKlz6fIWhc7ksgpTkMK6AaTbwWYTfmpKnQw/KJm/6rboLDWYyKFpQcStu67RZ+aRvQz68Ev2ga5JsXlcOJ3gP/lE5WC1S0rjfabzdMOGP8qZQhXk4wBOgtFBaisDnbjV5pcIrjRPlhoCxvKgC/290nZ9/DLBH3TbHk8xwHXeBAnAjyAqOZij92uksAv7ZLq4MODcnQshVINXwsYshG1pQqOLwMertNaY5WtrubMRku44Dw7R\n \n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQN33ROaIJ6bJBWDCxtmJEbjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIwMTIyMTIwNTAxN1oXDTI1MTIyMDIwNTAxN1owLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKGiy0/YZHEo9rRn2bI27u189Sq7NKhInFz5hLCSjgUB2rmf5ETNR3RJIDiW1M51LKROsTrjkl45cxK6gcVwLuEgr3L1TgmBtr/Rt/riKyxeXbLQ9LGBwaNVaJrSscxfdFbJa5J+qzUIFBiFoL7kE8ZtbkZJWBTxHEyEcNC52JJ8ydOhgvZYykete8AAVa2TZAbg4ECo9+6nMsaGsSBncRHJlRWVycq8Q4HV4faMEZmZ+iyCZRo2fZufXpn7sJwZ7CEBuw4qycHvUl6y153sUUFqsswnZGGjqpKSq7I7sVI9vjB199RarHaSSbDgL2FxjmASiUY4RqxnTjVa2XVHUwUCAwEAAaMhMB8wHQYDVR0OBBYEFI5mN5ftHloEDVNoIa8sQs7kJAeTMA0GCSqGSIb3DQEBCwUAA4IBAQBnaGnojxNgnV4+TCPZ9br4ox1nRn9tzY8b5pwKTW2McJTe0yEvrHyaItK8KbmeKJOBvASf+QwHkp+F2BAXzRiTl4Z+gNFQULPzsQWpmKlz6fIWhc7ksgpTkMK6AaTbwWYTfmpKnQw/KJm/6rboLDWYyKFpQcStu67RZ+aRvQz68Ev2ga5JsXlcOJ3gP/lE5WC1S0rjfabzdMOGP8qZQhXk4wBOgtFBaisDnbjV5pcIrjRPlhoCxvKgC/290nZ9/DLBH3TbHk8xwHXeBAnAjyAqOZij92uksAv7ZLq4MODcnQshVINXwsYshG1pQqOLwMertNaY5WtrubMRku44Dw7R\n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQWPB1ofOpA7FFlOBk5iPaNTANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIxMDIwNzE3MDAzOVoXDTI2MDIwNjE3MDAzOVowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALH7FzF1rjvnZ4i2iBC2tz8qs/WP61n3/wFawgJxUnTx2vP/z5pG7f8qvumd7taOII0aSlp648SIfMw59WdUUtup5CnDYOcX1sUdivAj20m2PIDK6f+KWZ+7YKxJqCzJMH4GGlQvuDIhRKNT9oHfZgnYCCAmjXmJBtWyD052qqrkzOSn0/e9TKbjlTnTNcrIno3XDQ7xG+79vOD2GZMNopsKogWNxUdLFRu44ClKLRb4Xe00eVrANtBkv+mSJFFJS1Gxv611hpdGI2S0v1H+KvB26O7vuzGhZ/AevRemGhXQ5V5vwNEqXnVRVkBRszLKeN/+rxM436xQyVQGJMG+sVECAwEAAaMhMB8wHQYDVR0OBBYEFLlRBSxxgmNPObCFrl+hSsbcvRkcMA0GCSqGSIb3DQEBCwUAA4IBAQB+UQFTNs6BUY3AIGkS2ZRuZgJsNEr/ZEM4aCs2domd2Oqj7+5iWsnPh5CugFnI4nd+ZLgKVHSD6acQ27we+eNY6gxfpQCY1fiN/uKOOsA0If8IbPdBEhtPerRgPJFXLHaYVqD8UYDo5KNCcoB4Kh8nvCWRGPUUHPRqp7AnAcVrcbiXA/bmMCnFWuNNahcaAKiJTxYlKDaDIiPN35yECYbDj0PBWJUxobrvj5I275jbikkp8QSLYnSU/v7dMDUbxSLfZ7zsTuaF2Qx+L62PsYTwLzIFX3M8EMSQ6h68TupFTi5n0M2yIXQgoRoNEDWNJZ/aZMY/gqT02GQGBWrh+/vJ\n \n \n \n \n \n Name\n The mutable display name of the user.\n \n \n Subject\n An immutable, globally unique, non-reusable identifier of the user that is unique to the application for which a token is issued.\n \n \n Given Name\n First name of the user.\n \n \n Surname\n Last name of the user.\n \n \n Display Name\n Display name of the user.\n \n \n Nick Name\n Nick name of the user.\n \n \n Authentication Instant\n The time (UTC) when the user is authenticated to Windows Azure Active Directory.\n \n \n Authentication Method\n The method that Windows Azure Active Directory uses to authenticate users.\n \n \n ObjectIdentifier\n Primary identifier for the user in the directory. Immutable, globally unique, non-reusable.\n \n \n TenantId\n Identifier for the user's tenant.\n \n \n IdentityProvider\n Identity provider for the user.\n \n \n Email\n Email address of the user.\n \n \n Groups\n Groups of the user.\n \n \n External Access Token\n Access token issued by external identity provider.\n \n \n External Access Token Expiration\n UTC expiration time of access token issued by external identity provider.\n \n \n External OpenID 2.0 Identifier\n OpenID 2.0 identifier issued by external identity provider.\n \n \n GroupsOverageClaim\n Issued when number of user's group claims exceeds return limit.\n \n \n Role Claim\n Roles that the user or Service Principal is attached to\n \n \n RoleTemplate Id Claim\n Role template id of the Built-in Directory Roles that the user is a member of\n \n \n \n \n https://login.microsoftonline.com/9ecb31cb-702e-4ce0-ae22-bcee28d49d49/wsfed\n \n \n \n \n https://login.microsoftonline.com/9ecb31cb-702e-4ce0-ae22-bcee28d49d49/wsfed\n \n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQN33ROaIJ6bJBWDCxtmJEbjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIwMTIyMTIwNTAxN1oXDTI1MTIyMDIwNTAxN1owLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKGiy0/YZHEo9rRn2bI27u189Sq7NKhInFz5hLCSjgUB2rmf5ETNR3RJIDiW1M51LKROsTrjkl45cxK6gcVwLuEgr3L1TgmBtr/Rt/riKyxeXbLQ9LGBwaNVaJrSscxfdFbJa5J+qzUIFBiFoL7kE8ZtbkZJWBTxHEyEcNC52JJ8ydOhgvZYykete8AAVa2TZAbg4ECo9+6nMsaGsSBncRHJlRWVycq8Q4HV4faMEZmZ+iyCZRo2fZufXpn7sJwZ7CEBuw4qycHvUl6y153sUUFqsswnZGGjqpKSq7I7sVI9vjB199RarHaSSbDgL2FxjmASiUY4RqxnTjVa2XVHUwUCAwEAAaMhMB8wHQYDVR0OBBYEFI5mN5ftHloEDVNoIa8sQs7kJAeTMA0GCSqGSIb3DQEBCwUAA4IBAQBnaGnojxNgnV4+TCPZ9br4ox1nRn9tzY8b5pwKTW2McJTe0yEvrHyaItK8KbmeKJOBvASf+QwHkp+F2BAXzRiTl4Z+gNFQULPzsQWpmKlz6fIWhc7ksgpTkMK6AaTbwWYTfmpKnQw/KJm/6rboLDWYyKFpQcStu67RZ+aRvQz68Ev2ga5JsXlcOJ3gP/lE5WC1S0rjfabzdMOGP8qZQhXk4wBOgtFBaisDnbjV5pcIrjRPlhoCxvKgC/290nZ9/DLBH3TbHk8xwHXeBAnAjyAqOZij92uksAv7ZLq4MODcnQshVINXwsYshG1pQqOLwMertNaY5WtrubMRku44Dw7R\n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQWPB1ofOpA7FFlOBk5iPaNTANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIxMDIwNzE3MDAzOVoXDTI2MDIwNjE3MDAzOVowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALH7FzF1rjvnZ4i2iBC2tz8qs/WP61n3/wFawgJxUnTx2vP/z5pG7f8qvumd7taOII0aSlp648SIfMw59WdUUtup5CnDYOcX1sUdivAj20m2PIDK6f+KWZ+7YKxJqCzJMH4GGlQvuDIhRKNT9oHfZgnYCCAmjXmJBtWyD052qqrkzOSn0/e9TKbjlTnTNcrIno3XDQ7xG+79vOD2GZMNopsKogWNxUdLFRu44ClKLRb4Xe00eVrANtBkv+mSJFFJS1Gxv611hpdGI2S0v1H+KvB26O7vuzGhZ/AevRemGhXQ5V5vwNEqXnVRVkBRszLKeN/+rxM436xQyVQGJMG+sVECAwEAAaMhMB8wHQYDVR0OBBYEFLlRBSxxgmNPObCFrl+hSsbcvRkcMA0GCSqGSIb3DQEBCwUAA4IBAQB+UQFTNs6BUY3AIGkS2ZRuZgJsNEr/ZEM4aCs2domd2Oqj7+5iWsnPh5CugFnI4nd+ZLgKVHSD6acQ27we+eNY6gxfpQCY1fiN/uKOOsA0If8IbPdBEhtPerRgPJFXLHaYVqD8UYDo5KNCcoB4Kh8nvCWRGPUUHPRqp7AnAcVrcbiXA/bmMCnFWuNNahcaAKiJTxYlKDaDIiPN35yECYbDj0PBWJUxobrvj5I275jbikkp8QSLYnSU/v7dMDUbxSLfZ7zsTuaF2Qx+L62PsYTwLzIFX3M8EMSQ6h68TupFTi5n0M2yIXQgoRoNEDWNJZ/aZMY/gqT02GQGBWrh+/vJ\n \n \n \n \n \n https://sts.windows.net/9ecb31cb-702e-4ce0-ae22-bcee28d49d49/\n \n \n \n \n https://login.microsoftonline.com/9ecb31cb-702e-4ce0-ae22-bcee28d49d49/wsfed\n \n \n \n \n https://login.microsoftonline.com/9ecb31cb-702e-4ce0-ae22-bcee28d49d49/wsfed\n \n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQN33ROaIJ6bJBWDCxtmJEbjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIwMTIyMTIwNTAxN1oXDTI1MTIyMDIwNTAxN1owLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKGiy0/YZHEo9rRn2bI27u189Sq7NKhInFz5hLCSjgUB2rmf5ETNR3RJIDiW1M51LKROsTrjkl45cxK6gcVwLuEgr3L1TgmBtr/Rt/riKyxeXbLQ9LGBwaNVaJrSscxfdFbJa5J+qzUIFBiFoL7kE8ZtbkZJWBTxHEyEcNC52JJ8ydOhgvZYykete8AAVa2TZAbg4ECo9+6nMsaGsSBncRHJlRWVycq8Q4HV4faMEZmZ+iyCZRo2fZufXpn7sJwZ7CEBuw4qycHvUl6y153sUUFqsswnZGGjqpKSq7I7sVI9vjB199RarHaSSbDgL2FxjmASiUY4RqxnTjVa2XVHUwUCAwEAAaMhMB8wHQYDVR0OBBYEFI5mN5ftHloEDVNoIa8sQs7kJAeTMA0GCSqGSIb3DQEBCwUAA4IBAQBnaGnojxNgnV4+TCPZ9br4ox1nRn9tzY8b5pwKTW2McJTe0yEvrHyaItK8KbmeKJOBvASf+QwHkp+F2BAXzRiTl4Z+gNFQULPzsQWpmKlz6fIWhc7ksgpTkMK6AaTbwWYTfmpKnQw/KJm/6rboLDWYyKFpQcStu67RZ+aRvQz68Ev2ga5JsXlcOJ3gP/lE5WC1S0rjfabzdMOGP8qZQhXk4wBOgtFBaisDnbjV5pcIrjRPlhoCxvKgC/290nZ9/DLBH3TbHk8xwHXeBAnAjyAqOZij92uksAv7ZLq4MODcnQshVINXwsYshG1pQqOLwMertNaY5WtrubMRku44Dw7R\n \n \n \n \n \n \n MIIDBTCCAe2gAwIBAgIQWPB1ofOpA7FFlOBk5iPaNTANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIxMDIwNzE3MDAzOVoXDTI2MDIwNjE3MDAzOVowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALH7FzF1rjvnZ4i2iBC2tz8qs/WP61n3/wFawgJxUnTx2vP/z5pG7f8qvumd7taOII0aSlp648SIfMw59WdUUtup5CnDYOcX1sUdivAj20m2PIDK6f+KWZ+7YKxJqCzJMH4GGlQvuDIhRKNT9oHfZgnYCCAmjXmJBtWyD052qqrkzOSn0/e9TKbjlTnTNcrIno3XDQ7xG+79vOD2GZMNopsKogWNxUdLFRu44ClKLRb4Xe00eVrANtBkv+mSJFFJS1Gxv611hpdGI2S0v1H+KvB26O7vuzGhZ/AevRemGhXQ5V5vwNEqXnVRVkBRszLKeN/+rxM436xQyVQGJMG+sVECAwEAAaMhMB8wHQYDVR0OBBYEFLlRBSxxgmNPObCFrl+hSsbcvRkcMA0GCSqGSIb3DQEBCwUAA4IBAQB+UQFTNs6BUY3AIGkS2ZRuZgJsNEr/ZEM4aCs2domd2Oqj7+5iWsnPh5CugFnI4nd+ZLgKVHSD6acQ27we+eNY6gxfpQCY1fiN/uKOOsA0If8IbPdBEhtPerRgPJFXLHaYVqD8UYDo5KNCcoB4Kh8nvCWRGPUUHPRqp7AnAcVrcbiXA/bmMCnFWuNNahcaAKiJTxYlKDaDIiPN35yECYbDj0PBWJUxobrvj5I275jbikkp8QSLYnSU/v7dMDUbxSLfZ7zsTuaF2Qx+L62PsYTwLzIFX3M8EMSQ6h68TupFTi5n0M2yIXQgoRoNEDWNJZ/aZMY/gqT02GQGBWrh+/vJ\n \n \n \n \n \n \n \n\n" - } - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithSAML", - "Condition": { - "StringEquals": { - "SAML:aud": "https://signin.aws.amazon.com/saml" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": { - "Ref": "Provider2281708E" - } - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.expected.json b/packages/@aws-cdk/aws-iam/test/integ.user.expected.json deleted file mode 100644 index 648d9de3e9107..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.user.expected.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User", - "Properties": { - "LoginProfile": { - "Password": "Test1234567890!", - "PasswordResetRequired": true - }, - "UserName": "benisrae" - } - } - }, - "Outputs": { - "NameForUserImportedByArn": { - "Value": "rossrhodes" - }, - "NameForUserImportedByArnPath": { - "Value": "johndoe" - }, - "NameForUserImportedByArnPathMultiple": { - "Value": "johndoe" - }, - "NameForUserImportedByAttributes": { - "Value": "johndoe" - }, - "NameForUserImportedByAttributesPath": { - "Value": "johndoe" - }, - "NameForUserImportedByAttributesPathMultiple": { - "Value": "johndoe" - }, - "NameForUserImportedByName": { - "Value": "janedoe" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.expected.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.expected.json deleted file mode 100644 index b690806aea03f..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.expected.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "Resources": { - "MyGroupCBA54B1B": { - "Type": "AWS::IAM::Group" - }, - "YourGroup1005140B": { - "Type": "AWS::IAM::Group" - }, - "User1E278A736": { - "Type": "AWS::IAM::User", - "Properties": { - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - }, - { - "Ref": "YourGroup1005140B" - } - ] - } - }, - "User21F1486D1": { - "Type": "AWS::IAM::User", - "Properties": { - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - }, - { - "Ref": "YourGroup1005140B" - } - ] - } - }, - "User3493EC043": { - "Type": "AWS::IAM::User", - "Properties": { - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - }, - { - "Ref": "YourGroup1005140B" - } - ] - } - }, - "User4BBBA4836": { - "Type": "AWS::IAM::User", - "Properties": { - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - }, - { - "Ref": "YourGroup1005140B" - } - ] - } - }, - "User5F9E592FE": { - "Type": "AWS::IAM::User", - "Properties": { - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - }, - { - "Ref": "YourGroup1005140B" - } - ] - } - }, - "MyPolicy39D66CF6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:*", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "YourGroup1005140B", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyPolicy39D66CF6", - "Groups": [ - { - "Ref": "MyGroupCBA54B1B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-logs-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-logs-action.expected.json deleted file mode 100644 index de237bc1ae22f..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-logs-action.expected.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "CloudwatchLogs": { - "LogGroupName": { - "Ref": "MyLogGroup5C0DAD85" - }, - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyLogGroup5C0DAD85", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyLogGroup5C0DAD85": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-put-metric-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-put-metric-action.expected.json deleted file mode 100644 index c3ab0305174d4..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-put-metric-action.expected.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "CloudwatchMetric": { - "MetricName": "${topic(2)}", - "MetricNamespace": "${namespace}", - "MetricTimestamp": "${timestamp}", - "MetricUnit": "${unit}", - "MetricValue": "${value}", - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id, namespace, unit, value, timestamp FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "cloudwatch:PutMetricData", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-set-alarm-state-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-set-alarm-state-action.expected.json deleted file mode 100644 index 750cac6d39bbf..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/integ.cloudwatch-set-alarm-state-action.expected.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Resources": { - "MyAlarm696658B6": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 3, - "DatapointsToAlarm": 2, - "Dimensions": [ - { - "Name": "MyDimension", - "Value": "MyDimensionValue" - } - ], - "MetricName": "MyMetric", - "Namespace": "MyNamespace", - "Period": 300, - "Statistic": "Average", - "Threshold": 100 - } - }, - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "CloudwatchAlarm": { - "AlarmName": { - "Ref": "MyAlarm696658B6" - }, - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - }, - "StateReason": { - "Fn::Join": [ - "", - [ - "Set state of '", - { - "Ref": "MyAlarm696658B6" - }, - "' to 'ALARM'" - ] - ] - }, - "StateValue": "ALARM" - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "cloudwatch:SetAlarmState", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyAlarm696658B6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iot-republish-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iot-republish-action.expected.json deleted file mode 100644 index c396017676ac4..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iot-republish-action.expected.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Republish": { - "Qos": 1, - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - }, - "Topic": "${topic()}/republish" - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT * FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iot:Publish", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/integ.firehose-put-record-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/integ.firehose-put-record-action.expected.json deleted file mode 100644 index 8de54892ebabd..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/integ.firehose-put-record-action.expected.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Firehose": { - "BatchMode": true, - "DeliveryStreamName": { - "Ref": "MyStream5C050E93" - }, - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - }, - "Separator": "\n" - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT * FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "firehose:PutRecord", - "firehose:PutRecordBatch" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyStream5C050E93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyStreamServiceRole8C50608A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyStreamS3DestinationRole5E0BA960": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyStreamS3DestinationRoleDefaultPolicy401EF6F2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyStreamLogGroupAB67AB09", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyStreamS3DestinationRoleDefaultPolicy401EF6F2", - "Roles": [ - { - "Ref": "MyStreamS3DestinationRole5E0BA960" - } - ] - } - }, - "MyStreamLogGroupAB67AB09": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyStreamLogGroupS3Destination423E82A8": { - "Type": "AWS::Logs::LogStream", - "Properties": { - "LogGroupName": { - "Ref": "MyStreamLogGroupAB67AB09" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyStream5C050E93": { - "Type": "AWS::KinesisFirehose::DeliveryStream", - "Properties": { - "DeliveryStreamType": "DirectPut", - "ExtendedS3DestinationConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "CloudWatchLoggingOptions": { - "Enabled": true, - "LogGroupName": { - "Ref": "MyStreamLogGroupAB67AB09" - }, - "LogStreamName": { - "Ref": "MyStreamLogGroupS3Destination423E82A8" - } - }, - "RoleARN": { - "Fn::GetAtt": [ - "MyStreamS3DestinationRole5E0BA960", - "Arn" - ] - } - } - }, - "DependsOn": [ - "MyStreamS3DestinationRoleDefaultPolicy401EF6F2" - ] - } - }, - "Mappings": { - "awscdkawskinesisfirehoseCidrBlocks": { - "af-south-1": { - "FirehoseCidrBlock": "13.244.121.224/27" - }, - "ap-east-1": { - "FirehoseCidrBlock": "18.162.221.32/27" - }, - "ap-northeast-1": { - "FirehoseCidrBlock": "13.113.196.224/27" - }, - "ap-northeast-2": { - "FirehoseCidrBlock": "13.209.1.64/27" - }, - "ap-northeast-3": { - "FirehoseCidrBlock": "13.208.177.192/27" - }, - "ap-south-1": { - "FirehoseCidrBlock": "13.232.67.32/27" - }, - "ap-southeast-1": { - "FirehoseCidrBlock": "13.228.64.192/27" - }, - "ap-southeast-2": { - "FirehoseCidrBlock": "13.210.67.224/27" - }, - "ca-central-1": { - "FirehoseCidrBlock": "35.183.92.128/27" - }, - "cn-north-1": { - "FirehoseCidrBlock": "52.81.151.32/27" - }, - "cn-northwest-1": { - "FirehoseCidrBlock": "161.189.23.64/27" - }, - "eu-central-1": { - "FirehoseCidrBlock": "35.158.127.160/27" - }, - "eu-north-1": { - "FirehoseCidrBlock": "13.53.63.224/27" - }, - "eu-south-1": { - "FirehoseCidrBlock": "15.161.135.128/27" - }, - "eu-west-1": { - "FirehoseCidrBlock": "52.19.239.192/27" - }, - "eu-west-2": { - "FirehoseCidrBlock": "18.130.1.96/27" - }, - "eu-west-3": { - "FirehoseCidrBlock": "35.180.1.96/27" - }, - "me-south-1": { - "FirehoseCidrBlock": "15.185.91.0/27" - }, - "sa-east-1": { - "FirehoseCidrBlock": "18.228.1.128/27" - }, - "us-east-1": { - "FirehoseCidrBlock": "52.70.63.192/27" - }, - "us-east-2": { - "FirehoseCidrBlock": "13.58.135.96/27" - }, - "us-gov-east-1": { - "FirehoseCidrBlock": "18.253.138.96/27" - }, - "us-gov-west-1": { - "FirehoseCidrBlock": "52.61.204.160/27" - }, - "us-west-1": { - "FirehoseCidrBlock": "13.57.135.192/27" - }, - "us-west-2": { - "FirehoseCidrBlock": "52.89.255.224/27" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/integ.kinesis-put-record-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/integ.kinesis-put-record-action.expected.json deleted file mode 100644 index 89229bf4731e3..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/integ.kinesis-put-record-action.expected.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Kinesis": { - "PartitionKey": "${timestamp()}", - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - }, - "StreamName": { - "Ref": "MyStream5C050E93" - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT * FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "kinesis:PutRecord", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyStream5C050E93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyStream5C050E93": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "RetentionPeriodHours": 24, - "ShardCount": 3, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - }, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - } - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/integ.lambda-function-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/lambda/integ.lambda-function-action.expected.json deleted file mode 100644 index 4c619dff4cf84..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/integ.lambda-function-action.expected.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "Resources": { - "MyFunctionServiceRole3C357FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction3BAA72D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\n exports.handler = (event) => {\n console.log(\"It is test for lambda action of AWS IoT Rule.\", event);\n };\"" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunctionServiceRole3C357FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunctionServiceRole3C357FF2" - ] - }, - "MyFunctionteststackTopicRule1CB8242FIotLambdaFunctionAction37A1A89F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - }, - "Principal": "iot.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "TopicRule40A4EA44", - "Arn" - ] - } - } - }, - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Lambda": { - "FunctionArn": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id, timestamp() as timestamp, temperature FROM 'device/+/data'" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/integ.s3-put-object-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/s3/integ.s3-put-object-action.expected.json deleted file mode 100644 index 4e530f04da2c1..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/integ.s3-put-object-action.expected.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "S3": { - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "CannedAcl": "bucket-owner-full-control", - "Key": "${year}/${month}/${day}/${topic(2)}", - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/integ.sns-topic-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/sns/integ.sns-topic-action.expected.json deleted file mode 100644 index 0bf9706012c93..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/integ.sns-topic-action.expected.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Sns": { - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - }, - "TargetArn": { - "Ref": "MyTopic86869434" - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "MyTopic86869434" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/integ.sqs-queue-action.expected.json b/packages/@aws-cdk/aws-iot-actions/test/sqs/integ.sqs-queue-action.expected.json deleted file mode 100644 index 9d5870a2a18b5..0000000000000 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/integ.sqs-queue-action.expected.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Sqs": { - "QueueUrl": { - "Ref": "MyQueueE6CA6235" - }, - "RoleArn": { - "Fn::GetAtt": [ - "TopicRuleTopicRuleActionRole246C4F77", - "Arn" - ] - } - } - } - ], - "AwsIotSqlVersion": "2016-03-23", - "Sql": "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'" - } - } - }, - "TopicRuleTopicRuleActionRole246C4F77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iot.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TopicRuleTopicRuleActionRoleDefaultPolicy99ADD687", - "Roles": [ - { - "Ref": "TopicRuleTopicRuleActionRole246C4F77" - } - ] - } - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot/test/integ.topic-rule.expected.json b/packages/@aws-cdk/aws-iot/test/integ.topic-rule.expected.json deleted file mode 100644 index 9daad98410825..0000000000000 --- a/packages/@aws-cdk/aws-iot/test/integ.topic-rule.expected.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Resources": { - "TopicRule40A4EA44": { - "Type": "AWS::IoT::TopicRule", - "Properties": { - "TopicRulePayload": { - "Actions": [ - { - "Http": { - "Url": "https://example.com" - } - } - ], - "AwsIotSqlVersion": "2015-10-08", - "Sql": "SELECT topic(2) as device_id FROM 'device/+/data'" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents-actions/test/iot/integ.set-variable-action.expected.json b/packages/@aws-cdk/aws-iotevents-actions/test/iot/integ.set-variable-action.expected.json deleted file mode 100644 index 0119afc958c1f..0000000000000 --- a/packages/@aws-cdk/aws-iotevents-actions/test/iot/integ.set-variable-action.expected.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "Resources": { - "MyInput08947B23": { - "Type": "AWS::IoTEvents::Input", - "Properties": { - "InputDefinition": { - "Attributes": [ - { - "JsonPath": "payload.deviceId" - }, - { - "JsonPath": "payload.temperature" - } - ] - }, - "InputName": "test_input" - } - }, - "MyDetectorModelDetectorModelRoleF2FB4D88": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iotevents.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyDetectorModel559C0B0E": { - "Type": "AWS::IoTEvents::DetectorModel", - "Properties": { - "DetectorModelDefinition": { - "InitialStateName": "MyState", - "States": [ - { - "OnEnter": { - "Events": [ - { - "Actions": [ - { - "SetVariable": { - "Value": { - "Fn::Join": [ - "", - [ - "$input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature" - ] - ] - }, - "VariableName": "MyVariable" - } - } - ], - "Condition": { - "Fn::Join": [ - "", - [ - "currentInput(\"", - { - "Ref": "MyInput08947B23" - }, - "\")" - ] - ] - }, - "EventName": "enter-event" - } - ] - }, - "StateName": "MyState" - } - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyDetectorModelDetectorModelRoleF2FB4D88", - "Arn" - ] - }, - "Key": "payload.deviceId" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents-actions/test/lambda/integ.lambda-invoke-action.expected.json b/packages/@aws-cdk/aws-iotevents-actions/test/lambda/integ.lambda-invoke-action.expected.json deleted file mode 100644 index ab203f3fae7ca..0000000000000 --- a/packages/@aws-cdk/aws-iotevents-actions/test/lambda/integ.lambda-invoke-action.expected.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "Resources": { - "MyInput08947B23": { - "Type": "AWS::IoTEvents::Input", - "Properties": { - "InputDefinition": { - "Attributes": [ - { - "JsonPath": "payload.deviceId" - } - ] - }, - "InputName": "test_input" - } - }, - "MyFunctionServiceRole3C357FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction3BAA72D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\n exports.handler = (event) => {\n console.log(\"It is test for lambda action of AWS IoT Rule.\", event);\n };" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunctionServiceRole3C357FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunctionServiceRole3C357FF2" - ] - }, - "MyDetectorModelDetectorModelRoleF2FB4D88": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iotevents.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyDetectorModelDetectorModelRoleDefaultPolicy82887422": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyDetectorModelDetectorModelRoleDefaultPolicy82887422", - "Roles": [ - { - "Ref": "MyDetectorModelDetectorModelRoleF2FB4D88" - } - ] - } - }, - "MyDetectorModel559C0B0E": { - "Type": "AWS::IoTEvents::DetectorModel", - "Properties": { - "DetectorModelDefinition": { - "InitialStateName": "MyState", - "States": [ - { - "OnEnter": { - "Events": [ - { - "Actions": [ - { - "Lambda": { - "FunctionArn": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - } - } - } - ], - "Condition": { - "Fn::Join": [ - "", - [ - "currentInput(\"", - { - "Ref": "MyInput08947B23" - }, - "\")" - ] - ] - }, - "EventName": "test-event" - } - ] - }, - "StateName": "MyState" - } - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyDetectorModelDetectorModelRoleF2FB4D88", - "Arn" - ] - }, - "Key": "payload.deviceId" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json b/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json deleted file mode 100644 index 3b24a7f7776d8..0000000000000 --- a/packages/@aws-cdk/aws-iotevents/test/integ.detector-model.expected.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "Resources": { - "MyInput08947B23": { - "Type": "AWS::IoTEvents::Input", - "Properties": { - "InputDefinition": { - "Attributes": [ - { - "JsonPath": "payload.deviceId" - }, - { - "JsonPath": "payload.temperature" - } - ] - }, - "InputName": "test_input" - } - }, - "MyDetectorModelDetectorModelRoleF2FB4D88": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "iotevents.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "MyDetectorModel559C0B0E": { - "Type": "AWS::IoTEvents::DetectorModel", - "Properties": { - "DetectorModelDefinition": { - "InitialStateName": "online", - "States": [ - { - "OnEnter": { - "Events": [ - { - "Condition": { - "Fn::Join": [ - "", - [ - "currentInput(\"", - { - "Ref": "MyInput08947B23" - }, - "\") && $input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature == 31.5" - ] - ] - }, - "EventName": "test-event" - } - ] - }, - "OnExit": { - "Events": [ - { - "Condition": { - "Fn::Join": [ - "", - [ - "$input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature == 31.7" - ] - ] - }, - "EventName": "test-exit-event" - } - ] - }, - "OnInput": { - "Events": [ - { - "Condition": { - "Fn::Join": [ - "", - [ - "$input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature == 31.6" - ] - ] - }, - "EventName": "test-input-event" - } - ], - "TransitionEvents": [ - { - "Condition": { - "Fn::Join": [ - "", - [ - "$input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature == 12" - ] - ] - }, - "EventName": "online_to_offline", - "NextState": "offline" - } - ] - }, - "StateName": "online" - }, - { - "OnInput": { - "TransitionEvents": [ - { - "Condition": { - "Fn::Join": [ - "", - [ - "$input.", - { - "Ref": "MyInput08947B23" - }, - ".payload.temperature == 21" - ] - ] - }, - "EventName": "offline_to_online", - "NextState": "online" - } - ] - }, - "StateName": "offline" - } - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "MyDetectorModelDetectorModelRoleF2FB4D88", - "Arn" - ] - }, - "DetectorModelDescription": "test-detector-model-description", - "DetectorModelName": "test-detector-model", - "EvaluationMethod": "SERIAL", - "Key": "payload.deviceId" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.expected.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.expected.json deleted file mode 100644 index f681d0e581c83..0000000000000 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.expected.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "Resources": { - "PlaybackKeyPairBE17315B": { - "Type": "AWS::IVS::PlaybackKeyPair", - "Properties": { - "PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----", - "Name": "IVSIntegrationTestPlaybackKeyPair" - } - }, - "Channel4048F119": { - "Type": "AWS::IVS::Channel", - "Properties": { - "Authorized": true, - "LatencyMode": "NORMAL", - "Name": "IVSIntegrationTestChannel", - "Type": "BASIC" - } - }, - "StreamKey9F296F4F": { - "Type": "AWS::IVS::StreamKey", - "Properties": { - "ChannelArn": { - "Fn::GetAtt": [ - "Channel4048F119", - "Arn" - ] - } - } - } - }, - "Outputs": { - "PlaybackKeyPairArn": { - "Value": { - "Fn::GetAtt": [ - "PlaybackKeyPairBE17315B", - "Arn" - ] - } - }, - "ChannelArn": { - "Value": { - "Fn::GetAtt": [ - "Channel4048F119", - "Arn" - ] - } - }, - "StreamKeyArn": { - "Value": { - "Fn::GetAtt": [ - "StreamKey9F296F4F", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesis/test/integ.stream-dashboard.expected.json b/packages/@aws-cdk/aws-kinesis/test/integ.stream-dashboard.expected.json deleted file mode 100644 index 19b702e60830d..0000000000000 --- a/packages/@aws-cdk/aws-kinesis/test/integ.stream-dashboard.expected.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "Resources": { - "myStream547FAD7F": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "ShardCount": 1, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - }, - "RetentionPeriodHours": 24, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - } - } - }, - "StreamDashboardAAF4FCF8": { - "Type": "AWS::CloudWatch::Dashboard", - "Properties": { - "DashboardBody": { - "Fn::Join": [ - "", - [ - "{\"widgets\":[{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Get records - sum (Bytes)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"GetRecords.Bytes\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Get records iterator age - maximum (Milliseconds)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"GetRecords.IteratorAgeMilliseconds\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Maximum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":5,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Get records latency - average (Milliseconds)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"GetRecords.Latency\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":5,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Get records - sum (Count)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"GetRecords.Records\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":10,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Get records success - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"GetRecords.Success\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":10,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Incoming data - sum (Bytes)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"IncomingBytes\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":15,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Incoming records - sum (Count)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"IncomingRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":15,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put record - sum (Bytes)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"PutRecord.Bytes\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":20,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put record latency - average (Milliseconds)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"PutRecord.Latency\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":20,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put record success - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"PutRecord.Success\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":25,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put records - sum (Bytes)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"PutRecords.Bytes\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":25,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put records latency - average (Milliseconds)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"PutRecords.Latency\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":30,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Read throughput exceeded - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"ReadProvisionedThroughputExceeded\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":30,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Write throughput exceeded - average (Count)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[\"AWS/Kinesis\",\"WriteProvisionedThroughputExceeded\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\"]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":35,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put records successful records - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[{\"label\":\"( count / total ) * 100\",\"expression\":\"( count / total ) * 100\"}],[\"AWS/Kinesis\",\"PutRecords.SuccessfulRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"count\"}],[\"AWS/Kinesis\",\"PutRecords.TotalRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"total\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":12,\"y\":35,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put records failed records - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[{\"label\":\"( count / total ) * 100\",\"expression\":\"( count / total ) * 100\"}],[\"AWS/Kinesis\",\"PutRecords.FailedRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"count\"}],[\"AWS/Kinesis\",\"PutRecords.TotalRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"total\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":12,\"height\":5,\"x\":0,\"y\":40,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Put records throttled records - average (Percent)\",\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"metrics\":[[{\"label\":\"( count / total ) * 100\",\"expression\":\"( count / total ) * 100\"}],[\"AWS/Kinesis\",\"PutRecords.ThrottledRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"count\"}],[\"AWS/Kinesis\",\"PutRecords.TotalRecords\",\"StreamName\",\"", - { - "Ref": "myStream547FAD7F" - }, - "\",{\"visible\":false,\"id\":\"total\"}]],\"yAxis\":{}}}]}" - ] - ] - } - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} diff --git a/packages/@aws-cdk/aws-kinesis/test/integ.stream.expected.json b/packages/@aws-cdk/aws-kinesis/test/integ.stream.expected.json deleted file mode 100644 index 3b1f6afca1bc6..0000000000000 --- a/packages/@aws-cdk/aws-kinesis/test/integ.stream.expected.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "Resources": { - "UserRoleB7C3739B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "UserRoleDefaultPolicyBC5E062B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kinesis:DescribeStream", - "kinesis:DescribeStreamSummary", - "kinesis:GetRecords", - "kinesis:GetShardIterator", - "kinesis:ListShards", - "kinesis:ListStreams", - "kinesis:PutRecord", - "kinesis:PutRecords", - "kinesis:SubscribeToShard" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "myStream547FAD7F", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserRoleDefaultPolicyBC5E062B", - "Roles": [ - { - "Ref": "UserRoleB7C3739B" - } - ] - } - }, - "myStream547FAD7F": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "RetentionPeriodHours": 24, - "ShardCount": 1, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - }, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - } - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application-code-from-bucket.lit.expected.json b/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application-code-from-bucket.lit.expected.json deleted file mode 100644 index 47c34a07a09bd..0000000000000 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application-code-from-bucket.lit.expected.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "Parameters": { - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67": { - "Type": "String", - "Description": "S3 bucket for asset \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - }, - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E": { - "Type": "String", - "Description": "S3 key for asset version \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - }, - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577ArtifactHash211A4F2F": { - "Type": "String", - "Description": "Artifact hash for asset \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - } - }, - "Resources": { - "AppRole1AF9B530": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "kinesisanalytics.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppRoleDefaultPolicy9CADBAA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "cloudwatch:PutMetricData", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - } - ] - ] - } - ] - }, - { - "Action": "logs:DescribeLogGroups", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:*" - ] - ] - } - }, - { - "Action": "logs:DescribeLogStreams", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "AppLogGroupC72EEC8C", - "Arn" - ] - } - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "AppLogGroupC72EEC8C" - }, - ":log-stream:", - { - "Ref": "AppLogStream3CAF66A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AppRoleDefaultPolicy9CADBAA1", - "Roles": [ - { - "Ref": "AppRole1AF9B530" - } - ] - } - }, - "AppF1B96344": { - "Type": "AWS::KinesisAnalyticsV2::Application", - "Properties": { - "RuntimeEnvironment": "FLINK-1_11", - "ServiceExecutionRole": { - "Fn::GetAtt": [ - "AppRole1AF9B530", - "Arn" - ] - }, - "ApplicationConfiguration": { - "ApplicationCodeConfiguration": { - "CodeContent": { - "S3ContentLocation": { - "BucketARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - } - ] - ] - }, - "FileKey": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E" - } - ] - } - ] - } - ] - ] - } - } - }, - "CodeContentType": "ZIPFILE" - }, - "ApplicationSnapshotConfiguration": { - "SnapshotsEnabled": true - } - } - }, - "DependsOn": [ - "AppRoleDefaultPolicy9CADBAA1", - "AppRole1AF9B530" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AppLogGroupC72EEC8C": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AppLogStream3CAF66A7": { - "Type": "AWS::Logs::LogStream", - "Properties": { - "LogGroupName": { - "Ref": "AppLogGroupC72EEC8C" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AppLoggingOption75BE995E": { - "Type": "AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption", - "Properties": { - "ApplicationName": { - "Ref": "AppF1B96344" - }, - "CloudWatchLoggingOption": { - "LogStreamARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "AppLogGroupC72EEC8C" - }, - ":log-stream:", - { - "Ref": "AppLogStream3CAF66A7" - } - ] - ] - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.expected.json b/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.expected.json deleted file mode 100644 index 60f2f92a97420..0000000000000 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.expected.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "Resources": { - "AppRole1AF9B530": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "kinesisanalytics.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "AppRoleDefaultPolicy9CADBAA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "cloudwatch:PutMetricData", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - } - ] - ] - } - ] - }, - { - "Action": "logs:DescribeLogGroups", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:*" - ] - ] - } - }, - { - "Action": "logs:DescribeLogStreams", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "AppLogGroupC72EEC8C", - "Arn" - ] - } - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "AppLogGroupC72EEC8C" - }, - ":log-stream:", - { - "Ref": "AppLogStream3CAF66A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AppRoleDefaultPolicy9CADBAA1", - "Roles": [ - { - "Ref": "AppRole1AF9B530" - } - ] - } - }, - "AppF1B96344": { - "Type": "AWS::KinesisAnalyticsV2::Application", - "Properties": { - "RuntimeEnvironment": "FLINK-1_11", - "ServiceExecutionRole": { - "Fn::GetAtt": [ - "AppRole1AF9B530", - "Arn" - ] - }, - "ApplicationConfiguration": { - "ApplicationCodeConfiguration": { - "CodeContent": { - "S3ContentLocation": { - "BucketARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67" - } - ] - ] - }, - "FileKey": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E" - } - ] - } - ] - } - ] - ] - } - } - }, - "CodeContentType": "ZIPFILE" - }, - "ApplicationSnapshotConfiguration": { - "SnapshotsEnabled": true - } - } - }, - "DependsOn": [ - "AppRoleDefaultPolicy9CADBAA1", - "AppRole1AF9B530" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AppLogGroupC72EEC8C": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AppLogStream3CAF66A7": { - "Type": "AWS::Logs::LogStream", - "Properties": { - "LogGroupName": { - "Ref": "AppLogGroupC72EEC8C" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AppLoggingOption75BE995E": { - "Type": "AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption", - "Properties": { - "ApplicationName": { - "Ref": "AppF1B96344" - }, - "CloudWatchLoggingOption": { - "LogStreamARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:", - { - "Ref": "AppLogGroupC72EEC8C" - }, - ":log-stream:", - { - "Ref": "AppLogStream3CAF66A7" - } - ] - ] - } - } - } - }, - "Alarm7103F465": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "Dimensions": [ - { - "Name": "Application", - "Value": { - "Ref": "AppF1B96344" - } - } - ], - "MetricName": "fullRestarts", - "Namespace": "AWS/KinesisAnalytics", - "Period": 300, - "Statistic": "Sum", - "Threshold": 3 - } - } - }, - "Parameters": { - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3BucketEBA17A67": { - "Type": "String", - "Description": "S3 bucket for asset \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - }, - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577S3VersionKey5922697E": { - "Type": "String", - "Description": "S3 key for asset version \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - }, - "AssetParameters8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577ArtifactHash211A4F2F": { - "Type": "String", - "Description": "Artifact hash for asset \"8be9e0b5f53d41e9a3b1d51c9572c65f24f8170a7188d0ed57fb7d571de4d577\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/integ.s3-bucket.lit.expected.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/integ.s3-bucket.lit.expected.json deleted file mode 100644 index 27e27e08d68d7..0000000000000 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/integ.s3-bucket.lit.expected.json +++ /dev/null @@ -1,869 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "BackupBucket26B8E51C": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BackupBucketPolicy8C403F71": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "BackupBucket26B8E51C" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "BackupBucket26B8E51C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "BackupBucket26B8E51C", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BackupBucketAutoDeleteObjectsCustomResourceD2F511C5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "BackupBucket26B8E51C" - } - }, - "DependsOn": [ - "BackupBucketPolicy8C403F71" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "LogGroupS3Destination70CE1003": { - "Type": "AWS::Logs::LogStream", - "Properties": { - "LogGroupName": { - "Ref": "LogGroupF5B46931" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DataProcessorFunctionServiceRole12E05500": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "DataProcessorFunctionAD472B9A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dS3BucketA7AEF7D7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dS3VersionKeyA7FD6E61" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dS3VersionKeyA7FD6E61" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "DataProcessorFunctionServiceRole12E05500", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x", - "Timeout": 60 - }, - "DependsOn": [ - "DataProcessorFunctionServiceRole12E05500" - ] - }, - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BackupKey60B97760": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeliveryStreamServiceRole964EEBCC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DeliveryStreamS3DestinationRole500FC089": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DeliveryStreamS3DestinationRoleDefaultPolicy3015D8C7": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "BackupBucket26B8E51C", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "BackupBucket26B8E51C", - "Arn" - ] - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DeliveryStreamLogGroup9D8FA3BB", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "LogGroupF5B46931", - "Arn" - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "BackupKey60B97760", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DataProcessorFunctionAD472B9A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "DataProcessorFunctionAD472B9A", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DeliveryStreamS3DestinationRoleDefaultPolicy3015D8C7", - "Roles": [ - { - "Ref": "DeliveryStreamS3DestinationRole500FC089" - } - ] - } - }, - "DeliveryStreamLogGroup9D8FA3BB": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DeliveryStreamLogGroupS3BackupD5DF41B2": { - "Type": "AWS::Logs::LogStream", - "Properties": { - "LogGroupName": { - "Ref": "DeliveryStreamLogGroup9D8FA3BB" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DeliveryStreamF6D5572D": { - "Type": "AWS::KinesisFirehose::DeliveryStream", - "Properties": { - "DeliveryStreamType": "DirectPut", - "ExtendedS3DestinationConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "BufferingHints": { - "IntervalInSeconds": 60, - "SizeInMBs": 1 - }, - "CloudWatchLoggingOptions": { - "Enabled": true, - "LogGroupName": { - "Ref": "LogGroupF5B46931" - }, - "LogStreamName": { - "Ref": "LogGroupS3Destination70CE1003" - } - }, - "CompressionFormat": "GZIP", - "EncryptionConfiguration": { - "KMSEncryptionConfig": { - "AWSKMSKeyARN": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - } - }, - "ErrorOutputPrefix": "errorPrefix", - "Prefix": "regularPrefix", - "ProcessingConfiguration": { - "Enabled": true, - "Processors": [ - { - "Parameters": [ - { - "ParameterName": "RoleArn", - "ParameterValue": { - "Fn::GetAtt": [ - "DeliveryStreamS3DestinationRole500FC089", - "Arn" - ] - } - }, - { - "ParameterName": "LambdaArn", - "ParameterValue": { - "Fn::GetAtt": [ - "DataProcessorFunctionAD472B9A", - "Arn" - ] - } - }, - { - "ParameterName": "BufferIntervalInSeconds", - "ParameterValue": "60" - }, - { - "ParameterName": "BufferSizeInMBs", - "ParameterValue": "1" - }, - { - "ParameterName": "NumberOfRetries", - "ParameterValue": "1" - } - ], - "Type": "Lambda" - } - ] - }, - "RoleARN": { - "Fn::GetAtt": [ - "DeliveryStreamS3DestinationRole500FC089", - "Arn" - ] - }, - "S3BackupConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "BackupBucket26B8E51C", - "Arn" - ] - }, - "BufferingHints": { - "IntervalInSeconds": 60, - "SizeInMBs": 1 - }, - "CloudWatchLoggingOptions": { - "Enabled": true, - "LogGroupName": { - "Ref": "DeliveryStreamLogGroup9D8FA3BB" - }, - "LogStreamName": { - "Ref": "DeliveryStreamLogGroupS3BackupD5DF41B2" - } - }, - "CompressionFormat": "ZIP", - "EncryptionConfiguration": { - "KMSEncryptionConfig": { - "AWSKMSKeyARN": { - "Fn::GetAtt": [ - "BackupKey60B97760", - "Arn" - ] - } - } - }, - "ErrorOutputPrefix": "backupErrorPrefix", - "Prefix": "backupPrefix", - "RoleARN": { - "Fn::GetAtt": [ - "DeliveryStreamS3DestinationRole500FC089", - "Arn" - ] - } - }, - "S3BackupMode": "Enabled" - } - }, - "DependsOn": [ - "DeliveryStreamS3DestinationRoleDefaultPolicy3015D8C7" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dS3BucketA7AEF7D7": { - "Type": "String", - "Description": "S3 bucket for asset \"9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7d\"" - }, - "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dS3VersionKeyA7FD6E61": { - "Type": "String", - "Description": "S3 key for asset version \"9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7d\"" - }, - "AssetParameters9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7dArtifactHashE49F8A6B": { - "Type": "String", - "Description": "Artifact hash for asset \"9d04b6e97fcffe55f90ce717ab61c19d06df5a0c5c364c765216bf31a9c98d7d\"" - } - }, - "Mappings": { - "awscdkawskinesisfirehoseCidrBlocks": { - "af-south-1": { - "FirehoseCidrBlock": "13.244.121.224/27" - }, - "ap-east-1": { - "FirehoseCidrBlock": "18.162.221.32/27" - }, - "ap-northeast-1": { - "FirehoseCidrBlock": "13.113.196.224/27" - }, - "ap-northeast-2": { - "FirehoseCidrBlock": "13.209.1.64/27" - }, - "ap-northeast-3": { - "FirehoseCidrBlock": "13.208.177.192/27" - }, - "ap-south-1": { - "FirehoseCidrBlock": "13.232.67.32/27" - }, - "ap-southeast-1": { - "FirehoseCidrBlock": "13.228.64.192/27" - }, - "ap-southeast-2": { - "FirehoseCidrBlock": "13.210.67.224/27" - }, - "ca-central-1": { - "FirehoseCidrBlock": "35.183.92.128/27" - }, - "cn-north-1": { - "FirehoseCidrBlock": "52.81.151.32/27" - }, - "cn-northwest-1": { - "FirehoseCidrBlock": "161.189.23.64/27" - }, - "eu-central-1": { - "FirehoseCidrBlock": "35.158.127.160/27" - }, - "eu-north-1": { - "FirehoseCidrBlock": "13.53.63.224/27" - }, - "eu-south-1": { - "FirehoseCidrBlock": "15.161.135.128/27" - }, - "eu-west-1": { - "FirehoseCidrBlock": "52.19.239.192/27" - }, - "eu-west-2": { - "FirehoseCidrBlock": "18.130.1.96/27" - }, - "eu-west-3": { - "FirehoseCidrBlock": "35.180.1.96/27" - }, - "me-south-1": { - "FirehoseCidrBlock": "15.185.91.0/27" - }, - "sa-east-1": { - "FirehoseCidrBlock": "18.228.1.128/27" - }, - "us-east-1": { - "FirehoseCidrBlock": "52.70.63.192/27" - }, - "us-east-2": { - "FirehoseCidrBlock": "13.58.135.96/27" - }, - "us-gov-east-1": { - "FirehoseCidrBlock": "18.253.138.96/27" - }, - "us-gov-west-1": { - "FirehoseCidrBlock": "52.61.204.160/27" - }, - "us-west-1": { - "FirehoseCidrBlock": "13.57.135.192/27" - }, - "us-west-2": { - "FirehoseCidrBlock": "52.89.255.224/27" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.expected.json b/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.expected.json deleted file mode 100644 index f82e1664494f4..0000000000000 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.expected.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RoleDefaultPolicy5FFB7DAB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RoleDefaultPolicy5FFB7DAB", - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - }, - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeliveryStreamServiceRole964EEBCC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DeliveryStreamServiceRoleDefaultPolicyB87D9ACF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DeliveryStreamServiceRoleDefaultPolicyB87D9ACF", - "Roles": [ - { - "Ref": "DeliveryStreamServiceRole964EEBCC" - } - ] - } - }, - "DeliveryStreamF6D5572D": { - "Type": "AWS::KinesisFirehose::DeliveryStream", - "Properties": { - "DeliveryStreamEncryptionConfigurationInput": { - "KeyARN": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - }, - "KeyType": "CUSTOMER_MANAGED_CMK" - }, - "DeliveryStreamType": "DirectPut", - "ExtendedS3DestinationConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "RoleARN": { - "Fn::GetAtt": [ - "Role1ABCC5F0", - "Arn" - ] - } - } - }, - "DependsOn": [ - "RoleDefaultPolicy5FFB7DAB" - ] - } - }, - "Mappings": { - "awscdkawskinesisfirehoseCidrBlocks": { - "af-south-1": { - "FirehoseCidrBlock": "13.244.121.224/27" - }, - "ap-east-1": { - "FirehoseCidrBlock": "18.162.221.32/27" - }, - "ap-northeast-1": { - "FirehoseCidrBlock": "13.113.196.224/27" - }, - "ap-northeast-2": { - "FirehoseCidrBlock": "13.209.1.64/27" - }, - "ap-northeast-3": { - "FirehoseCidrBlock": "13.208.177.192/27" - }, - "ap-south-1": { - "FirehoseCidrBlock": "13.232.67.32/27" - }, - "ap-southeast-1": { - "FirehoseCidrBlock": "13.228.64.192/27" - }, - "ap-southeast-2": { - "FirehoseCidrBlock": "13.210.67.224/27" - }, - "ca-central-1": { - "FirehoseCidrBlock": "35.183.92.128/27" - }, - "cn-north-1": { - "FirehoseCidrBlock": "52.81.151.32/27" - }, - "cn-northwest-1": { - "FirehoseCidrBlock": "161.189.23.64/27" - }, - "eu-central-1": { - "FirehoseCidrBlock": "35.158.127.160/27" - }, - "eu-north-1": { - "FirehoseCidrBlock": "13.53.63.224/27" - }, - "eu-south-1": { - "FirehoseCidrBlock": "15.161.135.128/27" - }, - "eu-west-1": { - "FirehoseCidrBlock": "52.19.239.192/27" - }, - "eu-west-2": { - "FirehoseCidrBlock": "18.130.1.96/27" - }, - "eu-west-3": { - "FirehoseCidrBlock": "35.180.1.96/27" - }, - "me-south-1": { - "FirehoseCidrBlock": "15.185.91.0/27" - }, - "sa-east-1": { - "FirehoseCidrBlock": "18.228.1.128/27" - }, - "us-east-1": { - "FirehoseCidrBlock": "52.70.63.192/27" - }, - "us-east-2": { - "FirehoseCidrBlock": "13.58.135.96/27" - }, - "us-gov-east-1": { - "FirehoseCidrBlock": "18.253.138.96/27" - }, - "us-gov-west-1": { - "FirehoseCidrBlock": "52.61.204.160/27" - }, - "us-west-1": { - "FirehoseCidrBlock": "13.57.135.192/27" - }, - "us-west-2": { - "FirehoseCidrBlock": "52.89.255.224/27" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.source-stream.expected.json b/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.source-stream.expected.json deleted file mode 100644 index 815c96c36137d..0000000000000 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/integ.delivery-stream.source-stream.expected.json +++ /dev/null @@ -1,291 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RoleDefaultPolicy5FFB7DAB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RoleDefaultPolicy5FFB7DAB", - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - }, - "SourceStream95FF52BE": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "RetentionPeriodHours": 24, - "ShardCount": 1, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - }, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - } - } - }, - "DeliveryStreamServiceRole964EEBCC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "firehose.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DeliveryStreamServiceRoleDefaultPolicyB87D9ACF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kinesis:DescribeStream", - "kinesis:DescribeStreamSummary", - "kinesis:GetRecords", - "kinesis:GetShardIterator", - "kinesis:ListShards", - "kinesis:ListStreams", - "kinesis:SubscribeToShard" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "SourceStream95FF52BE", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DeliveryStreamServiceRoleDefaultPolicyB87D9ACF", - "Roles": [ - { - "Ref": "DeliveryStreamServiceRole964EEBCC" - } - ] - } - }, - "DeliveryStreamF6D5572D": { - "Type": "AWS::KinesisFirehose::DeliveryStream", - "Properties": { - "DeliveryStreamType": "KinesisStreamAsSource", - "ExtendedS3DestinationConfiguration": { - "BucketARN": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "RoleARN": { - "Fn::GetAtt": [ - "Role1ABCC5F0", - "Arn" - ] - } - }, - "KinesisStreamSourceConfiguration": { - "KinesisStreamARN": { - "Fn::GetAtt": [ - "SourceStream95FF52BE", - "Arn" - ] - }, - "RoleARN": { - "Fn::GetAtt": [ - "DeliveryStreamServiceRole964EEBCC", - "Arn" - ] - } - } - }, - "DependsOn": [ - "DeliveryStreamServiceRoleDefaultPolicyB87D9ACF", - "RoleDefaultPolicy5FFB7DAB" - ] - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - }, - "Mappings": { - "awscdkawskinesisfirehoseCidrBlocks": { - "af-south-1": { - "FirehoseCidrBlock": "13.244.121.224/27" - }, - "ap-east-1": { - "FirehoseCidrBlock": "18.162.221.32/27" - }, - "ap-northeast-1": { - "FirehoseCidrBlock": "13.113.196.224/27" - }, - "ap-northeast-2": { - "FirehoseCidrBlock": "13.209.1.64/27" - }, - "ap-northeast-3": { - "FirehoseCidrBlock": "13.208.177.192/27" - }, - "ap-south-1": { - "FirehoseCidrBlock": "13.232.67.32/27" - }, - "ap-southeast-1": { - "FirehoseCidrBlock": "13.228.64.192/27" - }, - "ap-southeast-2": { - "FirehoseCidrBlock": "13.210.67.224/27" - }, - "ca-central-1": { - "FirehoseCidrBlock": "35.183.92.128/27" - }, - "cn-north-1": { - "FirehoseCidrBlock": "52.81.151.32/27" - }, - "cn-northwest-1": { - "FirehoseCidrBlock": "161.189.23.64/27" - }, - "eu-central-1": { - "FirehoseCidrBlock": "35.158.127.160/27" - }, - "eu-north-1": { - "FirehoseCidrBlock": "13.53.63.224/27" - }, - "eu-south-1": { - "FirehoseCidrBlock": "15.161.135.128/27" - }, - "eu-west-1": { - "FirehoseCidrBlock": "52.19.239.192/27" - }, - "eu-west-2": { - "FirehoseCidrBlock": "18.130.1.96/27" - }, - "eu-west-3": { - "FirehoseCidrBlock": "35.180.1.96/27" - }, - "me-south-1": { - "FirehoseCidrBlock": "15.185.91.0/27" - }, - "sa-east-1": { - "FirehoseCidrBlock": "18.228.1.128/27" - }, - "us-east-1": { - "FirehoseCidrBlock": "52.70.63.192/27" - }, - "us-east-2": { - "FirehoseCidrBlock": "13.58.135.96/27" - }, - "us-gov-east-1": { - "FirehoseCidrBlock": "18.253.138.96/27" - }, - "us-gov-west-1": { - "FirehoseCidrBlock": "52.61.204.160/27" - }, - "us-west-1": { - "FirehoseCidrBlock": "13.57.135.192/27" - }, - "us-west-2": { - "FirehoseCidrBlock": "52.89.255.224/27" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/test/integ.key-sharing.lit.expected.json b/packages/@aws-cdk/aws-kms/test/integ.key-sharing.lit.expected.json deleted file mode 100644 index 24704085b587e..0000000000000 --- a/packages/@aws-cdk/aws-kms/test/integ.key-sharing.lit.expected.json +++ /dev/null @@ -1,67 +0,0 @@ -[ - { - "Resources": { - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ExportsOutputFnGetAttMyKey6AB29FA6Arn4FA82736": { - "Value": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - }, - "Export": { - "Name": "KeyStack:ExportsOutputFnGetAttMyKey6AB29FA6Arn4FA82736" - } - } - } - }, - { - "Resources": { - "Alias325C5727": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/foo", - "TargetKeyId": { - "Fn::ImportValue": "KeyStack:ExportsOutputFnGetAttMyKey6AB29FA6Arn4FA82736" - } - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/test/integ.key.expected.json b/packages/@aws-cdk/aws-kms/test/integ.key.expected.json deleted file mode 100644 index 761498395aa0e..0000000000000 --- a/packages/@aws-cdk/aws-kms/test/integ.key.expected.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "Resources": { - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": "kms:encrypt", - "Effect": "Allow", - "Principal": { - "AWS": { - "Ref": "AWS::AccountId" - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyKeyAlias1B45D9DA": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/bar", - "TargetKeyId": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - } - } - }, - "AsymmetricKey26BBC514": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "KeySpec": "ECC_NIST_P256", - "KeyUsage": "SIGN_VERIFY" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.expected.json b/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.expected.json deleted file mode 100644 index f750a8343398a..0000000000000 --- a/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.expected.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "Resources": { - "TopicBFC7AF6E": { - "Type": "AWS::SNS::Topic" - }, - "Queue4A7E3555": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SnsSqsServiceRole869866F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SnsSqsServiceRoleDefaultPolicy82E7B09F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "TopicBFC7AF6E" - } - }, - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SnsSqsServiceRoleDefaultPolicy82E7B09F", - "Roles": [ - { - "Ref": "SnsSqsServiceRole869866F7" - } - ] - } - }, - "SnsSqsC4810B27": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n if (event === 'OK') return 'success';\n throw new Error('failure');\n };" - }, - "Role": { - "Fn::GetAtt": [ - "SnsSqsServiceRole869866F7", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "SnsSqsServiceRoleDefaultPolicy82E7B09F", - "SnsSqsServiceRole869866F7" - ] - }, - "SnsSqsEventInvokeConfigDC664368": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "SnsSqsC4810B27" - }, - "Qualifier": "$LATEST", - "DestinationConfig": { - "OnFailure": { - "Destination": { - "Ref": "TopicBFC7AF6E" - } - }, - "OnSuccess": { - "Destination": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - } - }, - "MaximumEventAgeInSeconds": 10800, - "MaximumRetryAttempts": 1 - } - }, - "SnsSqsVersionMySpecialVersion08136BD6": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "SnsSqsC4810B27" - } - } - }, - "OnSuccesServiceRole75E399CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "OnSucces8F9C946B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n console.log(event);\n };" - }, - "Role": { - "Fn::GetAtt": [ - "OnSuccesServiceRole75E399CF", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "OnSuccesServiceRole75E399CF" - ] - }, - "EventBusLambdaServiceRole9BC8901F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "EventBusLambdaServiceRoleDefaultPolicy5BB7FEB6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "events:PutEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "OnSucces8F9C946B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "OnSucces8F9C946B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventBusLambdaServiceRoleDefaultPolicy5BB7FEB6", - "Roles": [ - { - "Ref": "EventBusLambdaServiceRole9BC8901F" - } - ] - } - }, - "EventBusLambda4AA26499": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n if (event === 'OK') return 'success';\n throw new Error('failure');\n };" - }, - "Role": { - "Fn::GetAtt": [ - "EventBusLambdaServiceRole9BC8901F", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "EventBusLambdaServiceRoleDefaultPolicy5BB7FEB6", - "EventBusLambdaServiceRole9BC8901F" - ] - }, - "EventBusLambdaEventInvokeConfig52CF8B9B": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "EventBusLambda4AA26499" - }, - "Qualifier": "$LATEST", - "DestinationConfig": { - "OnFailure": { - "Destination": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - }, - "OnSuccess": { - "Destination": { - "Fn::GetAtt": [ - "OnSucces8F9C946B", - "Arn" - ] - } - } - } - } - }, - "MySpecialAliasC0F04207": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "SnsSqsC4810B27" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "SnsSqsVersionMySpecialVersion08136BD6", - "Version" - ] - }, - "Name": "MySpecialAlias" - } - }, - "MySpecialAliasEventInvokeConfig05FF4E2F": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "SnsSqsC4810B27" - }, - "Qualifier": { - "Fn::Select": [ - 7, - { - "Fn::Split": [ - ":", - { - "Ref": "MySpecialAliasC0F04207" - } - ] - } - ] - }, - "DestinationConfig": { - "OnFailure": { - "Destination": { - "Ref": "TopicBFC7AF6E" - } - }, - "OnSuccess": { - "Destination": { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - } - }, - "MaximumEventAgeInSeconds": 7200, - "MaximumRetryAttempts": 0 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json b/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json deleted file mode 100644 index 756fe8577a9f1..0000000000000 --- a/packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "Resources": { - "FirstServiceRole097DB3A5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FirstServiceRoleDefaultPolicyB5EF41C4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "events:PutEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FirstServiceRoleDefaultPolicyB5EF41C4", - "Roles": [ - { - "Ref": "FirstServiceRole097DB3A5" - } - ] - } - }, - "First8D4707F1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n console.log('Event: %j', event);\n if (event === 'error') throw new Error('UnkownError');\n return event;\n };" - }, - "Role": { - "Fn::GetAtt": [ - "FirstServiceRole097DB3A5", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FirstServiceRoleDefaultPolicyB5EF41C4", - "FirstServiceRole097DB3A5" - ] - }, - "FirstEventInvokeConfigFailureA1E005BC": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "Lambda Function Invocation Result - Failure" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "First8D4707F1", - "Arn" - ] - }, - ":$LATEST" - ] - ] - } - ], - "source": [ - "lambda" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "ErrorD9F0B79D", - "Arn" - ] - }, - "Id": "Target0", - "InputPath": "$.detail.responsePayload" - } - ] - } - }, - "FirstEventInvokeConfigFailureAllowEventRuleawscdklambdachainErrorC073CD8DCAD68018": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ErrorD9F0B79D", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "FirstEventInvokeConfigFailureA1E005BC", - "Arn" - ] - } - } - }, - "FirstEventInvokeConfigSuccess865FF6FF": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "Lambda Function Invocation Result - Success" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "First8D4707F1", - "Arn" - ] - }, - ":$LATEST" - ] - ] - } - ], - "source": [ - "lambda" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "Second394350F9", - "Arn" - ] - }, - "Id": "Target0", - "InputPath": "$.detail.responsePayload" - } - ] - } - }, - "FirstEventInvokeConfigSuccessAllowEventRuleawscdklambdachainSecond178F48F8A8DE2790": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Second394350F9", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "FirstEventInvokeConfigSuccess865FF6FF", - "Arn" - ] - } - } - }, - "FirstEventInvokeConfig7DE6209E": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "First8D4707F1" - }, - "Qualifier": "$LATEST", - "DestinationConfig": { - "OnFailure": { - "Destination": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - }, - "OnSuccess": { - "Destination": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - } - }, - "MaximumRetryAttempts": 0 - } - }, - "SecondServiceRole55940A31": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecondServiceRoleDefaultPolicyB593E14A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "events:PutEvents", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecondServiceRoleDefaultPolicyB593E14A", - "Roles": [ - { - "Ref": "SecondServiceRole55940A31" - } - ] - } - }, - "Second394350F9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n console.log('Event: %j', event);\n if (event === 'error') throw new Error('UnkownError');\n return event;\n };" - }, - "Role": { - "Fn::GetAtt": [ - "SecondServiceRole55940A31", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "SecondServiceRoleDefaultPolicyB593E14A", - "SecondServiceRole55940A31" - ] - }, - "SecondEventInvokeConfigSuccess53614893": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "detail-type": [ - "Lambda Function Invocation Result - Success" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Second394350F9", - "Arn" - ] - }, - ":$LATEST" - ] - ] - } - ], - "source": [ - "lambda" - ] - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "Third1125870F", - "Arn" - ] - }, - "Id": "Target0", - "InputPath": "$.detail.responsePayload" - } - ] - } - }, - "SecondEventInvokeConfigSuccessAllowEventRuleawscdklambdachainThird031C7FF6ABA1C15A": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Third1125870F", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "SecondEventInvokeConfigSuccess53614893", - "Arn" - ] - } - } - }, - "SecondEventInvokeConfig3F9DE36C": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "Second394350F9" - }, - "Qualifier": "$LATEST", - "DestinationConfig": { - "OnSuccess": { - "Destination": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - } - } - } - }, - "ThirdServiceRole42701801": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Third1125870F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n console.log('Event: %j', event);\n if (event === 'error') throw new Error('UnkownError');\n return event;\n };" - }, - "Role": { - "Fn::GetAtt": [ - "ThirdServiceRole42701801", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "ThirdServiceRole42701801" - ] - }, - "ErrorServiceRoleCE484966": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "ErrorD9F0B79D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => {\n console.log('Event: %j', event);\n if (event === 'error') throw new Error('UnkownError');\n return event;\n };" - }, - "Role": { - "Fn::GetAtt": [ - "ErrorServiceRoleCE484966", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "ErrorServiceRoleCE484966" - ] - } - }, - "Outputs": { - "FirstFunctionName": { - "Value": { - "Ref": "First8D4707F1" - } - }, - "ThirdFunctionName": { - "Value": { - "Ref": "Third1125870F" - } - }, - "ErrorFunctionName": { - "Value": { - "Ref": "ErrorD9F0B79D" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.dynamodb.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.dynamodb.expected.json deleted file mode 100644 index 2e84eb9884d4c..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.dynamodb.expected.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FServiceRoleDefaultPolicy17A19BFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "dynamodb:ListStreams", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "dynamodb:DescribeStream", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TD925BC7E", - "StreamArn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FServiceRoleDefaultPolicy17A19BFA", - "Roles": [ - { - "Ref": "FServiceRole3AC82EE1" - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n console.log('event:', JSON.stringify(event, undefined, 2));\n return { event };\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRoleDefaultPolicy17A19BFA", - "FServiceRole3AC82EE1" - ] - }, - "FDynamoDBEventSourcelambdaeventsourcedynamodbT7967476AE652DA48": { - "Type": "AWS::Lambda::EventSourceMapping", - "Properties": { - "FunctionName": { - "Ref": "FC4345940" - }, - "BatchSize": 5, - "EventSourceArn": { - "Fn::GetAtt": [ - "TD925BC7E", - "StreamArn" - ] - }, - "StartingPosition": "TRIM_HORIZON", - "TumblingWindowInSeconds": 60 - } - }, - "TD925BC7E": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "id", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "id", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 5, - "WriteCapacityUnits": 5 - }, - "StreamSpecification": { - "StreamViewType": "NEW_IMAGE" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesis.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesis.expected.json deleted file mode 100644 index 06b0531faf617..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesis.expected.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FServiceRoleDefaultPolicy17A19BFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kinesis:DescribeStream", - "kinesis:DescribeStreamSummary", - "kinesis:GetRecords", - "kinesis:GetShardIterator", - "kinesis:ListShards", - "kinesis:ListStreams", - "kinesis:SubscribeToShard" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FServiceRoleDefaultPolicy17A19BFA", - "Roles": [ - { - "Ref": "FServiceRole3AC82EE1" - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n console.log('event:', JSON.stringify(event, undefined, 2));\n return { event };\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRoleDefaultPolicy17A19BFA", - "FServiceRole3AC82EE1" - ] - }, - "FKinesisEventSourcelambdaeventsourcekinesisQ645CE7DB2D6BCCF5": { - "Type": "AWS::Lambda::EventSourceMapping", - "Properties": { - "FunctionName": { - "Ref": "FC4345940" - }, - "BatchSize": 100, - "EventSourceArn": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - }, - "StartingPosition": "TRIM_HORIZON", - "TumblingWindowInSeconds": 60 - } - }, - "Q63C6E3AB": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "RetentionPeriodHours": 24, - "ShardCount": 1, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - }, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - } - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesiswithdlq.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesiswithdlq.expected.json deleted file mode 100644 index 79d75d7e46b3a..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesiswithdlq.expected.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FServiceRoleDefaultPolicy17A19BFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - } - }, - { - "Action": [ - "kinesis:DescribeStream", - "kinesis:DescribeStreamSummary", - "kinesis:GetRecords", - "kinesis:GetShardIterator", - "kinesis:ListShards", - "kinesis:ListStreams", - "kinesis:SubscribeToShard" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "S509448A1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FServiceRoleDefaultPolicy17A19BFA", - "Roles": [ - { - "Ref": "FServiceRole3AC82EE1" - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n // eslint-disable-next-line no-console\n console.log('event:', JSON.stringify(event, undefined, 2));\n throw new Error();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRoleDefaultPolicy17A19BFA", - "FServiceRole3AC82EE1" - ] - }, - "FKinesisEventSourcelambdaeventsourcekinesiswithdlqSD357FCB87EEA8CB4": { - "Type": "AWS::Lambda::EventSourceMapping", - "Properties": { - "FunctionName": { - "Ref": "FC4345940" - }, - "BatchSize": 100, - "DestinationConfig": { - "OnFailure": { - "Destination": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - } - } - }, - "EventSourceArn": { - "Fn::GetAtt": [ - "S509448A1", - "Arn" - ] - }, - "MaximumRetryAttempts": 0, - "StartingPosition": "TRIM_HORIZON" - } - }, - "S509448A1": { - "Type": "AWS::Kinesis::Stream", - "Properties": { - "RetentionPeriodHours": 24, - "ShardCount": 1, - "StreamEncryption": { - "Fn::If": [ - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", - { - "Ref": "AWS::NoValue" - }, - { - "EncryptionType": "KMS", - "KeyId": "alias/aws/kinesis" - } - ] - }, - "StreamModeDetails": { - "StreamMode": "PROVISIONED" - } - } - }, - "Q63C6E3AB": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "FC4345940", - "Arn" - ] - } - }, - "InputKinesisStreamName": { - "Value": { - "Ref": "S509448A1" - } - }, - "DlqSqsQueueUrl": { - "Value": { - "Ref": "Q63C6E3AB" - } - } - }, - "Conditions": { - "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.s3.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.s3.expected.json deleted file mode 100644 index 5732fcfcbaf98..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.s3.expected.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n console.log('event:', JSON.stringify(event, undefined, 2));\n return { event };\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRole3AC82EE1" - ] - }, - "B08E7C7AF": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BPolicy3F02723E": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "B08E7C7AF" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "B08E7C7AF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "B08E7C7AF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BAutoDeleteObjectsCustomResource6224D839": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "B08E7C7AF" - } - }, - "DependsOn": [ - "BPolicy3F02723E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BNotificationsEB8DA980": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "B08E7C7AF" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "prefix", - "Value": "subdir/" - } - ] - } - }, - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "FC4345940", - "Arn" - ] - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "BAllowBucketNotificationsTolambdaeventsources3F741608059EF9F709" - ] - }, - "BAllowBucketNotificationsTolambdaeventsources3F741608059EF9F709": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FC4345940", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "B08E7C7AF", - "Arn" - ] - } - } - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "B08E7C7AF" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - } - } -} diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sns.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sns.expected.json deleted file mode 100644 index 9d9c012de88e1..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sns.expected.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n console.log('event:', JSON.stringify(event, undefined, 2));\n return { event };\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRole3AC82EE1" - ] - }, - "FAllowInvokelambdaeventsourcesnsT85539BB11B51A88E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FC4345940", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "TD925BC7E" - } - } - }, - "FTA788EE87": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "TD925BC7E" - }, - "Endpoint": { - "Fn::GetAtt": [ - "FC4345940", - "Arn" - ] - } - } - }, - "TD925BC7E": { - "Type": "AWS::SNS::Topic" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sqs.expected.json b/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sqs.expected.json deleted file mode 100644 index 8b5379b239c98..0000000000000 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/integ.sqs.expected.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "Resources": { - "FServiceRole3AC82EE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "FServiceRoleDefaultPolicy17A19BFA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FServiceRoleDefaultPolicy17A19BFA", - "Roles": [ - { - "Ref": "FServiceRole3AC82EE1" - } - ] - } - }, - "FC4345940": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function handler(event) {\n console.log('event:', JSON.stringify(event, undefined, 2));\n return { event };\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FServiceRole3AC82EE1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FServiceRoleDefaultPolicy17A19BFA", - "FServiceRole3AC82EE1" - ] - }, - "FSqsEventSourcelambdaeventsourcesqsQ67DE9201754EC819": { - "Type": "AWS::Lambda::EventSourceMapping", - "Properties": { - "FunctionName": { - "Ref": "FC4345940" - }, - "BatchSize": 5, - "EventSourceArn": { - "Fn::GetAtt": [ - "Q63C6E3AB", - "Arn" - ] - } - } - }, - "Q63C6E3AB": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-go/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-go/test/integ.function.expected.json deleted file mode 100644 index fe40549eba6d3..0000000000000 --- a/packages/@aws-cdk/aws-lambda-go/test/integ.function.expected.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Resources": { - "gohandlerdockerServiceRole70394790": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "gohandlerdockerAE04F1B8": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1S3Bucket6ED74DF1" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1S3VersionKeyB0821FCE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1S3VersionKeyB0821FCE" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "gohandlerdockerServiceRole70394790", - "Arn" - ] - }, - "Handler": "bootstrap", - "Runtime": "provided.al2" - }, - "DependsOn": [ - "gohandlerdockerServiceRole70394790" - ] - } - }, - "Parameters": { - "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1S3Bucket6ED74DF1": { - "Type": "String", - "Description": "S3 bucket for asset \"afe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1\"" - }, - "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1S3VersionKeyB0821FCE": { - "Type": "String", - "Description": "S3 key for asset version \"afe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1\"" - }, - "AssetParametersafe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1ArtifactHash2DFD542A": { - "Type": "String", - "Description": "Artifact hash for asset \"afe3256c3d565f40df78c0343322cb3d8b20d5dbc5e0ff560dd9ed4677e0adb1\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.compilations.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.compilations.expected.json deleted file mode 100644 index de56ccb33b617..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.compilations.expected.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "Resources": { - "tsdecoratorhandlerServiceRole61E9E52C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "tsdecoratorhandlerC8E2F076": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3Bucket2B516B38" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3VersionKey4B530CD7" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3VersionKey4B530CD7" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "tsdecoratorhandlerServiceRole61E9E52C", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "tsdecoratorhandlerServiceRole61E9E52C" - ] - }, - "tsdecoratorhandlertsconfigServiceRoleC4AE481E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "tsdecoratorhandlertsconfig68EC191E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3Bucket2B516B38" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3VersionKey4B530CD7" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3VersionKey4B530CD7" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "tsdecoratorhandlertsconfigServiceRoleC4AE481E", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "tsdecoratorhandlertsconfigServiceRoleC4AE481E" - ] - } - }, - "Parameters": { - "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3Bucket2B516B38": { - "Type": "String", - "Description": "S3 bucket for asset \"482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283f\"" - }, - "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fS3VersionKey4B530CD7": { - "Type": "String", - "Description": "S3 key for asset version \"482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283f\"" - }, - "AssetParameters482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283fArtifactHash237F55B4": { - "Type": "String", - "Description": "Artifact hash for asset \"482454f5e1d850303130cf1cdbee1376fca84deaf9ccfa2c4cf8a246d415283f\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json deleted file mode 100644 index 825ac665c7141..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.expected.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "Resources": { - "externalServiceRole85A00A90": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "external068F12D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663S3BucketB985628A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663S3VersionKeyBF22F5BF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663S3VersionKeyBF22F5BF" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "externalServiceRole85A00A90", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "externalServiceRole85A00A90" - ] - } - }, - "Parameters": { - "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663S3BucketB985628A": { - "Type": "String", - "Description": "S3 bucket for asset \"4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663\"" - }, - "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663S3VersionKeyBF22F5BF": { - "Type": "String", - "Description": "S3 key for asset version \"4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663\"" - }, - "AssetParameters4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663ArtifactHashCE7178E5": { - "Type": "String", - "Description": "Artifact hash for asset \"4c9f09adeee5f7ebc38c74c200b962852bca53042fb5e9b818e4433ccc31e663\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.esm.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.esm.expected.json deleted file mode 100644 index 3451647e0e977..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.esm.expected.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "Resources": { - "esmServiceRole84AC2522": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "esm9B397D27": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eS3Bucket72D078A9" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eS3VersionKey93EC2390" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eS3VersionKey93EC2390" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "esmServiceRole84AC2522", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "esmServiceRole84AC2522" - ] - } - }, - "Parameters": { - "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eS3Bucket72D078A9": { - "Type": "String", - "Description": "S3 bucket for asset \"e1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4e\"" - }, - "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eS3VersionKey93EC2390": { - "Type": "String", - "Description": "S3 key for asset version \"e1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4e\"" - }, - "AssetParameterse1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4eArtifactHashB5F6BEF5": { - "Type": "String", - "Description": "Artifact hash for asset \"e1af356d995917f14ba5cf5e65cb7c4e969e2c28567bea560a8912fbbfa3fa4e\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json deleted file mode 100644 index 5236e0df61376..0000000000000 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.expected.json +++ /dev/null @@ -1,875 +0,0 @@ -{ - "Resources": { - "tshandlerServiceRole8876B8E7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "tshandler4E1C6929": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666S3Bucket9DF03081" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666S3VersionKeyD292AB11" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666S3VersionKeyD292AB11" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "tshandlerServiceRole8876B8E7", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "tshandlerServiceRole8876B8E7" - ] - }, - "jshandlerServiceRole781AF366": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "jshandlerD8909241": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eS3BucketCEC78A8C" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eS3VersionKey73F73F44" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eS3VersionKey73F73F44" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "jshandlerServiceRole781AF366", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "jshandlerServiceRole781AF366" - ] - }, - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-nodejs/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "tshandlervpcServiceRoleF6D326A3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - } - }, - "tshandlervpcSecurityGroup587CC215": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function cdkinteglambdanodejstshandlervpcAAE6104A", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "tshandlervpcA502E26A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddS3Bucket6289DEB0" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddS3VersionKey0271AF4F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddS3VersionKey0271AF4F" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "tshandlervpcServiceRoleF6D326A3", - "Arn" - ] - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "tshandlervpcSecurityGroup587CC215", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "DependsOn": [ - "tshandlervpcServiceRoleF6D326A3" - ] - } - }, - "Parameters": { - "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666S3Bucket9DF03081": { - "Type": "String", - "Description": "S3 bucket for asset \"2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666\"" - }, - "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666S3VersionKeyD292AB11": { - "Type": "String", - "Description": "S3 key for asset version \"2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666\"" - }, - "AssetParameters2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666ArtifactHashD513F670": { - "Type": "String", - "Description": "Artifact hash for asset \"2117ac17e1ec7017f8ab1b047bddad03a85ea5d448404a33a7fcee4fb5a3d666\"" - }, - "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eS3BucketCEC78A8C": { - "Type": "String", - "Description": "S3 bucket for asset \"dc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3e\"" - }, - "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eS3VersionKey73F73F44": { - "Type": "String", - "Description": "S3 key for asset version \"dc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3e\"" - }, - "AssetParametersdc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3eArtifactHash7BBA4237": { - "Type": "String", - "Description": "Artifact hash for asset \"dc17834bed7e16ae407d0a77361d92c9a7609557332dafffb47df61ec1b48b3e\"" - }, - "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddS3Bucket6289DEB0": { - "Type": "String", - "Description": "S3 bucket for asset \"050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96dd\"" - }, - "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddS3VersionKey0271AF4F": { - "Type": "String", - "Description": "S3 key for asset version \"050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96dd\"" - }, - "AssetParameters050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96ddArtifactHashEC0A46C5": { - "Type": "String", - "Description": "Artifact hash for asset \"050b3629caed17ac6299cf2228bc7a46c2b039b1386eabf3e5935cffca2a96dd\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.custom-build.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.custom-build.expected.json deleted file mode 100644 index 003dd758e7c8f..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.custom-build.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82S3BucketC9B359BB" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82S3VersionKeyBF16F8DD" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82S3VersionKeyBF16F8DD" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82S3BucketC9B359BB": { - "Type": "String", - "Description": "S3 bucket for asset \"89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82\"" - }, - "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82S3VersionKeyBF16F8DD": { - "Type": "String", - "Description": "S3 key for asset version \"89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82\"" - }, - "AssetParameters89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82ArtifactHashFF99ACF4": { - "Type": "String", - "Description": "Artifact hash for asset \"89ca5c5b2234f7dbbadd142cad0414d3cdf1293dc1edfa1618f4eac392958c82\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json deleted file mode 100644 index 7f671e018e9ed..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3Bucket5DFF2A17" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3Bucket5DFF2A17": { - "Type": "String", - "Description": "S3 bucket for asset \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - }, - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4": { - "Type": "String", - "Description": "S3 key for asset version \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - }, - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573ArtifactHashA5E62729": { - "Type": "String", - "Description": "Artifact hash for asset \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.nodeps.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.nodeps.expected.json deleted file mode 100644 index 6fc079bb0cadb..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.nodeps.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aS3BucketAF45FF62" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aS3VersionKey4F7CFB4F" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aS3VersionKey4F7CFB4F" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aS3BucketAF45FF62": { - "Type": "String", - "Description": "S3 bucket for asset \"3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431a\"" - }, - "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aS3VersionKey4F7CFB4F": { - "Type": "String", - "Description": "S3 key for asset version \"3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431a\"" - }, - "AssetParameters3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431aArtifactHash904EF538": { - "Type": "String", - "Description": "Artifact hash for asset \"3b772c6d8ae6957e4b380de3d18b02203a1d3eda5f37cb706ebb17cbcceb431a\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json deleted file mode 100644 index 3565c8f0d26c2..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.expected.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "Resources": { - "myhandlerinlineServiceRole10C681F6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerinline53D120C7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fS3Bucket53FFD3D0" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fS3VersionKey7A7468A3" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fS3VersionKey7A7468A3" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerinlineServiceRole10C681F6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "myhandlerinlineServiceRole10C681F6" - ] - }, - "myhandlerpython38ServiceRole2049AFF7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerpython384D62BBB5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0S3Bucket714A0D7D" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0S3VersionKey53ECA362" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0S3VersionKey53ECA362" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerpython38ServiceRole2049AFF7", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerpython38ServiceRole2049AFF7" - ] - } - }, - "Parameters": { - "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fS3Bucket53FFD3D0": { - "Type": "String", - "Description": "S3 bucket for asset \"684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9f\"" - }, - "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fS3VersionKey7A7468A3": { - "Type": "String", - "Description": "S3 key for asset version \"684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9f\"" - }, - "AssetParameters684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9fArtifactHash18F2A416": { - "Type": "String", - "Description": "Artifact hash for asset \"684a2f752f67fdc04a3b76308d5a71acb60a190f24b6dc1e5899167f6f32ce9f\"" - }, - "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0S3Bucket714A0D7D": { - "Type": "String", - "Description": "S3 bucket for asset \"069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0\"" - }, - "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0S3VersionKey53ECA362": { - "Type": "String", - "Description": "S3 key for asset version \"069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0\"" - }, - "AssetParameters069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0ArtifactHashA527F411": { - "Type": "String", - "Description": "Artifact hash for asset \"069324dd6f747a462fc08bc2701fa4e72d5776318b3bf4f27bcdb08b937e77f0\"" - } - }, - "Outputs": { - "InlineFunctionName": { - "Value": { - "Ref": "myhandlerinline53D120C7" - } - }, - "Python38FunctionName": { - "Value": { - "Ref": "myhandlerpython384D62BBB5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json deleted file mode 100644 index bbae8112b1807..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.expected.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "Resources": { - "myhandlerinlineServiceRole10C681F6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerinline53D120C7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91S3Bucket057A8A40" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91S3VersionKey0AF7333B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91S3VersionKey0AF7333B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerinlineServiceRole10C681F6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "myhandlerinlineServiceRole10C681F6" - ] - }, - "myhandlerpython38ServiceRole2049AFF7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerpython384D62BBB5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2S3Bucket1B953860" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2S3VersionKey21C3F64D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2S3VersionKey21C3F64D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerpython38ServiceRole2049AFF7", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerpython38ServiceRole2049AFF7" - ] - } - }, - "Parameters": { - "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91S3Bucket057A8A40": { - "Type": "String", - "Description": "S3 bucket for asset \"b56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91\"" - }, - "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91S3VersionKey0AF7333B": { - "Type": "String", - "Description": "S3 key for asset version \"b56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91\"" - }, - "AssetParametersb56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91ArtifactHash5E36A98B": { - "Type": "String", - "Description": "Artifact hash for asset \"b56cede4ec5df8a7b7eac0b708729b7bd41299f732fd0d287c6ac64c12626f91\"" - }, - "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2S3Bucket1B953860": { - "Type": "String", - "Description": "S3 bucket for asset \"c6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2\"" - }, - "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2S3VersionKey21C3F64D": { - "Type": "String", - "Description": "S3 key for asset version \"c6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2\"" - }, - "AssetParametersc6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2ArtifactHash267CE95E": { - "Type": "String", - "Description": "Artifact hash for asset \"c6ffa1649951c75afc6c302e13c762f94b8f8958c48d7cf0a0712ce381be73b2\"" - } - }, - "Outputs": { - "InlineFunctionName": { - "Value": { - "Ref": "myhandlerinline53D120C7" - } - }, - "Python38FunctionName": { - "Value": { - "Ref": "myhandlerpython384D62BBB5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.expected.json deleted file mode 100644 index faace5659fe2d..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.project.expected.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "Resources": { - "SharedDACC02AA": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724S3BucketDA99AAC5" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724S3VersionKey561281CF" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724S3VersionKey561281CF" - } - ] - } - ] - } - ] - ] - } - }, - "CompatibleRuntimes": [ - "python3.6" - ] - } - }, - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116S3BucketD74EF551" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116S3VersionKey9612D0E2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116S3VersionKey9612D0E2" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "SharedDACC02AA" - } - ], - "Runtime": "python3.6" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724S3BucketDA99AAC5": { - "Type": "String", - "Description": "S3 bucket for asset \"51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724\"" - }, - "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724S3VersionKey561281CF": { - "Type": "String", - "Description": "S3 key for asset version \"51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724\"" - }, - "AssetParameters51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724ArtifactHash2CDEA207": { - "Type": "String", - "Description": "Artifact hash for asset \"51a124c454095f3106d92ba6c988cda953780ef31f562c86bd4ca693a7fdf724\"" - }, - "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116S3BucketD74EF551": { - "Type": "String", - "Description": "S3 bucket for asset \"c5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116\"" - }, - "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116S3VersionKey9612D0E2": { - "Type": "String", - "Description": "S3 key for asset version \"c5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116\"" - }, - "AssetParametersc5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116ArtifactHash1E0614B3": { - "Type": "String", - "Description": "Artifact hash for asset \"c5c2604faa927103df13d5a72632c7be09d3fc34b6b31039a6acec9acf0f9116\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json deleted file mode 100644 index 8a264a6ca2058..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57S3Bucket5AE0410B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57S3VersionKey68880DE9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57S3VersionKey68880DE9" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57S3Bucket5AE0410B": { - "Type": "String", - "Description": "S3 bucket for asset \"5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57\"" - }, - "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57S3VersionKey68880DE9": { - "Type": "String", - "Description": "S3 key for asset version \"5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57\"" - }, - "AssetParameters5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57ArtifactHashD00E469F": { - "Type": "String", - "Description": "Artifact hash for asset \"5e6412615f95ab4d20cbc13454e0603afb26be2b12bdd954c21a3bca6cbc6e57\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.sub.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.sub.expected.json deleted file mode 100644 index e76e7cfb14392..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.sub.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0S3Bucket89FCC833" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0S3VersionKey3090BAB2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0S3VersionKey3090BAB2" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "inner.custom_index.custom_handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0S3Bucket89FCC833": { - "Type": "String", - "Description": "S3 bucket for asset \"4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0\"" - }, - "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0S3VersionKey3090BAB2": { - "Type": "String", - "Description": "S3 key for asset version \"4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0\"" - }, - "AssetParameters4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0ArtifactHash862641FA": { - "Type": "String", - "Description": "Artifact hash for asset \"4427066e616276cb27bb4011d3a6a474a4e5ffb67c01234137177c6c5e44b1d0\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.expected.json deleted file mode 100644 index 23cf7919d5dd1..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.vpc.expected.json +++ /dev/null @@ -1,394 +0,0 @@ -{ - "Resources": { - "myvpc9455A260": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc" - } - ] - } - }, - "myvpcingressSubnet1Subnet82F0259C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/24", - "VpcId": { - "Ref": "myvpc9455A260" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet1" - } - ] - } - }, - "myvpcingressSubnet1RouteTableD6322DD5": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myvpc9455A260" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet1" - } - ] - } - }, - "myvpcingressSubnet1RouteTableAssociation12FE9C06": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet1RouteTableD6322DD5" - }, - "SubnetId": { - "Ref": "myvpcingressSubnet1Subnet82F0259C" - } - } - }, - "myvpcingressSubnet1DefaultRoute6FCDFDDF": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet1RouteTableD6322DD5" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myvpcIGW24C0BBAE" - } - }, - "DependsOn": [ - "myvpcVPCGWD483DB64" - ] - }, - "myvpcingressSubnet2Subnet56945106": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.1.0/24", - "VpcId": { - "Ref": "myvpc9455A260" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet2" - } - ] - } - }, - "myvpcingressSubnet2RouteTable2112B53A": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myvpc9455A260" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet2" - } - ] - } - }, - "myvpcingressSubnet2RouteTableAssociation08B3BE06": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet2RouteTable2112B53A" - }, - "SubnetId": { - "Ref": "myvpcingressSubnet2Subnet56945106" - } - } - }, - "myvpcingressSubnet2DefaultRouteBF3C1EC8": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet2RouteTable2112B53A" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myvpcIGW24C0BBAE" - } - }, - "DependsOn": [ - "myvpcVPCGWD483DB64" - ] - }, - "myvpcingressSubnet3Subnet5E973EB6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.2.0/24", - "VpcId": { - "Ref": "myvpc9455A260" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "ingress" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet3" - } - ] - } - }, - "myvpcingressSubnet3RouteTable84B01952": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "myvpc9455A260" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc/ingressSubnet3" - } - ] - } - }, - "myvpcingressSubnet3RouteTableAssociation22645059": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet3RouteTable84B01952" - }, - "SubnetId": { - "Ref": "myvpcingressSubnet3Subnet5E973EB6" - } - } - }, - "myvpcingressSubnet3DefaultRouteD30AAE70": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "myvpcingressSubnet3RouteTable84B01952" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "myvpcIGW24C0BBAE" - } - }, - "DependsOn": [ - "myvpcVPCGWD483DB64" - ] - }, - "myvpcIGW24C0BBAE": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-lambda-python-vpc/my_vpc" - } - ] - } - }, - "myvpcVPCGWD483DB64": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "myvpc9455A260" - }, - "InternetGatewayId": { - "Ref": "myvpcIGW24C0BBAE" - } - } - }, - "myhandlerServiceRole77891068": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - } - }, - "myhandlerSecurityGroupF566A239": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function cdkinteglambdapythonvpcmyhandlerCA7DB4EE", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "myvpc9455A260" - } - } - }, - "myhandlerD202FA8E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3Bucket5DFF2A17" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "myhandlerServiceRole77891068", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "myhandlerSecurityGroupF566A239", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "myvpcingressSubnet1Subnet82F0259C" - }, - { - "Ref": "myvpcingressSubnet2Subnet56945106" - }, - { - "Ref": "myvpcingressSubnet3Subnet5E973EB6" - } - ] - } - }, - "DependsOn": [ - "myhandlerServiceRole77891068" - ] - } - }, - "Parameters": { - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3Bucket5DFF2A17": { - "Type": "String", - "Description": "S3 bucket for asset \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - }, - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573S3VersionKey4E2330F4": { - "Type": "String", - "Description": "S3 key for asset version \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - }, - "AssetParameters94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573ArtifactHashA5E62729": { - "Type": "String", - "Description": "Artifact hash for asset \"94754b2f276800442d199c45b0bf611b9ed8b4d1f6d2acdf6bf5cbeed6176573\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "myhandlerD202FA8E", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.assets.file.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.assets.file.expected.json deleted file mode 100644 index b0f69e554e57c..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.assets.file.expected.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fS3Bucket66527C9E" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fS3VersionKey4FEF0FAB" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fS3VersionKey4FEF0FAB" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.main", - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Runtime": "python3.6" - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - } - }, - "Parameters": { - "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fS3Bucket66527C9E": { - "Type": "String", - "Description": "S3 bucket for asset \"a37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5f\"" - }, - "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fS3VersionKey4FEF0FAB": { - "Type": "String", - "Description": "S3 key for asset version \"a37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5f\"" - }, - "AssetParametersa37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5fArtifactHashCF3E1D8E": { - "Type": "String", - "Description": "Artifact hash for asset \"a37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5f\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.assets.lit.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.assets.lit.expected.json deleted file mode 100644 index f8f14e0c24a9d..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.assets.lit.expected.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3Bucket1354C645" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - } - ] - ] - } - }, - "Handler": "index.main", - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Runtime": "python3.6" - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - } - }, - "Parameters": { - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3Bucket1354C645": { - "Type": "String", - "Description": "S3 bucket for asset \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - }, - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC": { - "Type": "String", - "Description": "S3 key for asset version \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - }, - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232ArtifactHashFA16AACF": { - "Type": "String", - "Description": "Artifact hash for asset \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.expected.json deleted file mode 100644 index bb6ee0277bb99..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.expected.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async () => { console.log('hello world'); };" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - } - } - }, - "Alias325C5727": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822", - "Version" - ] - }, - "Name": "prod" - } - }, - "AliasAliasScalingTarget7449FF0E": { - "Type": "AWS::ApplicationAutoScaling::ScalableTarget", - "Properties": { - "MaxCapacity": 50, - "MinCapacity": 3, - "ResourceId": { - "Fn::Join": [ - "", - [ - "function:", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "Alias325C5727" - } - ] - } - ] - }, - ":prod" - ] - ] - }, - "RoleARN": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/lambda.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_LambdaConcurrency" - ] - ] - }, - "ScalableDimension": "lambda:function:ProvisionedConcurrency", - "ServiceNamespace": "lambda", - "ScheduledActions": [ - { - "ScalableTargetAction": { - "MinCapacity": 20 - }, - "Schedule": "cron(0 8 * * ? *)", - "ScheduledActionName": "ScaleUpInTheMorning" - }, - { - "ScalableTargetAction": { - "MaxCapacity": 20 - }, - "Schedule": "cron(0 20 * * ? *)", - "ScheduledActionName": "ScaleDownAtNight" - } - ] - } - }, - "AliasAliasScalingTargetTrackingA7718D48": { - "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", - "Properties": { - "PolicyName": "awslambdaautoscalingAliasAliasScalingTargetTrackingD339330D", - "PolicyType": "TargetTrackingScaling", - "ScalingTargetId": { - "Ref": "AliasAliasScalingTarget7449FF0E" - }, - "TargetTrackingScalingPolicyConfiguration": { - "PredefinedMetricSpecification": { - "PredefinedMetricType": "LambdaProvisionedConcurrencyUtilization" - }, - "TargetValue": 0.5 - } - } - } - }, - "Outputs": { - "FunctionName": { - "Value": { - "Ref": "MyLambdaCCE802FB" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json deleted file mode 100644 index ce5b2fbe98384..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "Resources": { - "FunctionServiceRole675BB04A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Function76856677": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509S3BucketBF50F97C" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509S3VersionKeyF21AC8C1" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509S3VersionKeyF21AC8C1" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "FunctionServiceRole675BB04A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "FunctionServiceRole675BB04A" - ] - } - }, - "Parameters": { - "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509S3BucketBF50F97C": { - "Type": "String", - "Description": "S3 bucket for asset \"fec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509\"" - }, - "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509S3VersionKeyF21AC8C1": { - "Type": "String", - "Description": "S3 key for asset version \"fec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509\"" - }, - "AssetParametersfec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509ArtifactHash5D8C129B": { - "Type": "String", - "Description": "Artifact hash for asset \"fec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509\"" - } - }, - "Outputs": { - "FunctionArn": { - "Value": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json deleted file mode 100644 index 66f651fdbf280..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Handler": "index.main", - "Runtime": "python3.8" - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyLambdaCurrentVersionEventInvokeConfigD120DC68": { - "Type": "AWS::Lambda::EventInvokeConfig", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - }, - "Qualifier": { - "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", - "Version" - ] - }, - "MaximumRetryAttempts": 1 - } - }, - "MyLambdaCurrentVersionAliaslive9151E913": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", - "Version" - ] - }, - "Name": "live" - } - } - }, - "Parameters": { - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E": { - "Type": "String", - "Description": "S3 bucket for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B": { - "Type": "String", - "Description": "S3 key for asset version \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34ArtifactHash70E274C4": { - "Type": "String", - "Description": "Artifact hash for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json deleted file mode 100644 index 824a0b3e6b8f9..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda-insights-mapping.expected.json +++ /dev/null @@ -1,549 +0,0 @@ -{ - "Resources": { - "MyFunc1ServiceRoleF96C5B5C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc11BE70A62": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc1ServiceRoleF96C5B5C", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:lambda:", - { - "Ref": "AWS::Region" - }, - ":580247275435:layer:LambdaInsightsExtension:2" - ] - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc1ServiceRoleF96C5B5C" - ] - }, - "MyFunc2ServiceRole68E50443": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc242557A97": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc2ServiceRole68E50443", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:lambda:", - { - "Ref": "AWS::Region" - }, - ":580247275435:layer:LambdaInsightsExtension:11" - ] - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc2ServiceRole68E50443" - ] - }, - "MyFunc3ServiceRoleA69795ED": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc3666B7A2F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc3ServiceRoleA69795ED", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:lambda:", - { - "Ref": "AWS::Region" - }, - ":580247275435:layer:LambdaInsightsExtension:12" - ] - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc3ServiceRoleA69795ED" - ] - }, - "MyFunc4ServiceRole93C4DEFF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc4B88F85C6": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc4ServiceRole93C4DEFF", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::FindInMap": [ - "CloudwatchlambdainsightsversionMap", - { - "Ref": "AWS::Region" - }, - "1x0x98x0xx86x64" - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc4ServiceRole93C4DEFF" - ] - }, - "MyFunc5ServiceRoleFE4CE92B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc586573B53": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc5ServiceRoleFE4CE92B", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Fn::FindInMap": [ - "CloudwatchlambdainsightsversionMap", - { - "Ref": "AWS::Region" - }, - "1x0x119x0xx86x64" - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc5ServiceRoleFE4CE92B" - ] - }, - "MyFunc6ServiceRoleCDDBC2C6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" - ] - ] - } - ] - } - }, - "MyFunc60D944984": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc6ServiceRoleCDDBC2C6", - "Arn" - ] - }, - "Architectures": [ - "arm64" - ], - "Handler": "index.handler", - "Layers": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:lambda:", - { - "Ref": "AWS::Region" - }, - ":580247275435:layer:LambdaInsightsExtension-Arm64:1" - ] - ] - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunc6ServiceRoleCDDBC2C6" - ] - } - }, - "Mappings": { - "CloudwatchlambdainsightsversionMap": { - "af-south-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9" - }, - "ap-east-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9" - }, - "ap-northeast-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23" - }, - "ap-northeast-2": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16" - }, - "ap-south-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "ap-southeast-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "ap-southeast-2": { - "1x0x98x0xx86x64": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16" - }, - "ca-central-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "cn-north-1": { - "1x0x98x0xx86x64": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9" - }, - "cn-northwest-1": { - "1x0x98x0xx86x64": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9" - }, - "eu-central-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "eu-north-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "eu-south-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9" - }, - "eu-west-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "eu-west-2": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16" - }, - "eu-west-3": { - "1x0x98x0xx86x64": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16" - }, - "me-south-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:8", - "1x0x119x0xx86x64": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9" - }, - "sa-east-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "us-east-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "us-east-2": { - "1x0x98x0xx86x64": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16" - }, - "us-west-1": { - "1x0x98x0xx86x64": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16" - }, - "us-west-2": { - "1x0x98x0xx86x64": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:14", - "1x0x119x0xx86x64": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json deleted file mode 100644 index d7f68ed5f5a1f..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.docker.expected.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ImageUri": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:768d7b6c1d41b85135f498fe0cca69fea410be3c3322c69cf08690aaad29a610" - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "PackageType": "Image" - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.expected.json deleted file mode 100644 index d72bf314ae269..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.expected.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "Resources": { - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaServiceRoleDefaultPolicy5BBC6F68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "Roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambdaFunctionUrlC2055677": { - "Type": "AWS::Lambda::Url", - "Properties": { - "AuthType": "AWS_IAM", - "TargetFunctionArn": { - "Fn::GetAtt": [ - "MyLambdaCCE802FB", - "Arn" - ] - } - } - }, - "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - } - } - }, - "Alias325C5727": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaCCE802FB" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151", - "Version" - ] - }, - "Name": "prod" - } - }, - "AliasAliasPermissionAF30F9E8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "Alias325C5727" - }, - "Principal": "cloudformation.amazonaws.com" - } - }, - "AliasFunctionUrlDC6EC566": { - "Type": "AWS::Lambda::Url", - "Properties": { - "AuthType": "NONE", - "TargetFunctionArn": { - "Ref": "Alias325C5727" - } - } - }, - "Aliasinvokefunctionurl4CA9917B": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunctionUrl", - "FunctionName": { - "Ref": "Alias325C5727" - }, - "Principal": "*", - "FunctionUrlAuthType": "NONE" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json deleted file mode 100644 index abb79b5123377..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.expected.json +++ /dev/null @@ -1,1057 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "Efs9E8BF36B": { - "Type": "AWS::EFS::FileSystem", - "Properties": { - "Encrypted": true, - "FileSystemTags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Efs" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EfsEfsSecurityGroup6F40EA3B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-lambda-1/Efs/EfsSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-lambda-1/Efs" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "EfsEfsSecurityGroupfromawscdklambda1MyLambdaSecurityGroup86B085EE20490D9864A8": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdklambda1MyLambdaSecurityGroup86B085EE:2049", - "FromPort": 2049, - "GroupId": { - "Fn::GetAtt": [ - "EfsEfsSecurityGroup6F40EA3B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "MyLambdaSecurityGroup1E71A818", - "GroupId" - ] - }, - "ToPort": 2049 - } - }, - "EfsEfsMountTarget195B2DD2E": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "Efs9E8BF36B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EfsEfsSecurityGroup6F40EA3B", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "EfsEfsMountTarget2315C927F": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "Efs9E8BF36B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EfsEfsSecurityGroup6F40EA3B", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "EfsEfsMountTarget36646B9A0": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "Efs9E8BF36B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "EfsEfsSecurityGroup6F40EA3B", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "EfsAccessPointE419FED9": { - "Type": "AWS::EFS::AccessPoint", - "Properties": { - "FileSystemId": { - "Ref": "Efs9E8BF36B" - }, - "PosixUser": { - "Gid": "1001", - "Uid": "1001" - }, - "RootDirectory": { - "CreationInfo": { - "OwnerGid": "1001", - "OwnerUid": "1001", - "Permissions": "750" - }, - "Path": "/export/lambda" - } - } - }, - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - }, - "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0" - ] - }, - "MyLambdaServiceRoleDefaultPolicy5BBC6F68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "elasticfilesystem:ClientMount", - "Condition": { - "StringEquals": { - "elasticfilesystem:AccessPointArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "EfsAccessPointE419FED9" - } - ] - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "elasticfilesystem:ClientWrite", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":file-system/", - { - "Ref": "Efs9E8BF36B" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "Roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - }, - "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0" - ] - }, - "MyLambdaSecurityGroup1E71A818": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function awscdklambda1MyLambda82056696", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0" - ] - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "FileSystemConfigs": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "EfsAccessPointE419FED9" - } - ] - ] - }, - "LocalMountPath": "/mnt/msg" - } - ], - "Handler": "index.lambda_handler", - "Runtime": "python3.7", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyLambdaSecurityGroup1E71A818", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "DependsOn": [ - "EfsEfsMountTarget195B2DD2E", - "EfsEfsMountTarget2315C927F", - "EfsEfsMountTarget36646B9A0", - "EfsEfsSecurityGroupfromawscdklambda1MyLambdaSecurityGroup86B085EE20490D9864A8", - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" - ] - }, - "securityGroupfromawscdklambda1MyLambda2SecurityGroup7492F70D20498301D9D2": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdklambda1MyLambda2SecurityGroup7492F70D:2049", - "FromPort": 2049, - "GroupId": { - "Fn::GetAtt": [ - "EfsEfsSecurityGroup6F40EA3B", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "MyLambda2SecurityGroup3C507954", - "GroupId" - ] - }, - "ToPort": 2049 - } - }, - "MyLambda2ServiceRoleD09B370C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - }, - "DependsOn": [ - "MyLambdaCCE802FB", - "MyLambdaSecurityGroup1E71A818", - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambda2ServiceRoleDefaultPolicy2BECE79D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "elasticfilesystem:ClientMount", - "Condition": { - "StringEquals": { - "elasticfilesystem:AccessPointArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "EfsAccessPointE419FED9" - } - ] - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "elasticfilesystem:ClientWrite", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":file-system/", - { - "Ref": "Efs9E8BF36B" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambda2ServiceRoleDefaultPolicy2BECE79D", - "Roles": [ - { - "Ref": "MyLambda2ServiceRoleD09B370C" - } - ] - }, - "DependsOn": [ - "MyLambdaCCE802FB", - "MyLambdaSecurityGroup1E71A818", - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambda2SecurityGroup3C507954": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function awscdklambda1MyLambda232FB7CD2", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "DependsOn": [ - "MyLambdaCCE802FB", - "MyLambdaSecurityGroup1E71A818", - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6" - ] - }, - "MyLambda2254B54D5": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\nimport json\nimport os\nimport string\nimport random\nimport datetime\n\nMSG_FILE_PATH = '/mnt/msg/content'\n\ndef randomString(stringLength=10):\n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(stringLength))\n\ndef lambda_handler(event, context):\n with open(MSG_FILE_PATH, 'a') as f:\n f.write(f\"{datetime.datetime.utcnow():%Y-%m-%d-%H:%M:%S} \" + randomString(5) + ' ')\n\n file = open(MSG_FILE_PATH, \"r\")\n file_content = file.read()\n file.close()\n\n return {\n 'statusCode': 200,\n 'body': str(file_content)\n }\n" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambda2ServiceRoleD09B370C", - "Arn" - ] - }, - "FileSystemConfigs": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "EfsAccessPointE419FED9" - } - ] - ] - }, - "LocalMountPath": "/mnt/msg" - } - ], - "Handler": "index.lambda_handler", - "Runtime": "python3.7", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyLambda2SecurityGroup3C507954", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "DependsOn": [ - "MyLambdaCCE802FB", - "MyLambdaSecurityGroup1E71A818", - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "MyLambdaServiceRole4539ECB6", - "MyLambda2ServiceRoleDefaultPolicy2BECE79D", - "MyLambda2ServiceRoleD09B370C", - "securityGroupfromawscdklambda1MyLambda2SecurityGroup7492F70D20498301D9D2" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.expected.json deleted file mode 100644 index 668799ec1d170..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.expected.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "Resources": { - "MyLambdaAliasPCEServiceRoleF7C9F212": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", - "Roles": [ - { - "Ref": "MyLambdaAliasPCEServiceRoleF7C9F212" - } - ] - } - }, - "MyLambdaAliasPCED0B8D751": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(\"Hello from CDK! with Alias Provisioned Concurrent Exec!\");}" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaAliasPCEServiceRoleF7C9F212", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", - "MyLambdaAliasPCEServiceRoleF7C9F212" - ] - }, - "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaAliasPCED0B8D751" - } - } - }, - "Alias325C5727": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaAliasPCED0B8D751" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c", - "Version" - ] - }, - "Name": "prod", - "ProvisionedConcurrencyConfig": { - "ProvisionedConcurrentExecutions": 5 - } - } - }, - "AliasAliasPermissionAF30F9E8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "Alias325C5727" - }, - "Principal": "cloudformation.amazonaws.com" - } - }, - "MyLambdaVersionPCEServiceRole2ACFB73E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", - "Roles": [ - { - "Ref": "MyLambdaVersionPCEServiceRole2ACFB73E" - } - ] - } - }, - "MyLambdaVersionPCEA3A0D86B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { console.log(\"Hello from CDK! with Version Provisioned Concurrent Exec!\");}" - }, - "Role": { - "Fn::GetAtt": [ - "MyLambdaVersionPCEServiceRole2ACFB73E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", - "MyLambdaVersionPCEServiceRole2ACFB73E" - ] - }, - "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaVersionPCEA3A0D86B" - }, - "ProvisionedConcurrencyConfig": { - "ProvisionedConcurrentExecutions": 5 - } - } - }, - "Alias29455D932": { - "Type": "AWS::Lambda::Alias", - "Properties": { - "FunctionName": { - "Ref": "MyLambdaVersionPCEA3A0D86B" - }, - "FunctionVersion": { - "Fn::GetAtt": [ - "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420", - "Version" - ] - }, - "Name": "prod" - } - }, - "Alias2AliasPermission2448514B6": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "Alias29455D932" - }, - "Principal": "cloudformation.amazonaws.com" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json deleted file mode 100644 index 0c6e5b2d4447a..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "Resources": { - "MyLayer38944FA5": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" - } - ] - } - ] - } - ] - ] - } - }, - "CompatibleRuntimes": [ - "nodejs14.x" - ], - "Description": "A layer to test the L2 construct", - "LicenseInfo": "Apache-2.0" - } - }, - "MyLayerremoteaccountgrant715E5D21": { - "Type": "AWS::Lambda::LayerVersionPermission", - "Properties": { - "Action": "lambda:GetLayerVersion", - "LayerVersionArn": { - "Ref": "MyLayer38944FA5" - }, - "Principal": { - "Ref": "AWS::AccountId" - } - } - }, - "MyLayeredLambdaServiceRole1A7DC118": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyLayeredLambda9A3008D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "MyLayeredLambdaServiceRole1A7DC118", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "MyLayer38944FA5" - } - ], - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyLayeredLambdaServiceRole1A7DC118" - ] - } - }, - "Parameters": { - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E": { - "Type": "String", - "Description": "S3 bucket for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B": { - "Type": "String", - "Description": "S3 key for asset version \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34ArtifactHash70E274C4": { - "Type": "String", - "Description": "Artifact hash for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json deleted file mode 100644 index 8aafc5fe25b04..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json +++ /dev/null @@ -1,347 +0,0 @@ -{ - "Resources": { - "OneWeekServiceRole05A6F9F8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "OneWeekFE56F6A4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(JSON.stringify(event));" - }, - "Role": { - "Fn::GetAtt": [ - "OneWeekServiceRole05A6F9F8", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "OneWeekServiceRole05A6F9F8" - ] - }, - "OneWeekLogRetention8E8911C1": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "OneWeekFE56F6A4" - } - ] - ] - }, - "RetentionInDays": 7 - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteRetentionPolicy", - "logs:PutRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs14.x", - "Code": { - "S3Bucket": { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - }, - "OneMonthServiceRoleFBD1064F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "OneMonth64E966BF": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(JSON.stringify(event));" - }, - "Role": { - "Fn::GetAtt": [ - "OneMonthServiceRoleFBD1064F", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "OneMonthServiceRoleFBD1064F" - ] - }, - "OneMonthLogRetention814A40D9": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "OneMonth64E966BF" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "OneYearServiceRole24D47762": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "OneYearA82EBDA9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(JSON.stringify(event));" - }, - "Role": { - "Fn::GetAtt": [ - "OneYearServiceRole24D47762", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "OneYearServiceRole24D47762" - ] - }, - "OneYearLogRetentionBD83A067": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "OneYearA82EBDA9" - } - ] - ] - }, - "RetentionInDays": 365 - } - } - }, - "Parameters": { - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B": { - "Type": "String", - "Description": "S3 bucket for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332": { - "Type": "String", - "Description": "S3 key for asset version \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665ArtifactHashF4A1E70E": { - "Type": "String", - "Description": "Artifact hash for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.expected.json deleted file mode 100644 index ccc1856ef6196..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.expected.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "Resources": { - "NODEJS12XServiceRole59E71436": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "NODEJS12X8B8075A4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event) { return \"success\" }" - }, - "Role": { - "Fn::GetAtt": [ - "NODEJS12XServiceRole59E71436", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "NODEJS12XServiceRole59E71436" - ] - }, - "PYTHON36ServiceRole814B3AD9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PYTHON364935EF15": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "def handler(event, context):\n return \"success\"" - }, - "Role": { - "Fn::GetAtt": [ - "PYTHON36ServiceRole814B3AD9", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.6" - }, - "DependsOn": [ - "PYTHON36ServiceRole814B3AD9" - ] - }, - "PYTHON37ServiceRoleDE7E561E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PYTHON37D3A10E04": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "def handler(event, context):\n return \"success\"" - }, - "Role": { - "Fn::GetAtt": [ - "PYTHON37ServiceRoleDE7E561E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.7" - }, - "DependsOn": [ - "PYTHON37ServiceRoleDE7E561E" - ] - }, - "PYTHON38ServiceRole3EA86BBE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PYTHON38A180AE47": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "def handler(event, context):\n return \"success\"" - }, - "Role": { - "Fn::GetAtt": [ - "PYTHON38ServiceRole3EA86BBE", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.8" - }, - "DependsOn": [ - "PYTHON38ServiceRole3EA86BBE" - ] - }, - "PYTHON39ServiceRole53E964DF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "PYTHON39143BF976": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "def handler(event, context):\n return \"success\"" - }, - "Role": { - "Fn::GetAtt": [ - "PYTHON39ServiceRole53E964DF", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.9" - }, - "DependsOn": [ - "PYTHON39ServiceRole53E964DF" - ] - }, - "NODEJS14XServiceRole4523ECDB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "NODEJS14X930214A3": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event) { return \"success\" }" - }, - "Role": { - "Fn::GetAtt": [ - "NODEJS14XServiceRole4523ECDB", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "NODEJS14XServiceRole4523ECDB" - ] - } - }, - "Outputs": { - "NODEJS12XfunctionName": { - "Value": { - "Ref": "NODEJS12X8B8075A4" - } - }, - "PYTHON36functionName": { - "Value": { - "Ref": "PYTHON364935EF15" - } - }, - "PYTHON37functionName": { - "Value": { - "Ref": "PYTHON37D3A10E04" - } - }, - "PYTHON38functionName": { - "Value": { - "Ref": "PYTHON38A180AE47" - } - }, - "PYTHON39functionName": { - "Value": { - "Ref": "PYTHON39143BF976" - } - }, - "NODEJS14XfunctionName": { - "Value": { - "Ref": "NODEJS14X930214A3" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.expected.json deleted file mode 100644 index 5aab3b725a0e6..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.expected.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-lambda/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "MyLambdaServiceRole4539ECB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - } - }, - "MyLambdaSecurityGroup1E71A818": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function awscdkvpclambdaMyLambda057789B0", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "MyLambdaCCE802FB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "def main(event, context): pass" - }, - "Handler": "index.main", - "Role": { - "Fn::GetAtt": [ - "MyLambdaServiceRole4539ECB6", - "Arn" - ] - }, - "Runtime": "python3.6", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyLambdaSecurityGroup1E71A818", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "DependsOn": [ - "MyLambdaServiceRole4539ECB6" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.expected.json b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.expected.json deleted file mode 100644 index 95e3532d70b25..0000000000000 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.expected.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "Resources": { - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MetricFilter1B93B6E5": { - "Type": "AWS::Logs::MetricFilter", - "Properties": { - "FilterPattern": "{ $.latency = \"*\" }", - "LogGroupName": { - "Ref": "LogGroupF5B46931" - }, - "MetricTransformations": [ - { - "MetricName": "Latency", - "MetricNamespace": "MyApp", - "MetricValue": "$.latency" - } - ] - } - }, - "alarmfrommetricfilterF546D67D": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, - "MetricName": "Latency", - "Namespace": "MyApp", - "Period": 300, - "Statistic": "Average", - "Threshold": 100 - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.expected.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.expected.json deleted file mode 100644 index 8cfd7bb29711f..0000000000000 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.expected.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "Resources": { - "LogGroupF5B46931": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MetricFilter1B93B6E5": { - "Type": "AWS::Logs::MetricFilter", - "Properties": { - "FilterPattern": "{ $.latency = \"*\" }", - "LogGroupName": { - "Ref": "LogGroupF5B46931" - }, - "MetricTransformations": [ - { - "MetricName": "Latency", - "MetricNamespace": "MyApp", - "MetricValue": "$.latency" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.expected.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.expected.json deleted file mode 100644 index d7ef1ebc8825f..0000000000000 --- a/packages/@aws-cdk/aws-msk/test/integ.cluster.expected.json +++ /dev/null @@ -1,610 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-msk-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ClusterSecurityGroup0921994B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "MSK security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ClusterEB0386A7": { - "Type": "AWS::MSK::Cluster", - "Properties": { - "BrokerNodeGroupInfo": { - "ClientSubnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ], - "InstanceType": "kafka.m5.large", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "ClusterSecurityGroup0921994B", - "GroupId" - ] - } - ], - "StorageInfo": { - "EBSStorageInfo": { - "VolumeSize": 1000 - } - } - }, - "ClusterName": "integ-test", - "KafkaVersion": "2.8.1", - "NumberOfBrokerNodes": 2, - "EncryptionInfo": { - "EncryptionInTransit": { - "ClientBroker": "TLS", - "InCluster": true - } - }, - "LoggingInfo": { - "BrokerLogs": { - "CloudWatchLogs": { - "Enabled": false - }, - "Firehose": { - "Enabled": false - }, - "S3": { - "Enabled": false - } - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterBootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy13FC2126": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "kafka:GetBootstrapBrokers", - "Effect": "Allow", - "Resource": { - "Ref": "ClusterEB0386A7" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterBootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy13FC2126", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "ClusterBootstrapBrokersBootstrapBrokerStringTls2E6167B7": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"", - { - "Ref": "ClusterEB0386A7" - }, - "\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"", - { - "Ref": "ClusterEB0386A7" - }, - "\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "ClusterBootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy13FC2126" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - }, - "Outputs": { - "BootstrapBrokers": { - "Value": { - "Fn::GetAtt": [ - "ClusterBootstrapBrokersBootstrapBrokerStringTls2E6167B7", - "BootstrapBrokerStringTls" - ] - } - }, - "BootstrapBrokers2": { - "Value": { - "Fn::GetAtt": [ - "ClusterBootstrapBrokersBootstrapBrokerStringTls2E6167B7", - "BootstrapBrokerStringTls" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune/test/integ.cluster.expected.json b/packages/@aws-cdk/aws-neptune/test/integ.cluster.expected.json deleted file mode 100644 index 36a69ceec62c9..0000000000000 --- a/packages/@aws-cdk/aws-neptune/test/integ.cluster.expected.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ParamsA8366201": { - "Type": "AWS::Neptune::DBClusterParameterGroup", - "Properties": { - "Description": "A nice parameter group", - "Family": "neptune1", - "Parameters": { - "neptune_enable_audit_log": "1", - "neptune_query_timeout": "100000" - } - } - }, - "DbSecurity381C2C15": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSubnets3C9252C9": { - "Type": "AWS::Neptune::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Neptune security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseSecurityGroupfrom00000IndirectPortF24F2E03": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "Open to the world", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Port" - ] - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::Neptune::DBCluster", - "Properties": { - "DBClusterParameterGroupName": { - "Ref": "ParamsA8366201" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets3C9252C9" - }, - "KmsKeyId": { - "Fn::GetAtt": [ - "DbSecurity381C2C15", - "Arn" - ] - }, - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::Neptune::DBInstance", - "Properties": { - "DBInstanceClass": "db.r5.large", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "AutoMinorVersionUpgrade": true - }, - "DependsOn": [ - "VPCPrivateSubnet1DefaultRouteAE1D6490", - "VPCPrivateSubnet2DefaultRouteF4F5CFD2" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.advancedsecurity.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.advancedsecurity.expected.json deleted file mode 100644 index 5b80dc6907424..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.advancedsecurity.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Resources": { - "User00B015A1": { - "Type": "AWS::IAM::User" - }, - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "MasterUserOptions": { - "MasterUserARN": { - "Fn::GetAtt": [ - "User00B015A1", - "Arn" - ] - } - }, - "InternalUserDatabaseEnabled": false - }, - "ClusterConfig": { - "InstanceCount": 1, - "DedicatedMasterEnabled": false, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeType": "gp2", - "VolumeSize": 10 - }, - "EncryptionAtRestOptions": { - "Enabled": true - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.custom-kms-key.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.custom-kms-key.expected.json deleted file mode 100644 index 085298946af5d..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.custom-kms-key.expected.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "Resources": { - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "ClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "EncryptionAtRestOptions": { - "Enabled": true, - "KmsKeyId": { - "Ref": "Key961B73FD" - } - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": false - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DomainAccessPolicyCustomResourcePolicyE61F1845": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DomainAccessPolicyCustomResourcePolicyE61F1845", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "DomainAccessPolicyEE735B04": { - "Type": "Custom::OpenSearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "DomainAccessPolicyCustomResourcePolicyE61F1845" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "kms:CreateGrant", - "kms:Describe*", - "kms:List*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleDefaultPolicyD28E1A5E", - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.expected.json deleted file mode 100644 index 50228805f44ea..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.expected.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "Resources": { - "Domain1SlowSearchLogs8F3B0506": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain1AppLogs6E8D1D67": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fcCustomResourcePolicyBE9BFE5D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fcCustomResourcePolicyBE9BFE5D", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc3D726D58": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fcCustomResourcePolicyBE9BFE5D" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain19FCBCB91": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "AdvancedOptions": { - "rest.action.multi.allow_explicit_index": "false", - "indices.fielddata.cache.size": "25", - "indices.query.bool.max_clause_count": "2048" - }, - "ClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "EncryptionAtRestOptions": { - "Enabled": true - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": { - "ES_APPLICATION_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain1AppLogs6E8D1D67", - "Arn" - ] - }, - "Enabled": true - }, - "SEARCH_SLOW_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain1SlowSearchLogs8F3B0506", - "Arn" - ] - }, - "Enabled": true - } - }, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "DependsOn": [ - "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fcCustomResourcePolicyBE9BFE5D", - "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc3D726D58" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain1AccessPolicyCustomResourcePolicy3BA04487": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain19FCBCB91", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain1AccessPolicyCustomResourcePolicy3BA04487", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain1AccessPolicy1FDDB3CF": { - "Type": "Custom::OpenSearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain19FCBCB91" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain1AccessPolicyCustomResourcePolicy3BA04487" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "Domain2SlowSearchLogs0C75F64B": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain2AppLogs810876E2": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 30 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02CustomResourcePolicy2DB46870": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02CustomResourcePolicy2DB46870", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca0286FF1B15": { - "Type": "Custom::CloudwatchLogResourcePolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"CloudWatchLogs\",\"action\":\"putResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\",\"policyDocument\":\"{\\\"Statement\\\":[{\\\"Action\\\":[\\\"logs:PutLogEvents\\\",\\\"logs:CreateLogStream\\\"],\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"es.amazonaws.com\\\"},\\\"Resource\\\":[\\\"", - { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "\\\",\\\"", - { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"physicalResourceId\":{\"id\":\"ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\"}}" - ] - ] - }, - "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\"},\"ignoreErrorCodesMatching\":\"400\"}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02CustomResourcePolicy2DB46870" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain2644FE48C": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "AdvancedOptions": { - "rest.action.multi.allow_explicit_index": "false", - "indices.fielddata.cache.size": "25", - "indices.query.bool.max_clause_count": "2048" - }, - "ClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "EncryptionAtRestOptions": { - "Enabled": true - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": { - "ES_APPLICATION_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain2AppLogs810876E2", - "Arn" - ] - }, - "Enabled": true - }, - "SEARCH_SLOW_LOGS": { - "CloudWatchLogsLogGroupArn": { - "Fn::GetAtt": [ - "Domain2SlowSearchLogs0C75F64B", - "Arn" - ] - }, - "Enabled": true - } - }, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "DependsOn": [ - "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02CustomResourcePolicy2DB46870", - "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca0286FF1B15" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain2AccessPolicyCustomResourcePolicy7C8260FD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain2644FE48C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Domain2AccessPolicyCustomResourcePolicy7C8260FD", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Domain2AccessPolicyB81CB6CE": { - "Type": "Custom::OpenSearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain2644FE48C" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain2644FE48C" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain2644FE48C" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root\\\"},\\\"Resource\\\":\\\"*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain2644FE48C" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "Domain2AccessPolicyCustomResourcePolicy7C8260FD" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.ultrawarm.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.ultrawarm.expected.json deleted file mode 100644 index b41dbfb657b05..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.ultrawarm.expected.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "ClusterConfig": { - "InstanceCount": 1, - "WarmEnabled": true, - "WarmCount": 2, - "DedicatedMasterEnabled": true, - "DedicatedMasterCount": 2, - "InstanceType": "r5.large.search", - "WarmType": "ultrawarm1.medium.search", - "ZoneAwarenessEnabled": false, - "DedicatedMasterType": "r5.large.search" - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeType": "gp2", - "VolumeSize": 10 - }, - "EncryptionAtRestOptions": { - "Enabled": false - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": false - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.expected.json deleted file mode 100644 index e5b8703ab4b90..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.expected.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "Resources": { - "DomainMasterUserBFAFA7D9": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "ExcludeCharacters": "{}'\\*[]()`", - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "AdvancedSecurityOptions": { - "Enabled": true, - "InternalUserDatabaseEnabled": true, - "MasterUserOptions": { - "MasterUserName": "admin", - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DomainMasterUserBFAFA7D9" - }, - ":SecretString:password::}}" - ] - ] - } - } - }, - "ClusterConfig": { - "DedicatedMasterEnabled": false, - "InstanceCount": 1, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": false - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": true, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeSize": 10, - "VolumeType": "gp2" - }, - "EncryptionAtRestOptions": { - "Enabled": true - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": true - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DomainAccessPolicyCustomResourcePolicyE61F1845": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "es:UpdateDomainConfig", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DomainAccessPolicyCustomResourcePolicyE61F1845", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "DomainAccessPolicyEE735B04": { - "Type": "Custom::OpenSearchAccessPolicy", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"action\":\"updateDomainConfig\",\"service\":\"OpenSearch\",\"parameters\":{\"DomainName\":\"", - { - "Ref": "Domain66AC69E0" - }, - "\",\"AccessPolicies\":\"{\\\"Statement\\\":[{\\\"Action\\\":\\\"es:ESHttp*\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Resource\\\":\\\"", - { - "Fn::GetAtt": [ - "Domain66AC69E0", - "Arn" - ] - }, - "/*\\\"}],\\\"Version\\\":\\\"2012-10-17\\\"}\"},\"outputPaths\":[\"DomainConfig.AccessPolicies\"],\"physicalResourceId\":{\"id\":\"", - { - "Ref": "Domain66AC69E0" - }, - "AccessPolicy\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "DomainAccessPolicyCustomResourcePolicyE61F1845" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.vpc.expected.json b/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.vpc.expected.json deleted file mode 100644 index 0f3f524059ab4..0000000000000 --- a/packages/@aws-cdk/aws-opensearchservice/test/integ.opensearch.vpc.expected.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-integ-opensearch-vpc/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "DomainSecurityGroup48AA5FD6": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for domain Domain", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "Domain66AC69E0": { - "Type": "AWS::OpenSearchService::Domain", - "Properties": { - "ClusterConfig": { - "InstanceCount": 2, - "DedicatedMasterEnabled": false, - "ZoneAwarenessConfig": { - "AvailabilityZoneCount": 2 - }, - "InstanceType": "r5.large.search", - "ZoneAwarenessEnabled": true - }, - "CognitoOptions": { - "Enabled": false - }, - "DomainEndpointOptions": { - "EnforceHTTPS": false, - "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" - }, - "EBSOptions": { - "EBSEnabled": true, - "VolumeType": "gp2", - "VolumeSize": 10 - }, - "EncryptionAtRestOptions": { - "Enabled": false - }, - "EngineVersion": "Elasticsearch_7.1", - "LogPublishingOptions": {}, - "NodeToNodeEncryptionOptions": { - "Enabled": false - }, - "VPCOptions": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DomainSecurityGroup48AA5FD6", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster-rotation.lit.expected.json b/packages/@aws-cdk/aws-rds/test/integ.cluster-rotation.lit.expected.json deleted file mode 100644 index 30db89af96b49..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.cluster-rotation.lit.expected.json +++ /dev/null @@ -1,856 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-cluster-rotation/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "DatabaseSubnets56F17B9A": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "RDS security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseSecurityGroupfromawscdkrdsclusterrotationDatabaseRotationSingleUserSecurityGroup0FFF34B1IndirectPortE6A88723": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkrdsclusterrotationDatabaseRotationSingleUserSecurityGroup0FFF34B1:{IndirectPort}", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUserSecurityGroupAC6E0E73", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - } - } - }, - "DatabaseSecret3B817195": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSecretAttachmentE5D1B020": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "DatabaseSecret3B817195" - }, - "TargetId": { - "Ref": "DatabaseB269D8BB" - }, - "TargetType": "AWS::RDS::DBCluster" - } - }, - "DatabaseSecretAttachmentRotationScheduleA4E9F034": { - "Type": "AWS::SecretsManager::RotationSchedule", - "Properties": { - "SecretId": { - "Ref": "DatabaseSecretAttachmentE5D1B020" - }, - "RotationLambdaARN": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUser65F55654", - "Outputs.RotationLambdaARN" - ] - }, - "RotationRules": { - "AutomaticallyAfterDays": 30 - } - } - }, - "DatabaseSecretAttachmentPolicy5ACFE6CA": { - "Type": "AWS::SecretsManager::ResourcePolicy", - "Properties": { - "ResourcePolicy": { - "Statement": [ - { - "Action": "secretsmanager:DeleteSecret", - "Effect": "Deny", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "SecretId": { - "Ref": "DatabaseSecretAttachmentE5D1B020" - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::RDS::DBCluster", - "Properties": { - "Engine": "aurora", - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:password::}}" - ] - ] - }, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora" - }, - "DependsOn": [ - "VPCPrivateSubnet1DefaultRouteAE1D6490", - "VPCPrivateSubnet2DefaultRouteF4F5CFD2", - "VPCPrivateSubnet3DefaultRoute27F311AE" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance2AA380DEE": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora" - }, - "DependsOn": [ - "VPCPrivateSubnet1DefaultRouteAE1D6490", - "VPCPrivateSubnet2DefaultRouteF4F5CFD2", - "VPCPrivateSubnet3DefaultRoute27F311AE" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseRotationSingleUserSecurityGroupAC6E0E73": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-rds-cluster-rotation/Database/RotationSingleUser/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseRotationSingleUser65F55654": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": { - "Fn::FindInMap": [ - "DatabaseRotationSingleUserSARMapping9AEB3E55", - { - "Ref": "AWS::Partition" - }, - "applicationId" - ] - }, - "SemanticVersion": { - "Fn::FindInMap": [ - "DatabaseRotationSingleUserSARMapping9AEB3E55", - { - "Ref": "AWS::Partition" - }, - "semanticVersion" - ] - } - }, - "Parameters": { - "endpoint": { - "Fn::Join": [ - "", - [ - "https://secretsmanager.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - }, - "functionName": "awscdkrdsclusterrotationDatabaseRotationSingleUser171A8E3A", - "vpcSubnetIds": { - "Fn::Join": [ - "", - [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - ",", - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - ",", - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ] - ] - }, - "vpcSecurityGroupIds": { - "Fn::GetAtt": [ - "DatabaseRotationSingleUserSecurityGroupAC6E0E73", - "GroupId" - ] - }, - "excludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\" - } - } - } - }, - "Mappings": { - "DatabaseRotationSingleUserSARMapping9AEB3E55": { - "aws": { - "applicationId": "arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSMySQLRotationSingleUser", - "semanticVersion": "1.1.225" - }, - "aws-cn": { - "applicationId": "arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerRDSMySQLRotationSingleUser", - "semanticVersion": "1.1.37" - }, - "aws-us-gov": { - "applicationId": "arn:aws-us-gov:serverlessrepo:us-gov-west-1:023102451235:applications/SecretsManagerRDSMySQLRotationSingleUser", - "semanticVersion": "1.1.93" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster-s3.expected.json b/packages/@aws-cdk/aws-rds/test/integ.cluster-s3.expected.json deleted file mode 100644 index 3f138a90f511b..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.cluster-s3.expected.json +++ /dev/null @@ -1,704 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-s3-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "DbSecurity381C2C15": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ImportBucketBAF3A8E9": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "ExportBucket4E99310E": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DatabaseSubnets56F17B9A": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "RDS security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseSecurityGroupfrom00000IndirectPortF24F2E03": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "Open to the world", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - } - } - }, - "DatabaseS3ImportRole377BC9C0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DatabaseS3ImportRoleDefaultPolicyA60A7342": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DatabaseS3ImportRoleDefaultPolicyA60A7342", - "Roles": [ - { - "Ref": "DatabaseS3ImportRole377BC9C0" - } - ] - } - }, - "DatabaseS3ExportRole9E328562": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DatabaseS3ExportRoleDefaultPolicy8FEADB68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DatabaseS3ExportRoleDefaultPolicy8FEADB68", - "Roles": [ - { - "Ref": "DatabaseS3ExportRole9E328562" - } - ] - } - }, - "DatabaseClusterParameterGroupF2A52087": { - "Type": "AWS::RDS::DBClusterParameterGroup", - "Properties": { - "Description": "Cluster parameter group for aurora5.6", - "Family": "aurora5.6", - "Parameters": { - "aurora_load_from_s3_role": { - "Fn::GetAtt": [ - "DatabaseS3ImportRole377BC9C0", - "Arn" - ] - }, - "aurora_select_into_s3_role": { - "Fn::GetAtt": [ - "DatabaseS3ExportRole9E328562", - "Arn" - ] - } - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::RDS::DBCluster", - "Properties": { - "Engine": "aurora", - "AssociatedRoles": [ - { - "RoleArn": { - "Fn::GetAtt": [ - "DatabaseS3ImportRole377BC9C0", - "Arn" - ] - } - }, - { - "RoleArn": { - "Fn::GetAtt": [ - "DatabaseS3ExportRole9E328562", - "Arn" - ] - } - } - ], - "CopyTagsToSnapshot": true, - "DBClusterParameterGroupName": { - "Ref": "DatabaseClusterParameterGroupF2A52087" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "KmsKeyId": { - "Fn::GetAtt": [ - "DbSecurity381C2C15", - "Arn" - ] - }, - "MasterUsername": "admin", - "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora", - "PubliclyAccessible": true - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance2AA380DEE": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora", - "PubliclyAccessible": true - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.expected.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.expected.json deleted file mode 100644 index 553bcf398af92..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.cluster.expected.json +++ /dev/null @@ -1,532 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ParamsA8366201": { - "Type": "AWS::RDS::DBClusterParameterGroup", - "Properties": { - "Description": "A nice parameter group", - "Family": "aurora5.6", - "Parameters": { - "character_set_database": "utf8mb4" - } - } - }, - "DbSecurity381C2C15": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DatabaseSubnets56F17B9A": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnets for Database database", - "SubnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "RDS security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseSecurityGroupfrom00000IndirectPortF24F2E03": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "Open to the world", - "FromPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "DatabaseB269D8BB", - "Endpoint.Port" - ] - } - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::RDS::DBCluster", - "Properties": { - "Engine": "aurora", - "CopyTagsToSnapshot": true, - "DBClusterParameterGroupName": { - "Ref": "ParamsA8366201" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "KmsKeyId": { - "Fn::GetAtt": [ - "DbSecurity381C2C15", - "Arn" - ] - }, - "MasterUsername": "admin", - "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "DatabaseInstance1844F58FD": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora", - "PubliclyAccessible": true - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseInstance2AA380DEE": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "DBClusterIdentifier": { - "Ref": "DatabaseB269D8BB" - }, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnets56F17B9A" - }, - "Engine": "aurora", - "PubliclyAccessible": true - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json deleted file mode 100644 index 219202e5fa587..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.instance-from-generated-password.expected.json +++ /dev/null @@ -1,628 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-fixed-username/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "InstanceSubnetGroupF2CBA54F": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for Instance database", - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - } - }, - "InstanceSecurityGroupB4E5FA83": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for Instance database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": "!&*^#@()", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InstanceSecretAttachment83BEE581": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de" - }, - "TargetId": { - "Ref": "InstanceC1063A87" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "InstanceC1063A87": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "AllocatedStorage": "100", - "BackupRetentionPeriod": 0, - "CopyTagsToSnapshot": true, - "DBName": "CDKDB", - "DBSubnetGroupName": { - "Ref": "InstanceSubnetGroupF2CBA54F" - }, - "DeleteAutomatedBackups": true, - "Engine": "mysql", - "EngineVersion": "8.0.21", - "MasterUsername": "admin", - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "awscdkrdsfixedusernameInstanceSecretADA7FA0A0ae21a5e1432db367b627106107972de" - }, - ":SecretString:password::}}" - ] - ] - }, - "StorageEncrypted": true, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "InstanceSecurityGroupB4E5FA83", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance-s3-postgres.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance-s3-postgres.expected.json deleted file mode 100644 index b625e5f5de352..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.instance-s3-postgres.expected.json +++ /dev/null @@ -1,607 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-postgres-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ImportBucketBAF3A8E9": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ExportBucket4E99310E": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InstanceSubnetGroupF2CBA54F": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for Instance database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "InstanceSecurityGroupB4E5FA83": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for Instance database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InstanceS3ImportRole30959D06": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "InstanceS3ImportRoleDefaultPolicy297F292A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "InstanceS3ImportRoleDefaultPolicy297F292A", - "Roles": [ - { - "Ref": "InstanceS3ImportRole30959D06" - } - ] - } - }, - "InstanceS3ExportRole9891C2F7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "InstanceS3ExportRoleDefaultPolicy62C930BC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "InstanceS3ExportRoleDefaultPolicy62C930BC", - "Roles": [ - { - "Ref": "InstanceS3ExportRole9891C2F7" - } - ] - } - }, - "InstanceSecret478E0A47": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"postgres\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InstanceSecretAttachment83BEE581": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "InstanceSecret478E0A47" - }, - "TargetId": { - "Ref": "InstanceC1063A87" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "InstanceC1063A87": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.m5.large", - "AllocatedStorage": "100", - "AssociatedRoles": [ - { - "FeatureName": "s3Import", - "RoleArn": { - "Fn::GetAtt": [ - "InstanceS3ImportRole30959D06", - "Arn" - ] - } - }, - { - "FeatureName": "s3Export", - "RoleArn": { - "Fn::GetAtt": [ - "InstanceS3ExportRole9891C2F7", - "Arn" - ] - } - } - ], - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "InstanceSubnetGroupF2CBA54F" - }, - "EnableIAMDatabaseAuthentication": true, - "Engine": "postgres", - "EngineVersion": "11.12", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "InstanceSecret478E0A47" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "InstanceSecret478E0A47" - }, - ":SecretString:password::}}" - ] - ] - }, - "MultiAZ": false, - "PubliclyAccessible": true, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "InstanceSecurityGroupB4E5FA83", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance-s3.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance-s3.expected.json deleted file mode 100644 index 2a725ac4b7a54..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.instance-s3.expected.json +++ /dev/null @@ -1,622 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance-s3-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ImportBucketBAF3A8E9": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ExportBucket4E99310E": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSubnetGroup7D60F180": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for Database database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "DatabaseSecurityGroup5C91FDCB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for Database database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "DatabaseS3ImportRole377BC9C0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "DatabaseS3ImportRoleDefaultPolicyA60A7342": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ImportBucketBAF3A8E9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ExportBucket4E99310E", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DatabaseS3ImportRoleDefaultPolicyA60A7342", - "Roles": [ - { - "Ref": "DatabaseS3ImportRole377BC9C0" - } - ] - } - }, - "DatabaseInstanceOptionGroupDA39E317": { - "Type": "AWS::RDS::OptionGroup", - "Properties": { - "EngineName": "sqlserver-se", - "MajorEngineVersion": "14.00", - "OptionConfigurations": [ - { - "OptionName": "SQLSERVER_BACKUP_RESTORE", - "OptionSettings": [ - { - "Name": "IAM_ROLE_ARN", - "Value": { - "Fn::GetAtt": [ - "DatabaseS3ImportRole377BC9C0", - "Arn" - ] - } - } - ] - } - ], - "OptionGroupDescription": "Option group for sqlserver-se 14.00" - } - }, - "DatabaseSecret3B817195": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DatabaseSecretAttachmentE5D1B020": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "DatabaseSecret3B817195" - }, - "TargetId": { - "Ref": "DatabaseB269D8BB" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "DatabaseB269D8BB": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.m5.large", - "AllocatedStorage": "100", - "AssociatedRoles": [ - { - "FeatureName": "S3_INTEGRATION", - "RoleArn": { - "Fn::GetAtt": [ - "DatabaseS3ImportRole377BC9C0", - "Arn" - ] - } - } - ], - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "DatabaseSubnetGroup7D60F180" - }, - "Engine": "sqlserver-se", - "EngineVersion": "14.00", - "LicenseModel": "license-included", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "DatabaseSecret3B817195" - }, - ":SecretString:password::}}" - ] - ] - }, - "OptionGroupName": { - "Ref": "DatabaseInstanceOptionGroupDA39E317" - }, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "DatabaseSecurityGroup5C91FDCB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json deleted file mode 100644 index ccded802da6f0..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json +++ /dev/null @@ -1,1160 +0,0 @@ -{ - "Transform": "AWS::Serverless-2016-10-31", - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-rds-instance/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-rds-instance/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-rds-instance/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-rds-instance/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-instance/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "ParameterGroup5E32DECB": { - "Type": "AWS::RDS::DBParameterGroup", - "Properties": { - "Description": "Parameter group for oracle-se2-19", - "Family": "oracle-se2-19", - "Parameters": { - "open_cursors": "2500" - } - } - }, - "OptionGroupSecurityGroupOEM7E39FD8C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for OEM option", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:1158", - "FromPort": 1158, - "IpProtocol": "tcp", - "ToPort": 1158 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "OptionGroupACA43DC1": { - "Type": "AWS::RDS::OptionGroup", - "Properties": { - "EngineName": "oracle-se2", - "MajorEngineVersion": "19", - "OptionConfigurations": [ - { - "OptionName": "LOCATOR" - }, - { - "OptionName": "OEM", - "Port": 1158, - "VpcSecurityGroupMemberships": [ - { - "Fn::GetAtt": [ - "OptionGroupSecurityGroupOEM7E39FD8C", - "GroupId" - ] - } - ] - } - ], - "OptionGroupDescription": "Option group for oracle-se2 19" - } - }, - "InstanceSubnetGroupF2CBA54F": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for Instance database", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - } - }, - "InstanceSecurityGroupB4E5FA83": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for Instance database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InstanceSecurityGroupfrom00000IndirectPort7D6BC055": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "from 0.0.0.0/0:{IndirectPort}", - "FromPort": { - "Fn::GetAtt": [ - "InstanceC1063A87", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "InstanceSecurityGroupB4E5FA83", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "InstanceC1063A87", - "Endpoint.Port" - ] - } - } - }, - "InstanceSecurityGroupfromawscdkrdsinstanceInstanceRotationSingleUserSecurityGroupE959D912IndirectPortFF39F421": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from awscdkrdsinstanceInstanceRotationSingleUserSecurityGroupE959D912:{IndirectPort}", - "FromPort": { - "Fn::GetAtt": [ - "InstanceC1063A87", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "InstanceSecurityGroupB4E5FA83", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "InstanceRotationSingleUserSecurityGroupF3FB5C25", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "InstanceC1063A87", - "Endpoint.Port" - ] - } - } - }, - "InstanceMonitoringRole3E2B4286": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "monitoring.rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole" - ] - ] - } - ] - } - }, - "InstanceSecret478E0A47": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"syscdk\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InstanceSecretAttachment83BEE581": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "InstanceSecret478E0A47" - }, - "TargetId": { - "Ref": "InstanceC1063A87" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "InstanceSecretAttachmentRotationScheduleCC555119": { - "Type": "AWS::SecretsManager::RotationSchedule", - "Properties": { - "SecretId": { - "Ref": "InstanceSecretAttachment83BEE581" - }, - "RotationLambdaARN": { - "Fn::GetAtt": [ - "InstanceRotationSingleUser90E8AB49", - "Outputs.RotationLambdaARN" - ] - }, - "RotationRules": { - "AutomaticallyAfterDays": 30 - } - } - }, - "InstanceSecretAttachmentPolicy60A8B8DE": { - "Type": "AWS::SecretsManager::ResourcePolicy", - "Properties": { - "ResourcePolicy": { - "Statement": [ - { - "Action": "secretsmanager:DeleteSecret", - "Effect": "Deny", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "SecretId": { - "Ref": "InstanceSecretAttachment83BEE581" - } - } - }, - "InstanceC1063A87": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.medium", - "AllocatedStorage": "100", - "AutoMinorVersionUpgrade": true, - "BackupRetentionPeriod": 7, - "CopyTagsToSnapshot": true, - "DBName": "ORCL", - "DBParameterGroupName": { - "Ref": "ParameterGroup5E32DECB" - }, - "DBSubnetGroupName": { - "Ref": "InstanceSubnetGroupF2CBA54F" - }, - "EnableCloudwatchLogsExports": [ - "trace", - "audit", - "alert", - "listener" - ], - "EnablePerformanceInsights": true, - "Engine": "oracle-se2", - "EngineVersion": "19.0.0.0.ru-2020-04.rur-2020-04.r1", - "Iops": 1000, - "LicenseModel": "bring-your-own-license", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "InstanceSecret478E0A47" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "InstanceSecret478E0A47" - }, - ":SecretString:password::}}" - ] - ] - }, - "MonitoringInterval": 60, - "MonitoringRoleArn": { - "Fn::GetAtt": [ - "InstanceMonitoringRole3E2B4286", - "Arn" - ] - }, - "MultiAZ": true, - "OptionGroupName": { - "Ref": "OptionGroupACA43DC1" - }, - "PerformanceInsightsRetentionPeriod": 7, - "StorageEncrypted": true, - "StorageType": "io1", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "InstanceSecurityGroupB4E5FA83", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InstanceLogRetentiontrace487771C8": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/rds/instance/", - { - "Ref": "InstanceC1063A87" - }, - "/trace" - ] - ] - }, - "RetentionInDays": 30 - } - }, - "InstanceLogRetentionaudit55C07CF6": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/rds/instance/", - { - "Ref": "InstanceC1063A87" - }, - "/audit" - ] - ] - }, - "RetentionInDays": 30 - } - }, - "InstanceLogRetentionalert2B4B024B": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/rds/instance/", - { - "Ref": "InstanceC1063A87" - }, - "/alert" - ] - ] - }, - "RetentionInDays": 30 - } - }, - "InstanceLogRetentionlistener232E8C3C": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/rds/instance/", - { - "Ref": "InstanceC1063A87" - }, - "/listener" - ] - ] - }, - "RetentionInDays": 30 - } - }, - "InstanceRotationSingleUserSecurityGroupF3FB5C25": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-rds-instance/Instance/RotationSingleUser/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InstanceRotationSingleUser90E8AB49": { - "Type": "AWS::Serverless::Application", - "Properties": { - "Location": { - "ApplicationId": { - "Fn::FindInMap": [ - "InstanceRotationSingleUserSARMappingFEA0C86E", - { - "Ref": "AWS::Partition" - }, - "applicationId" - ] - }, - "SemanticVersion": { - "Fn::FindInMap": [ - "InstanceRotationSingleUserSARMappingFEA0C86E", - { - "Ref": "AWS::Partition" - }, - "semanticVersion" - ] - } - }, - "Parameters": { - "endpoint": { - "Fn::Join": [ - "", - [ - "https://secretsmanager.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - }, - "functionName": "awscdkrdsinstanceInstanceRotationSingleUserAFE3C214", - "vpcSubnetIds": { - "Fn::Join": [ - "", - [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - ",", - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - ] - ] - }, - "vpcSecurityGroupIds": { - "Fn::GetAtt": [ - "InstanceRotationSingleUserSecurityGroupF3FB5C25", - "GroupId" - ] - }, - "excludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\" - } - } - }, - "InstanceAvailabilityAD5D452C": { - "Type": "AWS::Events::Rule", - "Properties": { - "EventPattern": { - "source": [ - "aws.rds" - ], - "resources": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":db:", - { - "Ref": "InstanceC1063A87" - } - ] - ] - } - ], - "detail": { - "EventCategories": [ - "availability" - ] - } - }, - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - }, - "Id": "Target0" - } - ] - } - }, - "InstanceAvailabilityAllowEventRuleawscdkrdsinstanceFunctionD515EE1969208105": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - }, - "Principal": "events.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "InstanceAvailabilityAD5D452C", - "Arn" - ] - } - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteRetentionPolicy", - "logs:PutRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs14.x", - "Code": { - "S3Bucket": { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - }, - "HighCPU94686517": { - "Type": "AWS::CloudWatch::Alarm", - "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, - "Dimensions": [ - { - "Name": "DBInstanceIdentifier", - "Value": { - "Ref": "InstanceC1063A87" - } - } - ], - "MetricName": "CPUUtilization", - "Namespace": "AWS/RDS", - "Period": 300, - "Statistic": "Average", - "Threshold": 90 - } - }, - "FunctionServiceRole675BB04A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Function76856677": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = (event) => console.log(event);" - }, - "Role": { - "Fn::GetAtt": [ - "FunctionServiceRole675BB04A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "FunctionServiceRole675BB04A" - ] - } - }, - "Mappings": { - "InstanceRotationSingleUserSARMappingFEA0C86E": { - "aws": { - "applicationId": "arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSOracleRotationSingleUser", - "semanticVersion": "1.1.225" - }, - "aws-cn": { - "applicationId": "arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerRDSOracleRotationSingleUser", - "semanticVersion": "1.1.37" - }, - "aws-us-gov": { - "applicationId": "arn:aws-us-gov:serverlessrepo:us-gov-west-1:023102451235:applications/SecretsManagerRDSOracleRotationSingleUser", - "semanticVersion": "1.1.93" - } - } - }, - "Parameters": { - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3Bucket0D8A173B": { - "Type": "String", - "Description": "S3 bucket for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665S3VersionKeyE95BF332": { - "Type": "String", - "Description": "S3 key for asset version \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - }, - "AssetParameters22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665ArtifactHashF4A1E70E": { - "Type": "String", - "Description": "Artifact hash for asset \"22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json b/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json deleted file mode 100644 index 465915d69d202..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json +++ /dev/null @@ -1,620 +0,0 @@ -{ - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-rds-proxy/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-rds-proxy/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-proxy/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "dbInstanceSubnetGroupD062EC9E": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for dbInstance database", - "SubnetIds": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ] - } - }, - "dbInstanceSecurityGroupA58A00A3": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for dbInstance database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - } - }, - "dbInstanceSecurityGroupfromawscdkrdsproxydbProxyProxySecurityGroupA345AFE5IndirectPortE3621D4F": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "Allow connections to the database Instance from the Proxy", - "FromPort": { - "Fn::GetAtt": [ - "dbInstance4076B1EC", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "dbInstanceSecurityGroupA58A00A3", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "dbProxyProxySecurityGroup16E727A7", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "dbInstance4076B1EC", - "Endpoint.Port" - ] - } - } - }, - "dbInstanceSecret032D3661": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": "\"@/\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"master\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "dbInstanceSecretAttachment88CFBDAE": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "dbInstanceSecret032D3661" - }, - "TargetId": { - "Ref": "dbInstance4076B1EC" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "dbInstance4076B1EC": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.medium", - "AllocatedStorage": "100", - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "dbInstanceSubnetGroupD062EC9E" - }, - "Engine": "postgres", - "EngineVersion": "11.15", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "dbInstanceSecret032D3661" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "dbInstanceSecret032D3661" - }, - ":SecretString:password::}}" - ] - ] - }, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "dbInstanceSecurityGroupA58A00A3", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "dbProxyIAMRole662F3AB8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "dbProxyIAMRoleDefaultPolicy99AB98F3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": { - "Ref": "dbInstanceSecretAttachment88CFBDAE" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "dbProxyIAMRoleDefaultPolicy99AB98F3", - "Roles": [ - { - "Ref": "dbProxyIAMRole662F3AB8" - } - ] - } - }, - "dbProxyProxySecurityGroup16E727A7": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "SecurityGroup for Database Proxy", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - } - }, - "dbProxy3B89EAF2": { - "Type": "AWS::RDS::DBProxy", - "Properties": { - "Auth": [ - { - "AuthScheme": "SECRETS", - "IAMAuth": "DISABLED", - "SecretArn": { - "Ref": "dbInstanceSecretAttachment88CFBDAE" - } - } - ], - "DBProxyName": "dbProxy", - "EngineFamily": "POSTGRESQL", - "RoleArn": { - "Fn::GetAtt": [ - "dbProxyIAMRole662F3AB8", - "Arn" - ] - }, - "VpcSubnetIds": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ], - "RequireTLS": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "dbProxyProxySecurityGroup16E727A7", - "GroupId" - ] - } - ] - } - }, - "dbProxyProxyTargetGroup8DA26A77": { - "Type": "AWS::RDS::DBProxyTargetGroup", - "Properties": { - "DBProxyName": { - "Ref": "dbProxy3B89EAF2" - }, - "TargetGroupName": "default", - "ConnectionPoolConfigurationInfo": { - "ConnectionBorrowTimeout": 30, - "MaxConnectionsPercent": 50 - }, - "DBInstanceIdentifiers": [ - { - "Ref": "dbInstance4076B1EC" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.read-replica.expected.json b/packages/@aws-cdk/aws-rds/test/integ.read-replica.expected.json deleted file mode 100644 index 1d6b9bd4b18ce..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.read-replica.expected.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-rds-read-replica/Vpc" - } - ] - } - }, - "VpcisolatedSubnet1SubnetE62B1B9B": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "cdk-rds-read-replica/Vpc/isolatedSubnet1" - } - ] - } - }, - "VpcisolatedSubnet1RouteTableE442650B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-rds-read-replica/Vpc/isolatedSubnet1" - } - ] - } - }, - "VpcisolatedSubnet1RouteTableAssociationD259E31A": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcisolatedSubnet1RouteTableE442650B" - }, - "SubnetId": { - "Ref": "VpcisolatedSubnet1SubnetE62B1B9B" - } - } - }, - "VpcisolatedSubnet2Subnet39217055": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "isolated" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Isolated" - }, - { - "Key": "Name", - "Value": "cdk-rds-read-replica/Vpc/isolatedSubnet2" - } - ] - } - }, - "VpcisolatedSubnet2RouteTable334F9764": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-rds-read-replica/Vpc/isolatedSubnet2" - } - ] - } - }, - "VpcisolatedSubnet2RouteTableAssociation25A4716F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcisolatedSubnet2RouteTable334F9764" - }, - "SubnetId": { - "Ref": "VpcisolatedSubnet2Subnet39217055" - } - } - }, - "PostgresSourceSubnetGroupBEEB1740": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for PostgresSource database", - "SubnetIds": [ - { - "Ref": "VpcisolatedSubnet1SubnetE62B1B9B" - }, - { - "Ref": "VpcisolatedSubnet2Subnet39217055" - } - ] - } - }, - "PostgresSourceSecurityGroup69289E68": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for PostgresSource database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PostgresSourceSecret0A09A7AD": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"postgres\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PostgresSourceSecretAttachmentE3C3B705": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "PostgresSourceSecret0A09A7AD" - }, - "TargetId": { - "Ref": "PostgresSourceEB66BFC9" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "PostgresSourceEB66BFC9": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "AllocatedStorage": "100", - "BackupRetentionPeriod": 5, - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "PostgresSourceSubnetGroupBEEB1740" - }, - "Engine": "postgres", - "EngineVersion": "13", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "PostgresSourceSecret0A09A7AD" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "PostgresSourceSecret0A09A7AD" - }, - ":SecretString:password::}}" - ] - ] - }, - "PubliclyAccessible": false, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "PostgresSourceSecurityGroup69289E68", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "PostgresReplicaSubnetGroup301B59DA": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for PostgresReplica database", - "SubnetIds": [ - { - "Ref": "VpcisolatedSubnet1SubnetE62B1B9B" - }, - { - "Ref": "VpcisolatedSubnet2Subnet39217055" - } - ] - } - }, - "PostgresReplicaSecurityGroup5385C4C2": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for PostgresReplica database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PostgresReplica23A3C738": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "PostgresReplicaSubnetGroup301B59DA" - }, - "PubliclyAccessible": false, - "SourceDBInstanceIdentifier": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":db:", - { - "Ref": "PostgresSourceEB66BFC9" - } - ] - ] - }, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "PostgresReplicaSecurityGroup5385C4C2", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "MysqlSourceSubnetGroup213E979B": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for MysqlSource database", - "SubnetIds": [ - { - "Ref": "VpcisolatedSubnet1SubnetE62B1B9B" - }, - { - "Ref": "VpcisolatedSubnet2Subnet39217055" - } - ] - } - }, - "MysqlSourceSecurityGroupC691E169": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for MysqlSource database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "MysqlSourceSecretB727C3F2": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "Description": { - "Fn::Join": [ - "", - [ - "Generated by the CDK for stack: ", - { - "Ref": "AWS::StackName" - } - ] - ] - }, - "GenerateSecretString": { - "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MysqlSourceSecretAttachment5E4EDF73": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "MysqlSourceSecretB727C3F2" - }, - "TargetId": { - "Ref": "MysqlSource9A10350C" - }, - "TargetType": "AWS::RDS::DBInstance" - } - }, - "MysqlSource9A10350C": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "AllocatedStorage": "100", - "BackupRetentionPeriod": 5, - "CopyTagsToSnapshot": true, - "DBSubnetGroupName": { - "Ref": "MysqlSourceSubnetGroup213E979B" - }, - "Engine": "mysql", - "EngineVersion": "8.0", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "MysqlSourceSecretB727C3F2" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "MysqlSourceSecretB727C3F2" - }, - ":SecretString:password::}}" - ] - ] - }, - "PubliclyAccessible": false, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "MysqlSourceSecurityGroupC691E169", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - }, - "ReplicaParameterGroup4BE5EE70": { - "Type": "AWS::RDS::DBParameterGroup", - "Properties": { - "Description": "Parameter group for mysql8.0", - "Family": "mysql8.0", - "Parameters": { - "wait_timeout": "86400" - } - } - }, - "MysqlReplicaSubnetGroup79E1F72A": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "Subnet group for MysqlReplica database", - "SubnetIds": [ - { - "Ref": "VpcisolatedSubnet1SubnetE62B1B9B" - }, - { - "Ref": "VpcisolatedSubnet2Subnet39217055" - } - ] - } - }, - "MysqlReplicaSecurityGroup169FAFAA": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Security group for MysqlReplica database", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "MysqlReplica87D29F78": { - "Type": "AWS::RDS::DBInstance", - "Properties": { - "DBInstanceClass": "db.t3.small", - "BackupRetentionPeriod": 3, - "CopyTagsToSnapshot": true, - "DBParameterGroupName": { - "Ref": "ReplicaParameterGroup4BE5EE70" - }, - "DBSubnetGroupName": { - "Ref": "MysqlReplicaSubnetGroup79E1F72A" - }, - "PubliclyAccessible": false, - "SourceDBInstanceIdentifier": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":db:", - { - "Ref": "MysqlSource9A10350C" - } - ] - ] - }, - "StorageType": "gp2", - "VPCSecurityGroups": [ - { - "Fn::GetAtt": [ - "MysqlReplicaSecurityGroup169FAFAA", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster-no-vpc.expected.json b/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster-no-vpc.expected.json deleted file mode 100644 index 7d81d78c4e34f..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster-no-vpc.expected.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "Resources": { - "ServerlessDatabaseWithoutVPC93F9A752": { - "Type": "AWS::RDS::DBCluster", - "Properties": { - "Engine": "aurora-mysql", - "DBClusterParameterGroupName": "default.aurora-mysql5.7", - "EngineMode": "serverless", - "MasterUsername": "admin", - "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", - "StorageEncrypted": true, - "VpcSecurityGroupIds": [] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster.expected.json b/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster.expected.json deleted file mode 100644 index bf73e45641f66..0000000000000 --- a/packages/@aws-cdk/aws-rds/test/integ.serverless-cluster.expected.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-rds-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "SubnetGroup": { - "Type": "AWS::RDS::DBSubnetGroup", - "Properties": { - "DBSubnetGroupDescription": "My Subnet Group", - "SubnetIds": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "DBSubnetGroupName": "mynotlowercasesubnetgroupname" - } - }, - "ServerlessDatabaseSecurityGroup1E143FBB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "RDS security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "ServerlessDatabaseSecurityGroupfrom00000IndirectPortE0823E20": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "CidrIp": "0.0.0.0/0", - "Description": "Open to the world", - "FromPort": { - "Fn::GetAtt": [ - "ServerlessDatabaseDF340AE1", - "Endpoint.Port" - ] - }, - "GroupId": { - "Fn::GetAtt": [ - "ServerlessDatabaseSecurityGroup1E143FBB", - "GroupId" - ] - }, - "ToPort": { - "Fn::GetAtt": [ - "ServerlessDatabaseDF340AE1", - "Endpoint.Port" - ] - } - } - }, - "ServerlessDatabaseDF340AE1": { - "Type": "AWS::RDS::DBCluster", - "Properties": { - "Engine": "aurora-mysql", - "DBClusterParameterGroupName": "default.aurora-mysql5.7", - "DBSubnetGroupName": { - "Ref": "SubnetGroup" - }, - "EngineMode": "serverless", - "MasterUsername": "admin", - "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", - "StorageEncrypted": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "ServerlessDatabaseSecurityGroup1E143FBB", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.expected.json b/packages/@aws-cdk/aws-redshift/test/integ.database.expected.json deleted file mode 100644 index 096fb4b074160..0000000000000 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.expected.json +++ /dev/null @@ -1,1467 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.0.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.32.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.64.0/19", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "CidrBlock": "10.0.96.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "CidrBlock": "10.0.128.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "CidrBlock": "10.0.160.0/19", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "customkmskey377C6F9A": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterSubnetsDCFA5CB7": { - "Type": "AWS::Redshift::ClusterSubnetGroup", - "Properties": { - "Description": "Subnets for Cluster Redshift cluster", - "SubnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterSecurityGroup0921994B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Redshift security group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterSecret6368BD0F": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "ExcludeCharacters": "\"@/\\ '", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"admin\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterSecretAttachment769E6258": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "ClusterSecret6368BD0F" - }, - "TargetId": { - "Ref": "ClusterEB0386A7" - }, - "TargetType": "AWS::Redshift::Cluster" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterEB0386A7": { - "Type": "AWS::Redshift::Cluster", - "Properties": { - "ClusterType": "multi-node", - "DBName": "my_db", - "MasterUsername": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "ClusterSecret6368BD0F" - }, - ":SecretString:username::}}" - ] - ] - }, - "MasterUserPassword": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "ClusterSecret6368BD0F" - }, - ":SecretString:password::}}" - ] - ] - }, - "NodeType": "dc2.large", - "AllowVersionUpgrade": true, - "AutomatedSnapshotRetentionPeriod": 1, - "ClusterSubnetGroupName": { - "Ref": "ClusterSubnetsDCFA5CB7" - }, - "Encrypted": true, - "KmsKeyId": { - "Ref": "customkmskey377C6F9A" - }, - "NumberOfNodes": 2, - "PubliclyAccessible": true, - "VpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterSecurityGroup0921994B", - "GroupId" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserSecretE2C04A69": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "ExcludeCharacters": "\"@/\\ '", - "GenerateStringKey": "password", - "PasswordLength": 30, - "SecretStringTemplate": "{\"username\":\"awscdkredshiftclusterdatabaseuserc17d5ebd\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserSecretAttachment02022609": { - "Type": "AWS::SecretsManager::SecretTargetAttachment", - "Properties": { - "SecretId": { - "Ref": "UserSecretE2C04A69" - }, - "TargetId": { - "Ref": "ClusterEB0386A7" - }, - "TargetType": "AWS::Redshift::Cluster" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserProviderframeworkonEventServiceRole8FBA2FBD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F", - "Roles": [ - { - "Ref": "UserProviderframeworkonEventServiceRole8FBA2FBD" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserProviderframeworkonEvent4EC32885": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "UserProviderframeworkonEventServiceRole8FBA2FBD", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/Resource/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F", - "UserProviderframeworkonEventServiceRole8FBA2FBD" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserFDDCDD17": { - "Type": "Custom::RedshiftDatabaseQuery", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "UserProviderframeworkonEvent4EC32885", - "Arn" - ] - }, - "handler": "user", - "clusterName": { - "Ref": "ClusterEB0386A7" - }, - "adminUserArn": { - "Ref": "ClusterSecretAttachment769E6258" - }, - "databaseName": "my_db", - "username": "awscdkredshiftclusterdatabaseuserc17d5ebd", - "passwordSecretArn": { - "Ref": "UserSecretAttachment02022609" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserTablePrivilegesProviderframeworkonEventServiceRoleDefaultPolicy3B6EF50C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserTablePrivilegesProviderframeworkonEventServiceRoleDefaultPolicy3B6EF50C", - "Roles": [ - { - "Ref": "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserTablePrivilegesProviderframeworkonEvent3F5C1851": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "UserTablePrivilegesProviderframeworkonEventServiceRoleDefaultPolicy3B6EF50C", - "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "UserTablePrivileges3829D614": { - "Type": "Custom::RedshiftDatabaseQuery", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "UserTablePrivilegesProviderframeworkonEvent3F5C1851", - "Arn" - ] - }, - "handler": "user-table-privileges", - "clusterName": { - "Ref": "ClusterEB0386A7" - }, - "adminUserArn": { - "Ref": "ClusterSecretAttachment769E6258" - }, - "databaseName": "my_db", - "username": { - "Fn::GetAtt": [ - "UserFDDCDD17", - "username" - ] - }, - "tablePrivileges": [ - { - "tableName": { - "Ref": "Table7ABB320E" - }, - "actions": [ - "INSERT", - "DELETE", - "SELECT" - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRoleDefaultPolicyDDD1388D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": [ - { - "Ref": "ClusterSecretAttachment769E6258" - }, - { - "Ref": "UserSecretAttachment02022609" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRoleDefaultPolicyDDD1388D", - "Roles": [ - { - "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bS3Bucket2B744261" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bS3VersionKey26C2ED2C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bS3VersionKey26C2ED2C" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 60 - }, - "DependsOn": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRoleDefaultPolicyDDD1388D", - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableProviderframeworkonEventServiceRoleC3128F67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "Roles": [ - { - "Ref": "TableProviderframeworkonEventServiceRoleC3128F67" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TableProviderframeworkonEvent97F3951A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "TableProviderframeworkonEventServiceRoleC3128F67", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/Table/Resource/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "QueryRedshiftDatabase3de5bea727da479686625efb56431b5f3DF81997", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "TableProviderframeworkonEventServiceRoleC3128F67" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Table7ABB320E": { - "Type": "Custom::RedshiftDatabaseQuery", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "TableProviderframeworkonEvent97F3951A", - "Arn" - ] - }, - "handler": "table", - "clusterName": { - "Ref": "ClusterEB0386A7" - }, - "adminUserArn": { - "Ref": "ClusterSecretAttachment769E6258" - }, - "databaseName": "my_db", - "tableName": { - "prefix": "awscdkredshiftclusterdatabaseTable24923533", - "generateSuffix": "true" - }, - "tableColumns": [ - { - "name": "col1", - "dataType": "varchar(4)", - "distKey": true - }, - { - "name": "col2", - "dataType": "float", - "sortKey": true - }, - { - "name": "col3", - "dataType": "float", - "sortKey": true - } - ], - "distStyle": "KEY", - "sortStyle": "INTERLEAVED" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bS3Bucket2B744261": { - "Type": "String", - "Description": "S3 bucket for asset \"104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3b\"" - }, - "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bS3VersionKey26C2ED2C": { - "Type": "String", - "Description": "S3 key for asset version \"104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3b\"" - }, - "AssetParameters104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3bArtifactHash00C57864": { - "Type": "String", - "Description": "Artifact hash for asset \"104629e772240371441c4f76a71184cb01d6d09afe126b3ddc9243d03f78fb3b\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.expected.json deleted file mode 100644 index 8f1670915fbf5..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.expected.json +++ /dev/null @@ -1,448 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-elbv2-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VPCPublicSubnet1DefaultRoute91CEF279", - "VPCPublicSubnet2DefaultRouteB7481BBA" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integLB9950B1E4", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "HostedZoneDB99F866": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "test.public." - } - }, - "HostedZoneAlias40D2E006": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "_foo.test.public.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::Join": [ - "", - [ - "dualstack.", - { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - ] - ] - }, - "HostedZoneId": { - "Fn::GetAtt": [ - "LB8A12904C", - "CanonicalHostedZoneID" - ] - } - }, - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.expected.json deleted file mode 100644 index f2885d0d342c7..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.expected.json +++ /dev/null @@ -1,464 +0,0 @@ -{ - "Resources": { - "HandlerServiceRoleFCDC14AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Handler886CB40B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "HandlerServiceRoleFCDC14AE", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HandlerServiceRoleFCDC14AE" - ] - }, - "apiC8550315": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "api" - } - }, - "apiCloudWatchRoleAC81D93E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "apiAccount57E28B43": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "apiCloudWatchRoleAC81D93E", - "Arn" - ] - } - }, - "DependsOn": [ - "apiC8550315" - ] - }, - "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "apiC8550315" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "apiproxyANY7F13F09C", - "apiproxy4EA44110", - "apiANYB3DF8C3C" - ] - }, - "apiDeploymentStageprod896C8101": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "apiC8550315" - }, - "DeploymentId": { - "Ref": "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950" - }, - "StageName": "prod" - }, - "DependsOn": [ - "apiAccount57E28B43" - ] - }, - "apiCustomDomain64773C4F": { - "Type": "AWS::ApiGateway::DomainName", - "Properties": { - "DomainName": "example.com", - "EndpointConfiguration": { - "Types": [ - "REGIONAL" - ] - }, - "RegionalCertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate" - } - }, - "apiCustomDomainMapawscdkapigwaliasintegapiF4DF08ACCF365F22": { - "Type": "AWS::ApiGateway::BasePathMapping", - "Properties": { - "DomainName": { - "Ref": "apiCustomDomain64773C4F" - }, - "RestApiId": { - "Ref": "apiC8550315" - }, - "Stage": { - "Ref": "apiDeploymentStageprod896C8101" - } - } - }, - "apiproxy4EA44110": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "apiC8550315", - "RootResourceId" - ] - }, - "PathPart": "{proxy+}", - "RestApiId": { - "Ref": "apiC8550315" - } - } - }, - "apiproxyANYApiPermissionawscdkapigwaliasintegapiF4DF08ACANYproxy80933581": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "apiC8550315" - }, - "/", - { - "Ref": "apiDeploymentStageprod896C8101" - }, - "/*/*" - ] - ] - } - } - }, - "apiproxyANYApiPermissionTestawscdkapigwaliasintegapiF4DF08ACANYproxyCF8E3D8C": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "apiC8550315" - }, - "/test-invoke-stage/*/*" - ] - ] - } - } - }, - "apiproxyANY7F13F09C": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Ref": "apiproxy4EA44110" - }, - "RestApiId": { - "Ref": "apiC8550315" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "apiANYApiPermissionawscdkapigwaliasintegapiF4DF08ACANYBCED9DDA": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "apiC8550315" - }, - "/", - { - "Ref": "apiDeploymentStageprod896C8101" - }, - "/*/" - ] - ] - } - } - }, - "apiANYApiPermissionTestawscdkapigwaliasintegapiF4DF08ACANYC10548C8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "apiC8550315" - }, - "/test-invoke-stage/*/" - ] - ] - } - } - }, - "apiANYB3DF8C3C": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "apiC8550315", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "apiC8550315" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "Alias325C5727": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "example.com.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::GetAtt": [ - "apiCustomDomain64773C4F", - "RegionalDomainName" - ] - }, - "HostedZoneId": { - "Fn::GetAtt": [ - "apiCustomDomain64773C4F", - "RegionalHostedZoneId" - ] - } - }, - "HostedZoneId": "AAAAAAAAAAAAA" - } - } - }, - "Outputs": { - "apiEndpoint9349E63C": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "apiC8550315" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "apiDeploymentStageprod896C8101" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.cloudfront-alias-target.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.cloudfront-alias-target.expected.json deleted file mode 100644 index b70f6a2274aee..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.cloudfront-alias-target.expected.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "Resources": { - "HostedZoneDB99F866": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "test.public." - } - }, - "HostedZoneAlias40D2E006": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "_foo.test.public.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::GetAtt": [ - "MyDistributionCFDistributionDE147309", - "DomainName" - ] - }, - "HostedZoneId": { - "Fn::FindInMap": [ - "AWSCloudFrontPartitionHostedZoneIdMap", - { - "Ref": "AWS::Partition" - }, - "zoneId" - ] - } - }, - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - } - }, - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyDistributionCFDistributionDE147309": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Bucket83908E77", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - } - }, - "Mappings": { - "AWSCloudFrontPartitionHostedZoneIdMap": { - "aws": { - "zoneId": "Z2FDTNDATAQYW2" - }, - "aws-cn": { - "zoneId": "Z3RFFRIM2A3IF5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.globalaccelerator-alias-target.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.globalaccelerator-alias-target.expected.json deleted file mode 100644 index e11d21275bbab..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.globalaccelerator-alias-target.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Resources": { - "Accelerator8EB0B6B1": { - "Type": "AWS::GlobalAccelerator::Accelerator", - "Properties": { - "Name": "aws-cdk-globalaccelerator-integ", - "Enabled": true - } - }, - "HostedZoneDB99F866": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "test.public." - } - }, - "LocalGlobalAcceleratorAlias18B4A87A": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "test-local.test.public.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::GetAtt": [ - "Accelerator8EB0B6B1", - "DnsName" - ] - }, - "HostedZoneId": "Z2BJ6XQ5FK7U4H" - }, - "Comment": "Alias to the locally created Global Accelerator", - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - } - }, - "ExistingGlobalAcceleratorAlias7ACF888C": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "test-existing.test.public.", - "Type": "A", - "AliasTarget": { - "DNSName": "someexisting.awsglobalaccelerator.com", - "HostedZoneId": "Z2BJ6XQ5FK7U4H" - }, - "Comment": "Alias to the an existing Global Accelerator", - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - } - } - } - } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.interface-vpc-endpoint-target.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.interface-vpc-endpoint-target.expected.json deleted file mode 100644 index f227b614dbcb5..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.interface-vpc-endpoint-target.expected.json +++ /dev/null @@ -1,660 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-interface-vpc-endpoint/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "InterfaceEndpointSecurityGroup4F1CBAD1": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-cdk-interface-vpc-endpoint/InterfaceEndpoint/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - "Description": { - "Fn::Join": [ - "", - [ - "from ", - { - "Fn::GetAtt": [ - "VPCB9E5F0B4", - "CidrBlock" - ] - }, - ":80" - ] - ] - }, - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "InterfaceEndpoint12DE6E71": { - "Type": "AWS::EC2::VPCEndpoint", - "Properties": { - "ServiceName": "com.amazonaws.us-west-2.sms", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "PrivateDnsEnabled": false, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "InterfaceEndpointSecurityGroup4F1CBAD1", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "VpcEndpointType": "Interface" - } - }, - "PrivateZone27242E85": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "test.aws.cdk.com.", - "VPCs": [ - { - "VPCId": { - "Ref": "VPCB9E5F0B4" - }, - "VPCRegion": "us-west-2" - } - ] - } - }, - "AliasEndpointRecord40E9201F": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "foo.test.aws.cdk.com.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Fn::Select": [ - 0, - { - "Fn::GetAtt": [ - "InterfaceEndpoint12DE6E71", - "DnsEntries" - ] - } - ] - } - ] - } - ] - }, - "HostedZoneId": { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - ":", - { - "Fn::Select": [ - 0, - { - "Fn::GetAtt": [ - "InterfaceEndpoint12DE6E71", - "DnsEntries" - ] - } - ] - } - ] - } - ] - } - }, - "HostedZoneId": { - "Ref": "PrivateZone27242E85" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.route53-record.expected.json b/packages/@aws-cdk/aws-route53-targets/test/integ.route53-record.expected.json deleted file mode 100644 index 9394dd9bb11c1..0000000000000 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.route53-record.expected.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Resources": { - "HostedZoneDB99F866": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "cdk-integ.com." - } - }, - "WWW9F8609DA": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "www.cdk-integ.com.", - "Type": "A", - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - }, - "ResourceRecords": [ - "1.2.3.4" - ], - "TTL": "1800" - } - }, - "Alias325C5727": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "cdk-integ.com.", - "Type": "A", - "AliasTarget": { - "DNSName": { - "Ref": "WWW9F8609DA" - }, - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - }, - "HostedZoneId": { - "Ref": "HostedZoneDB99F866" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53/test/integ.cross-account-zone-delegation.expected.json b/packages/@aws-cdk/aws-route53/test/integ.cross-account-zone-delegation.expected.json deleted file mode 100644 index 3ad72296cd685..0000000000000 --- a/packages/@aws-cdk/aws-route53/test/integ.cross-account-zone-delegation.expected.json +++ /dev/null @@ -1,342 +0,0 @@ -{ - "Resources": { - "ParentHostedZoneC2BD86E1": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "myzone.com." - } - }, - "ParentHostedZoneCrossAccountZoneDelegationRole95B1C36E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "route53:ChangeResourceRecordSets", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":route53:::hostedzone/", - { - "Ref": "ParentHostedZoneC2BD86E1" - } - ] - ] - } - }, - { - "Action": "route53:ListHostedZonesByName", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "delegation" - } - ] - } - }, - "ChildHostedZoneWithZoneId729259E6": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "sub.myzone.com." - } - }, - "DelegationWithZoneIdcrossaccountzonedelegationhandlerrolePolicy5170A69B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ParentHostedZoneCrossAccountZoneDelegationRole95B1C36E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DelegationWithZoneIdcrossaccountzonedelegationhandlerrolePolicy5170A69B", - "Roles": [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B", - "Arn" - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "DelegationWithZoneIdCrossAccountZoneDelegationCustomResourceFFD766E7": { - "Type": "Custom::CrossAccountZoneDelegation", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderHandler44A84265", - "Arn" - ] - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ParentHostedZoneCrossAccountZoneDelegationRole95B1C36E", - "Arn" - ] - }, - "ParentZoneId": { - "Ref": "ParentHostedZoneC2BD86E1" - }, - "DelegatedZoneName": "sub.myzone.com", - "DelegatedZoneNameServers": { - "Fn::GetAtt": [ - "ChildHostedZoneWithZoneId729259E6", - "NameServers" - ] - }, - "TTL": 172800 - }, - "DependsOn": [ - "DelegationWithZoneIdcrossaccountzonedelegationhandlerrolePolicy5170A69B" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B": { - "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" - } - ] - } - }, - "CustomCrossAccountZoneDelegationCustomResourceProviderHandler44A84265": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aS3BucketC1366C27" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aS3VersionKeyEE72CEF8" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aS3VersionKeyEE72CEF8" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B" - ] - }, - "ChildHostedZoneWithZoneNameBC2C15F6": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "anothersub.myzone.com." - } - }, - "DelegationWithZoneNamecrossaccountzonedelegationhandlerrolePolicy86996882": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ParentHostedZoneCrossAccountZoneDelegationRole95B1C36E", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DelegationWithZoneNamecrossaccountzonedelegationhandlerrolePolicy86996882", - "Roles": [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderRoleED64687B", - "Arn" - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "DelegationWithZoneNameCrossAccountZoneDelegationCustomResourceA1A1C94A": { - "Type": "Custom::CrossAccountZoneDelegation", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCrossAccountZoneDelegationCustomResourceProviderHandler44A84265", - "Arn" - ] - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ParentHostedZoneCrossAccountZoneDelegationRole95B1C36E", - "Arn" - ] - }, - "ParentZoneName": "myzone.com", - "DelegatedZoneName": "anothersub.myzone.com", - "DelegatedZoneNameServers": { - "Fn::GetAtt": [ - "ChildHostedZoneWithZoneNameBC2C15F6", - "NameServers" - ] - }, - "TTL": 172800 - }, - "DependsOn": [ - "DelegationWithZoneNamecrossaccountzonedelegationhandlerrolePolicy86996882" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aS3BucketC1366C27": { - "Type": "String", - "Description": "S3 bucket for asset \"7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8a\"" - }, - "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aS3VersionKeyEE72CEF8": { - "Type": "String", - "Description": "S3 key for asset version \"7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8a\"" - }, - "AssetParameters7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8aArtifactHashAADF3168": { - "Type": "String", - "Description": "Artifact hash for asset \"7625bcc3bbd65c490a92d42790a563e31dc02c18006ef272338c8c788849bb8a\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53/test/integ.route53.expected.json b/packages/@aws-cdk/aws-route53/test/integ.route53.expected.json deleted file mode 100644 index 39ca5a6f7ab75..0000000000000 --- a/packages/@aws-cdk/aws-route53/test/integ.route53.expected.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-route53-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "PrivateZone27242E85": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "cdk.local.", - "VPCs": [ - { - "VPCId": { - "Ref": "VPCB9E5F0B4" - }, - "VPCRegion": { - "Ref": "AWS::Region" - } - } - ] - } - }, - "PrivateZoneTXT83BB83CE": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "_foo.cdk.local.", - "Type": "TXT", - "HostedZoneId": { - "Ref": "PrivateZone27242E85" - }, - "ResourceRecords": [ - "\"Bar!\"", - "\"Baz?\"" - ], - "TTL": "60" - } - }, - "PublicZone2E1C4E34": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "cdk.test." - } - }, - "PublicZonecdktestsubcdktest83558650": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "sub.cdk.test.", - "Type": "NS", - "HostedZoneId": { - "Ref": "PublicZone2E1C4E34" - }, - "ResourceRecords": { - "Fn::GetAtt": [ - "PublicSubZoneDBD26A0A", - "NameServers" - ] - }, - "TTL": "172800" - } - }, - "PublicSubZoneDBD26A0A": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "sub.cdk.test." - } - }, - "CNAMEC70A2D52": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "www.cdk.local.", - "Type": "CNAME", - "HostedZoneId": { - "Ref": "PrivateZone27242E85" - }, - "ResourceRecords": [ - "server" - ], - "TTL": "1800" - } - }, - "ACCC8ACD5": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "test.cdk.local.", - "Type": "A", - "HostedZoneId": { - "Ref": "PrivateZone27242E85" - }, - "ResourceRecords": [ - "1.2.3.4", - "5.6.7.8" - ], - "TTL": "1800" - } - }, - "CaaAmazon40DF725F": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "cdk.test.", - "Type": "CAA", - "HostedZoneId": { - "Ref": "PublicZone2E1C4E34" - }, - "ResourceRecords": [ - "0 issue \"amazon.com\"" - ], - "TTL": "1800" - } - }, - "TXT0D5C5ACF": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": "cdk.test.", - "Type": "TXT", - "HostedZoneId": { - "Ref": "PublicZone2E1C4E34" - }, - "ResourceRecords": [ - "\"this is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long stringthis is a very long s\"\"tring\"" - ], - "TTL": "1800" - } - } - }, - "Outputs": { - "PrivateZoneId": { - "Value": { - "Ref": "PrivateZone27242E85" - } - }, - "PublicZoneId": { - "Value": { - "Ref": "PublicZone2E1C4E34" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53/test/integ.vpc-endpoint-service-domain-name.expected.json b/packages/@aws-cdk/aws-route53/test/integ.vpc-endpoint-service-domain-name.expected.json deleted file mode 100644 index 88f5a2f51362c..0000000000000 --- a/packages/@aws-cdk/aws-route53/test/integ.vpc-endpoint-service-domain-name.expected.json +++ /dev/null @@ -1,1004 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-vpc-endpoint-dns-integ/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "mylb": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "Type": "network", - "Name": "mylb", - "Scheme": "internal", - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - ] - } - }, - "VPCES3AE7D565": { - "Type": "AWS::EC2::VPCEndpointService", - "Properties": { - "AcceptanceRequired": true, - "NetworkLoadBalancerArns": [ - { - "Ref": "mylb" - } - ] - } - }, - "PHZ45BE903D": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": "aws-cdk.dev." - } - }, - "EndpointDomainEnableDnsCustomResourcePolicy5E6DE7EB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:ModifyVpcEndpointServiceConfiguration", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - ":", - [ - "arn", - { - "Ref": "AWS::Partition" - }, - "ec2", - { - "Ref": "AWS::Region" - }, - { - "Ref": "AWS::AccountId" - }, - { - "Fn::Join": [ - "/", - [ - "vpc-endpoint-service", - { - "Ref": "VPCES3AE7D565" - } - ] - ] - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EndpointDomainEnableDnsCustomResourcePolicy5E6DE7EB", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "VPCES3AE7D565" - ] - }, - "EndpointDomainEnableDnsDACBF5A6": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"modifyVpcEndpointServiceConfiguration\",\"parameters\":{\"ServiceId\":\"", - { - "Ref": "VPCES3AE7D565" - }, - "\",\"PrivateDnsName\":\"my-stuff.aws-cdk.dev\"},\"physicalResourceId\":{\"id\":\"awscdkvpcendpointdnsintegVPCES2D7BC258\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"modifyVpcEndpointServiceConfiguration\",\"parameters\":{\"ServiceId\":\"", - { - "Ref": "VPCES3AE7D565" - }, - "\",\"PrivateDnsName\":\"my-stuff.aws-cdk.dev\"},\"physicalResourceId\":{\"id\":\"awscdkvpcendpointdnsintegVPCES2D7BC258\"}}" - ] - ] - }, - "Delete": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"modifyVpcEndpointServiceConfiguration\",\"parameters\":{\"ServiceId\":\"", - { - "Ref": "VPCES3AE7D565" - }, - "\",\"RemovePrivateDnsName\":true}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EndpointDomainEnableDnsCustomResourcePolicy5E6DE7EB", - "VPCES3AE7D565" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EndpointDomainGetNamesCustomResourcePolicy141775B1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:DescribeVpcEndpointServiceConfigurations", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EndpointDomainGetNamesCustomResourcePolicy141775B1", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "EndpointDomainEnableDnsCustomResourcePolicy5E6DE7EB", - "EndpointDomainEnableDnsDACBF5A6", - "VPCES3AE7D565" - ] - }, - "EndpointDomainGetNames9E697ED2": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"describeVpcEndpointServiceConfigurations\",\"parameters\":{\"ServiceIds\":[\"", - { - "Ref": "VPCES3AE7D565" - }, - "\"]},\"physicalResourceId\":{\"id\":\"0b26ca4969ad06c279e229b1b55b9bc2\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"describeVpcEndpointServiceConfigurations\",\"parameters\":{\"ServiceIds\":[\"", - { - "Ref": "VPCES3AE7D565" - }, - "\"]},\"physicalResourceId\":{\"id\":\"0b26ca4969ad06c279e229b1b55b9bc2\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EndpointDomainEnableDnsCustomResourcePolicy5E6DE7EB", - "EndpointDomainEnableDnsDACBF5A6", - "EndpointDomainGetNamesCustomResourcePolicy141775B1", - "VPCES3AE7D565" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EndpointDomainDnsVerificationRecord66623BDA": { - "Type": "AWS::Route53::RecordSet", - "Properties": { - "Name": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Name" - ] - }, - ".aws-cdk.dev." - ] - ] - }, - "Type": "TXT", - "HostedZoneId": { - "Ref": "PHZ45BE903D" - }, - "ResourceRecords": [ - { - "Fn::Join": [ - "", - [ - "\"", - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Value" - ] - }, - "\"" - ] - ] - } - ], - "TTL": "1800" - }, - "DependsOn": [ - "VPCES3AE7D565" - ] - }, - "EndpointDomainStartVerificationCustomResourcePolicyD2BAC9A6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:StartVpcEndpointServicePrivateDnsVerification", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - ":", - [ - "arn", - { - "Ref": "AWS::Partition" - }, - "ec2", - { - "Ref": "AWS::Region" - }, - { - "Ref": "AWS::AccountId" - }, - { - "Fn::Join": [ - "/", - [ - "vpc-endpoint-service", - { - "Ref": "VPCES3AE7D565" - } - ] - ] - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EndpointDomainStartVerificationCustomResourcePolicyD2BAC9A6", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "EndpointDomainDnsVerificationRecord66623BDA", - "VPCES3AE7D565" - ] - }, - "EndpointDomainStartVerification05E2F7A3": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"startVpcEndpointServicePrivateDnsVerification\",\"parameters\":{\"ServiceId\":\"", - { - "Ref": "VPCES3AE7D565" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Fn::Join": [ - ":", - [ - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Name" - ] - }, - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Value" - ] - } - ] - ] - }, - "\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EC2\",\"action\":\"startVpcEndpointServicePrivateDnsVerification\",\"parameters\":{\"ServiceId\":\"", - { - "Ref": "VPCES3AE7D565" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Fn::Join": [ - ":", - [ - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Name" - ] - }, - { - "Fn::GetAtt": [ - "EndpointDomainGetNames9E697ED2", - "ServiceConfigurations.0.PrivateDnsNameConfiguration.Value" - ] - } - ] - ] - }, - "\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "EndpointDomainDnsVerificationRecord66623BDA", - "EndpointDomainStartVerificationCustomResourcePolicyD2BAC9A6", - "VPCES3AE7D565" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53resolver/test/integ.firewall.expected.json b/packages/@aws-cdk/aws-route53resolver/test/integ.firewall.expected.json deleted file mode 100644 index c6b43a9c3ccfd..0000000000000 --- a/packages/@aws-cdk/aws-route53resolver/test/integ.firewall.expected.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/17", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "cdk-route53-resolver-firewall/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "BlockListC03D0423": { - "Type": "AWS::Route53Resolver::FirewallDomainList", - "Properties": { - "Domains": [ - "bad-domain.com", - "bot-domain.net" - ] - } - }, - "OverrideListF573FB0F": { - "Type": "AWS::Route53Resolver::FirewallDomainList", - "Properties": { - "Domains": [ - "override-domain.com" - ] - } - }, - "OtherListBA4427B5": { - "Type": "AWS::Route53Resolver::FirewallDomainList", - "Properties": { - "DomainFileUrl": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aS3BucketD6778673" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aS3VersionKey1A69D23D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aS3VersionKey1A69D23D" - } - ] - } - ] - } - ] - ] - } - } - }, - "RuleGroup06BA8844": { - "Type": "AWS::Route53Resolver::FirewallRuleGroup", - "Properties": { - "FirewallRules": [ - { - "Action": "BLOCK", - "BlockResponse": "NODATA", - "FirewallDomainListId": { - "Fn::GetAtt": [ - "BlockListC03D0423", - "Id" - ] - }, - "Priority": 10 - }, - { - "Action": "BLOCK", - "BlockOverrideDnsType": "CNAME", - "BlockOverrideDomain": "amazon.com", - "BlockOverrideTtl": 0, - "BlockResponse": "OVERRIDE", - "FirewallDomainListId": { - "Fn::GetAtt": [ - "OverrideListF573FB0F", - "Id" - ] - }, - "Priority": 20 - } - ] - } - }, - "RuleGroupAssociation5494BFB1": { - "Type": "AWS::Route53Resolver::FirewallRuleGroupAssociation", - "Properties": { - "FirewallRuleGroupId": { - "Fn::GetAtt": [ - "RuleGroup06BA8844", - "Id" - ] - }, - "Priority": 101, - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - }, - "Parameters": { - "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aS3BucketD6778673": { - "Type": "String", - "Description": "S3 bucket for asset \"e820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35a\"" - }, - "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aS3VersionKey1A69D23D": { - "Type": "String", - "Description": "S3 key for asset version \"e820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35a\"" - }, - "AssetParameterse820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35aArtifactHashFF61A347": { - "Type": "String", - "Description": "Artifact hash for asset \"e820b3f07bf66854be0dfd6f3ec357a10d644f2011069e5ad07d42f4f89ed35a\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json deleted file mode 100644 index fe8410cd1f63b..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Parameters": { - "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583": { - "Type": "String", - "Description": "S3 bucket for asset \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" - }, - "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3VersionKey39CCFFC8": { - "Type": "String", - "Description": "S3 key for asset version \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" - }, - "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2ArtifactHashDF68D9B9": { - "Type": "String", - "Description": "Artifact hash for asset \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" - } - }, - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.directory.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.directory.lit.expected.json deleted file mode 100644 index d034243acc5b6..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.directory.lit.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Parameters": { - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B": { - "Type": "String", - "Description": "S3 bucket for asset \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - }, - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9": { - "Type": "String", - "Description": "S3 key for asset version \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - }, - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2ArtifactHash220DE9BD": { - "Type": "String", - "Description": "Artifact hash for asset \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - } - }, - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.file.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.file.lit.expected.json deleted file mode 100644 index 2c3894cefd893..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.file.lit.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Parameters": { - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A": { - "Type": "String", - "Description": "S3 bucket for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3VersionKey9482DC35": { - "Type": "String", - "Description": "S3 key for asset version \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197ArtifactHash22BFFA67": { - "Type": "String", - "Description": "Artifact hash for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - } - }, - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.permissions.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.permissions.lit.expected.json deleted file mode 100644 index cf48b76027050..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.permissions.lit.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Parameters": { - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A": { - "Type": "String", - "Description": "S3 bucket for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3VersionKey9482DC35": { - "Type": "String", - "Description": "S3 key for asset version \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197ArtifactHash22BFFA67": { - "Type": "String", - "Description": "Artifact hash for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - } - }, - "Resources": { - "MyUserGroupDA7A39B2": { - "Type": "AWS::IAM::Group" - }, - "MyUserGroupDefaultPolicy50C5D742": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserGroupDefaultPolicy50C5D742", - "Groups": [ - { - "Ref": "MyUserGroupDA7A39B2" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.refs.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.refs.lit.expected.json deleted file mode 100644 index 49c2b9550834b..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.refs.lit.expected.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "Parameters": { - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B": { - "Type": "String", - "Description": "S3 bucket for asset \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - }, - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9": { - "Type": "String", - "Description": "S3 key for asset version \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - }, - "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2ArtifactHash220DE9BD": { - "Type": "String", - "Description": "Artifact hash for asset \"6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2\"" - } - }, - "Outputs": { - "S3BucketName": { - "Value": { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - } - }, - "S3ObjectKey": { - "Value": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - } - ] - ] - } - }, - "S3HttpURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - } - ] - ] - } - }, - "S3ObjectURL": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3VersionKey1F7D75F9" - } - ] - } - ] - } - ] - ] - } - } - }, - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters6b84b87243a4a01c592d78e1fd3855c4bfef39328cd0a450cc97e81717fea2a2S3Bucket50B5A10B" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.multi-assets.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.multi-assets.expected.json deleted file mode 100644 index 87143fe5af7ee..0000000000000 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.multi-assets.expected.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "Resources": { - "DummyResourceF3AB250A": { - "Type": "AWS::IAM::User" - } - }, - "Parameters": { - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3Bucket2C60F94A": { - "Type": "String", - "Description": "S3 bucket for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197S3VersionKey9482DC35": { - "Type": "String", - "Description": "S3 key for asset version \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - }, - "AssetParameters78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197ArtifactHash22BFFA67": { - "Type": "String", - "Description": "Artifact hash for asset \"78add9eaf468dfa2191da44a7da92a21baba4c686cf6053d772556768ef21197\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.expected.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.expected.json deleted file mode 100644 index f0447996bff9d..0000000000000 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.expected.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "Resources": { - "Destination3E3DC043D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:4685d093", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Destination3Policy685DA6C5": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Destination3E3DC043D" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "Destination3AutoDeleteObjectsCustomResourceC26EC7B7": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Destination3E3DC043D" - } - }, - "DependsOn": [ - "Destination3Policy685DA6C5" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Destination3E3DC043D" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "DistributionCFDistribution882A7313": { - "Type": "AWS::CloudFront::Distribution", - "Properties": { - "DistributionConfig": { - "DefaultCacheBehavior": { - "AllowedMethods": [ - "GET", - "HEAD" - ], - "CachedMethods": [ - "GET", - "HEAD" - ], - "Compress": true, - "ForwardedValues": { - "Cookies": { - "Forward": "none" - }, - "QueryString": false - }, - "TargetOriginId": "origin1", - "ViewerProtocolPolicy": "redirect-to-https" - }, - "DefaultRootObject": "index.html", - "Enabled": true, - "HttpVersion": "http2", - "IPV6Enabled": true, - "Origins": [ - { - "ConnectionAttempts": 3, - "ConnectionTimeout": 10, - "DomainName": { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "RegionalDomainName" - ] - }, - "Id": "origin1", - "S3OriginConfig": {} - } - ], - "PriceClass": "PriceClass_100", - "ViewerCertificate": { - "CloudFrontDefaultCertificate": true - } - } - } - }, - "DeployWithInvalidationAwsCliLayerDEDD5787": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployWithInvalidationCustomResourceE3FF7455": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination3E3DC043D" - }, - "RetainOnDelete": false, - "Prune": true, - "DistributionId": { - "Ref": "DistributionCFDistribution882A7313" - }, - "DistributionPaths": [ - "/images/*.png" - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "cloudfront:CreateInvalidation", - "cloudfront:GetInvalidation" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "DeployWithInvalidationAwsCliLayerDEDD5787" - } - ], - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - ] - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7": { - "Type": "String", - "Description": "S3 bucket for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D": { - "Type": "String", - "Description": "S3 key for asset version \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daArtifactHashD85D28D8": { - "Type": "String", - "Description": "Artifact hash for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A": { - "Type": "String", - "Description": "S3 bucket for asset \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C": { - "Type": "String", - "Description": "S3 key for asset version \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eArtifactHash0E426313": { - "Type": "String", - "Description": "Artifact hash for asset \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-data.expected.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-data.expected.json deleted file mode 100644 index f8b42aa2fbd9b..0000000000000 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-data.expected.json +++ /dev/null @@ -1,524 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:cr-owned:deploy/here/:588fbb1f", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "DeployMeAwsCliLayer5F9219E9": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployMeCustomResource4455EE35": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3BucketBC52CF96" - }, - { - "Ref": "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3BucketE46D7C76" - }, - { - "Ref": "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3Bucket485B8F98" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3VersionKeyED6BBB32" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3VersionKeyED6BBB32" - } - ] - } - ] - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3VersionKey9FBF1498" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3VersionKey9FBF1498" - } - ] - } - ] - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3VersionKeyC8D63B0C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3VersionKeyC8D63B0C" - } - ] - } - ] - } - ] - ] - } - ], - "SourceMarkers": [ - {}, - { - "<>": { - "Ref": "Bucket83908E77" - } - }, - { - "<>": { - "Fn::GetAtt": [ - "Bucket83908E77", - "WebsiteURL" - ] - } - } - ], - "DestinationBucketName": { - "Ref": "Bucket83908E77" - }, - "DestinationBucketKeyPrefix": "deploy/here/", - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3Bucket485B8F98" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3Bucket485B8F98" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3BucketE46D7C76" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3BucketE46D7C76" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3BucketBC52CF96" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3BucketBC52CF96" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "DeployMeAwsCliLayer5F9219E9" - } - ], - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - ] - } - }, - "Parameters": { - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7": { - "Type": "String", - "Description": "S3 bucket for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D": { - "Type": "String", - "Description": "S3 key for asset version \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daArtifactHashD85D28D8": { - "Type": "String", - "Description": "Artifact hash for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3BucketBC52CF96": { - "Type": "String", - "Description": "S3 bucket for asset \"d09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18d\"" - }, - "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dS3VersionKeyED6BBB32": { - "Type": "String", - "Description": "S3 key for asset version \"d09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18d\"" - }, - "AssetParametersd09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18dArtifactHashF6480042": { - "Type": "String", - "Description": "Artifact hash for asset \"d09271be89b6cb0398f793b40c1531fd9b076aa92ba80b5e436914b1808fe18d\"" - }, - "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3BucketE46D7C76": { - "Type": "String", - "Description": "S3 bucket for asset \"0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936b\"" - }, - "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bS3VersionKey9FBF1498": { - "Type": "String", - "Description": "S3 key for asset version \"0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936b\"" - }, - "AssetParameters0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936bArtifactHash1774126C": { - "Type": "String", - "Description": "Artifact hash for asset \"0f14dedeaf4386031c978375cbda0f65d7b52b29452cabb8873eb8f0d0fa936b\"" - }, - "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3Bucket485B8F98": { - "Type": "String", - "Description": "S3 bucket for asset \"0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5a\"" - }, - "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aS3VersionKeyC8D63B0C": { - "Type": "String", - "Description": "S3 key for asset version \"0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5a\"" - }, - "AssetParameters0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5aArtifactHashA3962596": { - "Type": "String", - "Description": "Artifact hash for asset \"0d7be86c2a7d62be64fcbe2cbaa36c912a72d445022cc17c37af4f99f1b97a5a\"" - } - }, - "Outputs": { - "BucketName": { - "Value": { - "Ref": "Bucket83908E77" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.expected.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.expected.json deleted file mode 100644 index d1d5576423ee4..0000000000000 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.expected.json +++ /dev/null @@ -1,2341 +0,0 @@ -{ - "Resources": { - "Destination920A3C57": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:12c80047", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:c06dfca0", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:efs/:a01ecd3e", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:f8ab5a69", - "Value": "true" - } - ], - "WebsiteConfiguration": { - "IndexDocument": "index.html" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DestinationPolicy7982387E": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Destination920A3C57" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "DestinationAutoDeleteObjectsCustomResource15E926BA": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Destination920A3C57" - } - }, - "DependsOn": [ - "DestinationPolicy7982387E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Destination920A3C57" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "DeployMeAwsCliLayer5F9219E9": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployMeCustomResource4455EE35": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination920A3C57" - }, - "RetainOnDelete": false, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Destination281A09BDF", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination281A09BDF", - "Arn" - ] - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "DeployMeAwsCliLayer5F9219E9" - } - ], - "Runtime": "python3.7", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" - ] - }, - "InlineVpc2605A3C4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc" - } - ] - } - }, - "InlineVpcPublicSubnet1Subnet2EDC574A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet1" - } - ] - } - }, - "InlineVpcPublicSubnet1RouteTable67856EA2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet1" - } - ] - } - }, - "InlineVpcPublicSubnet1RouteTableAssociationDA9AACF2": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet1RouteTable67856EA2" - }, - "SubnetId": { - "Ref": "InlineVpcPublicSubnet1Subnet2EDC574A" - } - } - }, - "InlineVpcPublicSubnet1DefaultRoute84A6786F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet1RouteTable67856EA2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "InlineVpcIGW515300DC" - } - }, - "DependsOn": [ - "InlineVpcVPCGWE98B1862" - ] - }, - "InlineVpcPublicSubnet1EIPCB8385DA": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet1" - } - ] - } - }, - "InlineVpcPublicSubnet1NATGateway88242629": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "InlineVpcPublicSubnet1Subnet2EDC574A" - }, - "AllocationId": { - "Fn::GetAtt": [ - "InlineVpcPublicSubnet1EIPCB8385DA", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet1" - } - ] - } - }, - "InlineVpcPublicSubnet2SubnetAB52037C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet2" - } - ] - } - }, - "InlineVpcPublicSubnet2RouteTable053CA1F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet2" - } - ] - } - }, - "InlineVpcPublicSubnet2RouteTableAssociation3DB8A2E6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet2RouteTable053CA1F8" - }, - "SubnetId": { - "Ref": "InlineVpcPublicSubnet2SubnetAB52037C" - } - } - }, - "InlineVpcPublicSubnet2DefaultRoute9E9BF17A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet2RouteTable053CA1F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "InlineVpcIGW515300DC" - } - }, - "DependsOn": [ - "InlineVpcVPCGWE98B1862" - ] - }, - "InlineVpcPublicSubnet2EIPFCFD7982": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet2" - } - ] - } - }, - "InlineVpcPublicSubnet2NATGatewayB5A60DA8": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "InlineVpcPublicSubnet2SubnetAB52037C" - }, - "AllocationId": { - "Fn::GetAtt": [ - "InlineVpcPublicSubnet2EIPFCFD7982", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet2" - } - ] - } - }, - "InlineVpcPublicSubnet3SubnetA62CAA14": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet3" - } - ] - } - }, - "InlineVpcPublicSubnet3RouteTableF64DB583": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet3" - } - ] - } - }, - "InlineVpcPublicSubnet3RouteTableAssociation71310D1D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet3RouteTableF64DB583" - }, - "SubnetId": { - "Ref": "InlineVpcPublicSubnet3SubnetA62CAA14" - } - } - }, - "InlineVpcPublicSubnet3DefaultRoute56DFBE66": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPublicSubnet3RouteTableF64DB583" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "InlineVpcIGW515300DC" - } - }, - "DependsOn": [ - "InlineVpcVPCGWE98B1862" - ] - }, - "InlineVpcPublicSubnet3EIP054AEA42": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet3" - } - ] - } - }, - "InlineVpcPublicSubnet3NATGateway214F5293": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "InlineVpcPublicSubnet3SubnetA62CAA14" - }, - "AllocationId": { - "Fn::GetAtt": [ - "InlineVpcPublicSubnet3EIP054AEA42", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PublicSubnet3" - } - ] - } - }, - "InlineVpcPrivateSubnet1Subnet0EC98BAD": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet1" - } - ] - } - }, - "InlineVpcPrivateSubnet1RouteTable19DB57E6": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet1" - } - ] - } - }, - "InlineVpcPrivateSubnet1RouteTableAssociation9D48EE22": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet1RouteTable19DB57E6" - }, - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet1Subnet0EC98BAD" - } - } - }, - "InlineVpcPrivateSubnet1DefaultRouteC56CB768": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet1RouteTable19DB57E6" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "InlineVpcPublicSubnet1NATGateway88242629" - } - } - }, - "InlineVpcPrivateSubnet2Subnet60DB7D03": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet2" - } - ] - } - }, - "InlineVpcPrivateSubnet2RouteTableE3C67EFF": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet2" - } - ] - } - }, - "InlineVpcPrivateSubnet2RouteTableAssociation6D6562EB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet2RouteTableE3C67EFF" - }, - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet2Subnet60DB7D03" - } - } - }, - "InlineVpcPrivateSubnet2DefaultRouteA98D214A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet2RouteTableE3C67EFF" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "InlineVpcPublicSubnet2NATGatewayB5A60DA8" - } - } - }, - "InlineVpcPrivateSubnet3Subnet532F7EB7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet3" - } - ] - } - }, - "InlineVpcPrivateSubnet3RouteTable9741CA0D": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc/PrivateSubnet3" - } - ] - } - }, - "InlineVpcPrivateSubnet3RouteTableAssociation6A6D2B69": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet3RouteTable9741CA0D" - }, - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet3Subnet532F7EB7" - } - } - }, - "InlineVpcPrivateSubnet3DefaultRoute6AF96C82": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "InlineVpcPrivateSubnet3RouteTable9741CA0D" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "InlineVpcPublicSubnet3NATGateway214F5293" - } - } - }, - "InlineVpcIGW515300DC": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/InlineVpc" - } - ] - } - }, - "InlineVpcVPCGWE98B1862": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "InlineVpc2605A3C4" - }, - "InternetGatewayId": { - "Ref": "InlineVpcIGW515300DC" - } - } - }, - "DeployMeWithEfsStorageAwsCliLayer1619A3EE": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - }, - "DependsOn": [ - "InlineVpcIGW515300DC", - "InlineVpcPrivateSubnet1DefaultRouteC56CB768", - "InlineVpcPrivateSubnet1RouteTable19DB57E6", - "InlineVpcPrivateSubnet1RouteTableAssociation9D48EE22", - "InlineVpcPrivateSubnet1Subnet0EC98BAD", - "InlineVpcPrivateSubnet2DefaultRouteA98D214A", - "InlineVpcPrivateSubnet2RouteTableE3C67EFF", - "InlineVpcPrivateSubnet2RouteTableAssociation6D6562EB", - "InlineVpcPrivateSubnet2Subnet60DB7D03", - "InlineVpcPrivateSubnet3DefaultRoute6AF96C82", - "InlineVpcPrivateSubnet3RouteTable9741CA0D", - "InlineVpcPrivateSubnet3RouteTableAssociation6A6D2B69", - "InlineVpcPrivateSubnet3Subnet532F7EB7", - "InlineVpcPublicSubnet1DefaultRoute84A6786F", - "InlineVpcPublicSubnet1EIPCB8385DA", - "InlineVpcPublicSubnet1NATGateway88242629", - "InlineVpcPublicSubnet1RouteTable67856EA2", - "InlineVpcPublicSubnet1RouteTableAssociationDA9AACF2", - "InlineVpcPublicSubnet1Subnet2EDC574A", - "InlineVpcPublicSubnet2DefaultRoute9E9BF17A", - "InlineVpcPublicSubnet2EIPFCFD7982", - "InlineVpcPublicSubnet2NATGatewayB5A60DA8", - "InlineVpcPublicSubnet2RouteTable053CA1F8", - "InlineVpcPublicSubnet2RouteTableAssociation3DB8A2E6", - "InlineVpcPublicSubnet2SubnetAB52037C", - "InlineVpcPublicSubnet3DefaultRoute56DFBE66", - "InlineVpcPublicSubnet3EIP054AEA42", - "InlineVpcPublicSubnet3NATGateway214F5293", - "InlineVpcPublicSubnet3RouteTableF64DB583", - "InlineVpcPublicSubnet3RouteTableAssociation71310D1D", - "InlineVpcPublicSubnet3SubnetA62CAA14", - "InlineVpc2605A3C4", - "InlineVpcVPCGWE98B1862" - ] - }, - "DeployMeWithEfsStorageCustomResourcec8e45d2d82aec23f89c7172e7e6f994ff3d9c444faC9646D53": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa03838EC0", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination920A3C57" - }, - "DestinationBucketKeyPrefix": "efs/", - "RetainOnDelete": false, - "Prune": true - }, - "DependsOn": [ - "InlineVpcIGW515300DC", - "InlineVpcPrivateSubnet1DefaultRouteC56CB768", - "InlineVpcPrivateSubnet1RouteTable19DB57E6", - "InlineVpcPrivateSubnet1RouteTableAssociation9D48EE22", - "InlineVpcPrivateSubnet1Subnet0EC98BAD", - "InlineVpcPrivateSubnet2DefaultRouteA98D214A", - "InlineVpcPrivateSubnet2RouteTableE3C67EFF", - "InlineVpcPrivateSubnet2RouteTableAssociation6D6562EB", - "InlineVpcPrivateSubnet2Subnet60DB7D03", - "InlineVpcPrivateSubnet3DefaultRoute6AF96C82", - "InlineVpcPrivateSubnet3RouteTable9741CA0D", - "InlineVpcPrivateSubnet3RouteTableAssociation6A6D2B69", - "InlineVpcPrivateSubnet3Subnet532F7EB7", - "InlineVpcPublicSubnet1DefaultRoute84A6786F", - "InlineVpcPublicSubnet1EIPCB8385DA", - "InlineVpcPublicSubnet1NATGateway88242629", - "InlineVpcPublicSubnet1RouteTable67856EA2", - "InlineVpcPublicSubnet1RouteTableAssociationDA9AACF2", - "InlineVpcPublicSubnet1Subnet2EDC574A", - "InlineVpcPublicSubnet2DefaultRoute9E9BF17A", - "InlineVpcPublicSubnet2EIPFCFD7982", - "InlineVpcPublicSubnet2NATGatewayB5A60DA8", - "InlineVpcPublicSubnet2RouteTable053CA1F8", - "InlineVpcPublicSubnet2RouteTableAssociation3DB8A2E6", - "InlineVpcPublicSubnet2SubnetAB52037C", - "InlineVpcPublicSubnet3DefaultRoute56DFBE66", - "InlineVpcPublicSubnet3EIP054AEA42", - "InlineVpcPublicSubnet3NATGateway214F5293", - "InlineVpcPublicSubnet3RouteTableF64DB583", - "InlineVpcPublicSubnet3RouteTableAssociation71310D1D", - "InlineVpcPublicSubnet3SubnetA62CAA14", - "InlineVpc2605A3C4", - "InlineVpcVPCGWE98B1862" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B": { - "Type": "AWS::EFS::FileSystem", - "Properties": { - "Encrypted": true, - "FileSystemTags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/BucketDeploymentEFS-VPC-c8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroup8A6327B1": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "test-bucket-deployments-2/BucketDeploymentEFS-VPC-c8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa/EfsSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "test-bucket-deployments-2/BucketDeploymentEFS-VPC-c8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa" - } - ], - "VpcId": { - "Ref": "InlineVpc2605A3C4" - } - } - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroupfromtestbucketdeployments2CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupBDC138BF20498CD714A7": { - "Type": "AWS::EC2::SecurityGroupIngress", - "Properties": { - "IpProtocol": "tcp", - "Description": "from testbucketdeployments2CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupBDC138BF:2049", - "FromPort": 2049, - "GroupId": { - "Fn::GetAtt": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroup8A6327B1", - "GroupId" - ] - }, - "SourceSecurityGroupId": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupD7C1D75A", - "GroupId" - ] - }, - "ToPort": 2049 - } - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroup8A6327B1", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet1Subnet0EC98BAD" - } - } - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroup8A6327B1", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet2Subnet60DB7D03" - } - } - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648": { - "Type": "AWS::EFS::MountTarget", - "Properties": { - "FileSystemId": { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroup8A6327B1", - "GroupId" - ] - } - ], - "SubnetId": { - "Ref": "InlineVpcPrivateSubnet3Subnet532F7EB7" - } - } - }, - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faAccessPoint657AFA25": { - "Type": "AWS::EFS::AccessPoint", - "Properties": { - "FileSystemId": { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" - }, - "PosixUser": { - "Gid": "1001", - "Uid": "1001" - }, - "RootDirectory": { - "CreationInfo": { - "OwnerGid": "1001", - "OwnerUid": "1001", - "Permissions": "0777" - }, - "Path": "/lambda" - } - }, - "DependsOn": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRole1F2E85D4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ] - }, - "DependsOn": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRoleDefaultPolicyDE2C8526": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "elasticfilesystem:ClientMount", - "Condition": { - "StringEquals": { - "elasticfilesystem:AccessPointArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faAccessPoint657AFA25" - } - ] - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "elasticfilesystem:ClientWrite", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":file-system/", - { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" - } - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination920A3C57", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "tomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRoleDefaultPolicyDE2C8526", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRole1F2E85D4" - } - ] - }, - "DependsOn": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupD7C1D75A": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function testbucketdeployments2CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faB7A82630", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "InlineVpc2605A3C4" - } - }, - "DependsOn": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa03838EC0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRole1F2E85D4", - "Arn" - ] - }, - "Environment": { - "Variables": { - "MOUNT_PATH": "/mnt/lambda" - } - }, - "FileSystemConfigs": [ - { - "Arn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":elasticfilesystem:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":access-point/", - { - "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faAccessPoint657AFA25" - } - ] - ] - }, - "LocalMountPath": "/mnt/lambda" - } - ], - "Handler": "index.handler", - "Layers": [ - { - "Ref": "DeployMeWithEfsStorageAwsCliLayer1619A3EE" - } - ], - "Runtime": "python3.7", - "Timeout": 900, - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupD7C1D75A", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "InlineVpcPrivateSubnet1Subnet0EC98BAD" - }, - { - "Ref": "InlineVpcPrivateSubnet2Subnet60DB7D03" - }, - { - "Ref": "InlineVpcPrivateSubnet3Subnet532F7EB7" - } - ] - } - }, - "DependsOn": [ - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget140913EA1", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget215F1A11A", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsMountTarget3CF445648", - "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faEfsSecurityGroupfromtestbucketdeployments2CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faSecurityGroupBDC138BF20498CD714A7", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRoleDefaultPolicyDE2C8526", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756Cc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faServiceRole1F2E85D4" - ] - }, - "Destination281A09BDF": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:deploy/here/:272e95d8", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Destination2PolicyA94CC138": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Destination281A09BDF" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Destination281A09BDF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination281A09BDF", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "Destination2AutoDeleteObjectsCustomResource8A5BE3F7": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Destination281A09BDF" - } - }, - "DependsOn": [ - "Destination2PolicyA94CC138" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeployWithPrefixAwsCliLayerC9DDB597": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployWithPrefixCustomResource9CF7C694": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination281A09BDF" - }, - "DestinationBucketKeyPrefix": "deploy/here/", - "RetainOnDelete": false, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Destination3E3DC043D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:9eca9fb3", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Destination3Policy685DA6C5": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Destination3E3DC043D" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Destination3E3DC043D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "Destination3AutoDeleteObjectsCustomResourceC26EC7B7": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Destination3E3DC043D" - } - }, - "DependsOn": [ - "Destination3Policy685DA6C5" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeployWithMetadataAwsCliLayer2C774B41": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployWithMetadataCustomResourceA73C95DC": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination3E3DC043D" - }, - "RetainOnDelete": false, - "Prune": true, - "UserMetadata": { - "a": "aaa", - "b": "bbb", - "c": "ccc" - }, - "SystemMetadata": { - "cache-control": "public, max-age=60", - "content-type": "text/html" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeployMeWithoutDeletingFilesOnDestinationAwsCliLayer4D54C41C": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployMeWithoutDeletingFilesOnDestinationCustomResourceA390B02B": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination920A3C57" - }, - "RetainOnDelete": false, - "Prune": false - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeployMeWithExcludedFilesOnDestinationAwsCliLayer68F5E11D": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "DeployMeWithExcludedFilesOnDestinationCustomResource48D69581": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A" - } - ], - "SourceObjectKeys": [ - { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C" - } - ] - } - ] - } - ] - ] - } - ], - "DestinationBucketName": { - "Ref": "Destination920A3C57" - }, - "RetainOnDelete": false, - "Prune": true, - "Exclude": [ - "*.gif" - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3BucketF23C0DE7": { - "Type": "String", - "Description": "S3 bucket for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daS3VersionKey5E97B17D": { - "Type": "String", - "Description": "S3 key for asset version \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersf98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711daArtifactHashD85D28D8": { - "Type": "String", - "Description": "Artifact hash for asset \"f98b78092dcdd31f5e6d47489beb5f804d4835ef86a8085d0a2053cb9ae711da\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3Bucket9CD8B20A": { - "Type": "String", - "Description": "S3 bucket for asset \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eS3VersionKeyA58D380C": { - "Type": "String", - "Description": "S3 key for asset version \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - }, - "AssetParametersfc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222eArtifactHash0E426313": { - "Type": "String", - "Description": "Artifact hash for asset \"fc4481abf279255619ff7418faa5d24456fef3432ea0da59c95542578ff0222e\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-notifications/test/integ.notifications.expected.json b/packages/@aws-cdk/aws-s3-notifications/test/integ.notifications.expected.json deleted file mode 100644 index 0e0162c3837ea..0000000000000 --- a/packages/@aws-cdk/aws-s3-notifications/test/integ.notifications.expected.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketNotifications8F2E257D": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - }, - "NotificationConfiguration": { - "TopicConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:Put" - ], - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - }, - { - "Events": [ - "s3:ObjectRemoved:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "prefix", - "Value": "home/myusername/" - } - ] - } - }, - "TopicArn": { - "Ref": "Topic3DEAE47A7" - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "TopicPolicyA1747468", - "TopicBFC7AF6E", - "Topic3Policy49BDDFBD", - "Topic3DEAE47A7" - ] - }, - "TopicBFC7AF6E": { - "Type": "AWS::SNS::Topic" - }, - "TopicPolicyA1747468": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "TopicBFC7AF6E" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "TopicBFC7AF6E" - } - ] - } - }, - "Topic3DEAE47A7": { - "Type": "AWS::SNS::Topic" - }, - "Topic3Policy49BDDFBD": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "Topic3DEAE47A7" - }, - "Sid": "0" - }, - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket25524B414", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "Topic3DEAE47A7" - }, - "Sid": "1" - }, - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "Bucket3CFB7F7D7" - } - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "Topic3DEAE47A7" - }, - "Sid": "2" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "Topic3DEAE47A7" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucketNotification", - "s3:PutBucketNotification" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - }, - "Bucket25524B414": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Bucket2NotificationsD9BA2A77": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket25524B414" - }, - "NotificationConfiguration": { - "TopicConfigurations": [ - { - "Events": [ - "s3:ObjectRemoved:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "prefix", - "Value": "foo" - }, - { - "Name": "suffix", - "Value": "foo/bar" - } - ] - } - }, - "TopicArn": { - "Ref": "Topic3DEAE47A7" - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "Topic3Policy49BDDFBD", - "Topic3DEAE47A7" - ] - }, - "Bucket3CFB7F7D7": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Bucket3ImportedNotificationsB1625F39": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket3CFB7F7D7" - }, - "NotificationConfiguration": { - "TopicConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:Copy" - ], - "TopicArn": { - "Ref": "Topic3DEAE47A7" - } - } - ] - }, - "Managed": false - }, - "DependsOn": [ - "Topic3Policy49BDDFBD", - "Topic3DEAE47A7" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.expected.json b/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.expected.json deleted file mode 100644 index 8cc9c00a4fe29..0000000000000 --- a/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.expected.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "Resources": { - "MyBucketNotifications46AC0CD2": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "suffix", - "Value": ".png" - } - ] - } - }, - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "MyBucketAllowBucketNotificationsTolambdabucketnotificationsMyFunction4086861C1BF13476" - ] - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyBucketAllowBucketNotificationsTolambdabucketnotificationsMyFunction4086861C1BF13476": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - } - } - }, - "MyFunctionServiceRole3C357FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction3BAA72D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback(null, event);\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunctionServiceRole3C357FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunctionServiceRole3C357FF2" - ] - }, - "YourBucketNotifications8D39901A": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "YourBucketC6A57364" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectRemoved:*" - ], - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "YourBucketAllowBucketNotificationsTolambdabucketnotificationsMyFunction4086861C8FE2B89D" - ] - }, - "YourBucketC6A57364": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "YourBucketAllowBucketNotificationsTolambdabucketnotificationsMyFunction4086861C8FE2B89D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "MyFunction3BAA72D1", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "YourBucketC6A57364", - "Arn" - ] - } - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - } - } -} diff --git a/packages/@aws-cdk/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.expected.json b/packages/@aws-cdk/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.expected.json deleted file mode 100644 index fce3f59e27d78..0000000000000 --- a/packages/@aws-cdk/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.expected.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "Resources": { - "ObjectCreatedTopic92F47E19": { - "Type": "AWS::SNS::Topic" - }, - "ObjectCreatedTopicPolicyA938ECFC": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "ObjectCreatedTopic92F47E19" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "ObjectCreatedTopic92F47E19" - } - ] - } - }, - "ObjectDeletedTopic2A914EC0": { - "Type": "AWS::SNS::Topic" - }, - "ObjectDeletedTopicPolicy026B02E6": { - "Type": "AWS::SNS::TopicPolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Ref": "ObjectDeletedTopic2A914EC0" - }, - "Sid": "0" - } - ], - "Version": "2012-10-17" - }, - "Topics": [ - { - "Ref": "ObjectDeletedTopic2A914EC0" - } - ] - } - }, - "MyBucketNotifications46AC0CD2": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "NotificationConfiguration": { - "TopicConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "TopicArn": { - "Ref": "ObjectCreatedTopic92F47E19" - } - }, - { - "Events": [ - "s3:ObjectRemoved:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "suffix", - "Value": ".txt" - }, - { - "Name": "prefix", - "Value": "foo/" - } - ] - } - }, - "TopicArn": { - "Ref": "ObjectDeletedTopic2A914EC0" - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "ObjectCreatedTopicPolicyA938ECFC", - "ObjectCreatedTopic92F47E19", - "ObjectDeletedTopicPolicy026B02E6", - "ObjectDeletedTopic2A914EC0" - ] - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - } - } -} diff --git a/packages/@aws-cdk/aws-s3-notifications/test/sqs/integ.bucket-notifications.expected.json b/packages/@aws-cdk/aws-s3-notifications/test/sqs/integ.bucket-notifications.expected.json deleted file mode 100644 index 1421e22410918..0000000000000 --- a/packages/@aws-cdk/aws-s3-notifications/test/sqs/integ.bucket-notifications.expected.json +++ /dev/null @@ -1,379 +0,0 @@ -{ - "Resources": { - "Bucket12520700A": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Bucket1NotificationsBC5D9A45": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket12520700A" - }, - "NotificationConfiguration": { - "QueueConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "QueueArn": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - }, - { - "Events": [ - "s3:ObjectRemoved:*" - ], - "QueueArn": { - "Fn::GetAtt": [ - "EncryptedQueue0428C61A", - "Arn" - ] - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "EncryptedQueueKey6F4FD304", - "EncryptedQueuePolicy8AEB1708", - "EncryptedQueue0428C61A", - "MyQueuePolicy6BBEDDAC", - "MyQueueE6CA6235" - ] - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket12520700A", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - }, - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket25524B414", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - }, - "Bucket25524B414": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Bucket2NotificationsD9BA2A77": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket25524B414" - }, - "NotificationConfiguration": { - "QueueConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "Filter": { - "Key": { - "FilterRules": [ - { - "Name": "suffix", - "Value": ".png" - } - ] - } - }, - "QueueArn": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ] - }, - "Managed": true - }, - "DependsOn": [ - "MyQueuePolicy6BBEDDAC", - "MyQueueE6CA6235" - ] - }, - "EncryptedQueueKey6F4FD304": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket12520700A", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:GenerateDataKey*" - ], - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "Description": "Created by sqs-bucket-notifications/EncryptedQueue" - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "EncryptedQueue0428C61A": { - "Type": "AWS::SQS::Queue", - "Properties": { - "KmsMasterKeyId": { - "Fn::GetAtt": [ - "EncryptedQueueKey6F4FD304", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EncryptedQueuePolicy8AEB1708": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:SendMessage" - ], - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "Bucket12520700A", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "EncryptedQueue0428C61A", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "EncryptedQueue0428C61A" - } - ] - } - } - } -} diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-auto-delete-objects.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-auto-delete-objects.expected.json deleted file mode 100644 index c50af59d25b5c..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket-auto-delete-objects.expected.json +++ /dev/null @@ -1,325 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "BucketAutoDeleteObjectsCustomResourceBAFD23C2": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "Bucket83908E77" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomS3PutObjectsCustomResourceProviderRole40D98C91": { - "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": "s3:PutObject", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ] - } - } - ] - } - }, - "CustomS3PutObjectsCustomResourceProviderHandler1D33F0A9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6S3BucketB51EC107" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6S3VersionKey2B267DB5" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6S3VersionKey2B267DB5" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3PutObjectsCustomResourceProviderRole40D98C91", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomS3PutObjectsCustomResourceProviderRole40D98C91" - ] - }, - "PutObjectsCustomResource": { - "Type": "Custom::S3PutObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3PutObjectsCustomResourceProviderHandler1D33F0A9", - "Arn" - ] - }, - "BucketName": { - "Ref": "Bucket83908E77" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { - "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { - "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { - "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" - }, - "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6S3BucketB51EC107": { - "Type": "String", - "Description": "S3 bucket for asset \"31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6\"" - }, - "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6S3VersionKey2B267DB5": { - "Type": "String", - "Description": "S3 key for asset version \"31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6\"" - }, - "AssetParameters31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6ArtifactHashEE982197": { - "Type": "String", - "Description": "Artifact hash for asset \"31552cb1c5c4cdb0d9502dc59c3cd63cb519dcb7e320e60965c75940297ae3b6\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-grantdelete-kms.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-grantdelete-kms.expected.json deleted file mode 100644 index 57642a9a60781..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket-grantdelete-kms.expected.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "Resources": { - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "Deleter1FEDC09A": { - "Type": "AWS::IAM::User" - }, - "DeleterDefaultPolicyCD33B8A0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:DeleteObject*", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DeleterDefaultPolicyCD33B8A0", - "Users": [ - { - "Ref": "Deleter1FEDC09A" - } - ] - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-intelligent-tiering.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-intelligent-tiering.expected.json deleted file mode 100644 index cd8239ffdaa75..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket-intelligent-tiering.expected.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "IntelligentTieringConfigurations": [ - { - "Id": "foo", - "Prefix": "bar", - "Status": "Enabled", - "TagFilters": [ - { - "Key": "test", - "Value": "bazz" - } - ], - "Tierings": [ - { - "AccessTier": "ARCHIVE_ACCESS", - "Days": 90 - }, - { - "AccessTier": "DEEP_ARCHIVE_ACCESS", - "Days": 180 - } - ] - } - ] - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-inventory.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-inventory.expected.json deleted file mode 100644 index a142de99be8b0..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket-inventory.expected.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "Resources": { - "InventoryBucketA869B8CB": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "InventoryBucketPolicyEDF94353": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "InventoryBucketA869B8CB" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutObject", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "InventoryBucketA869B8CB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "InventoryBucketA869B8CB", - "Arn" - ] - }, - "/reports*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "InventoryConfigurations": [ - { - "Destination": { - "BucketArn": { - "Fn::GetAtt": [ - "InventoryBucketA869B8CB", - "Arn" - ] - }, - "Format": "Parquet", - "Prefix": "reports" - }, - "Enabled": true, - "Id": "MyBucketInventory0", - "IncludedObjectVersions": "All", - "ScheduleFrequency": "Daily" - }, - { - "Destination": { - "BucketArn": { - "Fn::GetAtt": [ - "SecondBucketAC350874", - "Arn" - ] - }, - "Format": "CSV" - }, - "Enabled": true, - "Id": "MyBucketInventory1", - "IncludedObjectVersions": "All", - "ScheduleFrequency": "Weekly" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SecondBucketAC350874": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SecondBucketPolicy844C4343": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SecondBucketAC350874" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutObject", - "Condition": { - "ArnLike": { - "aws:SourceArn": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "s3.amazonaws.com" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SecondBucketAC350874", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SecondBucketAC350874", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-sharing.lit.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-sharing.lit.expected.json deleted file mode 100644 index 50df7b97b9f05..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket-sharing.lit.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -[ - { - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "ExportsOutputFnGetAttMyBucketF68F3FF0Arn0F7E8E58": { - "Value": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "Export": { - "Name": "ProducerStack:ExportsOutputFnGetAttMyBucketF68F3FF0Arn0F7E8E58" - } - } - } - }, - { - "Resources": { - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::ImportValue": "ProducerStack:ExportsOutputFnGetAttMyBucketF68F3FF0Arn0F7E8E58" - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::ImportValue": "ProducerStack:ExportsOutputFnGetAttMyBucketF68F3FF0Arn0F7E8E58" - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket.domain-name.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket.domain-name.expected.json deleted file mode 100644 index 294ca650821d1..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket.domain-name.expected.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "RealBucketDomain": { - "Value": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "DomainName" - ] - } - }, - "ImportedBucketDomain": { - "Value": { - "Fn::Join": [ - "", - [ - "my-bucket-test.s3.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket.expected.json deleted file mode 100644 index fbe9cea592664..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket.expected.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Resources": { - "MyBucketKeyC17130CF": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "Description": "Created by aws-cdk-s3/MyBucket" - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "MyBucketKeyC17130CF", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyOtherBucket543F3540": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "AES256" - } - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyUserDC45028B": { - "Type": "AWS::IAM::User" - }, - "MyUserDefaultPolicy7B897426": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyBucketKeyC17130CF", - "Arn" - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "MyOtherBucket543F3540", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyOtherBucket543F3540", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyUserDefaultPolicy7B897426", - "Users": [ - { - "Ref": "MyUserDC45028B" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket.notifications.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket.notifications.expected.json deleted file mode 100644 index 7ef3ed3ba4d10..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket.notifications.expected.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "Resources": { - "MyEventBridgeBucketNotifications19C0453F": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyEventBridgeBucket1ABD5C2A" - }, - "NotificationConfiguration": { - "EventBridgeConfiguration": {} - }, - "Managed": true - } - }, - "MyEventBridgeBucket1ABD5C2A": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n external_notifications = find_external_notifications(bucket, stack_id)\n\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "python3.7", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ] - } - } -} diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket.server-access-logs.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket.server-access-logs.expected.json deleted file mode 100644 index 87fe6aa792b63..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket.server-access-logs.expected.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Resources": { - "MyAccessLogsBucketF7FE6635": { - "Type": "AWS::S3::Bucket", - "Properties": { - "AccessControl": "LogDeliveryWrite" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "LoggingConfiguration": { - "DestinationBucketName": { - "Ref": "MyAccessLogsBucketF7FE6635" - }, - "LogFilePrefix": "example" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket.url.lit.expected.json b/packages/@aws-cdk/aws-s3/test/integ.bucket.url.lit.expected.json deleted file mode 100644 index 6ab5dcbfef26e..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.bucket.url.lit.expected.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Outputs": { - "BucketURL": { - "Value": { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "WebsiteURL" - ] - } - }, - "ObjectURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyBucketF68F3FF0" - }, - "/myfolder/myfile.txt" - ] - ] - } - }, - "VirtualHostedObjectURL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "RegionalDomainName" - ] - }, - "/myfolder/myfile.txt" - ] - ] - } - }, - "VirtualHostedObjectURLNonRegional": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Fn::GetAtt": [ - "MyBucketF68F3FF0", - "DomainName" - ] - }, - "/myfolder/myfile.txt" - ] - ] - } - }, - "S3ObjectURL": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyBucketF68F3FF0" - }, - "/myfolder/myfile.txt" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.lifecycle.expected.json b/packages/@aws-cdk/aws-s3/test/integ.lifecycle.expected.json deleted file mode 100644 index 941e7b87fb2f0..0000000000000 --- a/packages/@aws-cdk/aws-s3/test/integ.lifecycle.expected.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "Properties": { - "LifecycleConfiguration": { - "Rules": [ - { - "ExpirationDate": "2019-10-01T00:00:00", - "Status": "Enabled" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3objectlambda/test/integ.s3objectlambda.expected.json b/packages/@aws-cdk/aws-s3objectlambda/test/integ.s3objectlambda.expected.json deleted file mode 100644 index c134a1411a2cc..0000000000000 --- a/packages/@aws-cdk/aws-s3objectlambda/test/integ.s3objectlambda.expected.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyFunction1ServiceRole9852B06B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction1ServiceRoleDefaultPolicy39556460": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyFunction1ServiceRoleDefaultPolicy39556460", - "Roles": [ - { - "Ref": "MyFunction1ServiceRole9852B06B" - } - ] - } - }, - "MyFunction12A744C2E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunction1ServiceRole9852B06B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunction1ServiceRoleDefaultPolicy39556460", - "MyFunction1ServiceRole9852B06B" - ] - }, - "MyFunction2ServiceRole07E5BE0E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction2ServiceRoleDefaultPolicyA79C693E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyFunction2ServiceRoleDefaultPolicyA79C693E", - "Roles": [ - { - "Ref": "MyFunction2ServiceRole07E5BE0E" - } - ] - } - }, - "MyFunction2F2A964CA": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "foo" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunction2ServiceRole07E5BE0E", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "MyFunction2ServiceRoleDefaultPolicyA79C693E", - "MyFunction2ServiceRole07E5BE0E" - ] - }, - "MyObjectLambda1SupportingAccessPoint223B719B": { - "Type": "AWS::S3::AccessPoint", - "Properties": { - "Bucket": { - "Ref": "MyBucketF68F3FF0" - } - } - }, - "MyObjectLambda17554FEF4": { - "Type": "AWS::S3ObjectLambda::AccessPoint", - "Properties": { - "ObjectLambdaConfiguration": { - "AllowedFeatures": [ - "GetObject-PartNumber" - ], - "CloudWatchMetricsEnabled": true, - "SupportingAccessPoint": { - "Fn::GetAtt": [ - "MyObjectLambda1SupportingAccessPoint223B719B", - "Arn" - ] - }, - "TransformationConfigurations": [ - { - "Actions": [ - "GetObject" - ], - "ContentTransformation": { - "AwsLambda": { - "FunctionArn": { - "Fn::GetAtt": [ - "MyFunction12A744C2E", - "Arn" - ] - } - } - } - } - ] - } - } - }, - "MyObjectLambda2SupportingAccessPoint6C54778F": { - "Type": "AWS::S3::AccessPoint", - "Properties": { - "Bucket": { - "Ref": "MyBucketF68F3FF0" - } - } - }, - "MyObjectLambda2CCBCAAF7": { - "Type": "AWS::S3ObjectLambda::AccessPoint", - "Properties": { - "ObjectLambdaConfiguration": { - "AllowedFeatures": [ - "GetObject-Range" - ], - "SupportingAccessPoint": { - "Fn::GetAtt": [ - "MyObjectLambda2SupportingAccessPoint6C54778F", - "Arn" - ] - }, - "TransformationConfigurations": [ - { - "Actions": [ - "GetObject" - ], - "ContentTransformation": { - "AwsLambda": { - "FunctionArn": { - "Fn::GetAtt": [ - "MyFunction2F2A964CA", - "Arn" - ] - }, - "FunctionPayload": "{\"foo\":10}" - } - } - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.hosted-rotation.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.hosted-rotation.expected.json deleted file mode 100644 index 19c9a9d4c7f1e..0000000000000 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.hosted-rotation.expected.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "Transform": "AWS::SecretsManager-2020-07-23", - "Resources": { - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {} - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SecretSchedule18F2CB66": { - "Type": "AWS::SecretsManager::RotationSchedule", - "Properties": { - "SecretId": { - "Ref": "SecretA720EF05" - }, - "HostedRotationLambda": { - "RotationType": "MySQLSingleUser" - }, - "RotationRules": { - "AutomaticallyAfterDays": 30 - } - } - }, - "SecretPolicy06C9821C": { - "Type": "AWS::SecretsManager::ResourcePolicy", - "Properties": { - "ResourcePolicy": { - "Statement": [ - { - "Action": "secretsmanager:DeleteSecret", - "Effect": "Deny", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "SecretId": { - "Ref": "SecretA720EF05" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.lambda-rotation.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.lambda-rotation.expected.json deleted file mode 100644 index 7e903c33b48af..0000000000000 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.lambda-rotation.expected.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "Resources": { - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:CreateGrant", - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "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:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Condition": { - "StringEquals": { - "kms:ViaService": { - "Fn::Join": [ - "", - [ - "secretsmanager.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "LambdaServiceRoleA8ED4D3B", - "Arn" - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {}, - "KmsKeyId": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SecretSchedule18F2CB66": { - "Type": "AWS::SecretsManager::RotationSchedule", - "Properties": { - "SecretId": { - "Ref": "SecretA720EF05" - }, - "RotationLambdaARN": { - "Fn::GetAtt": [ - "LambdaD247545B", - "Arn" - ] - }, - "RotationRules": { - "AutomaticallyAfterDays": 30 - } - } - }, - "SecretPolicy06C9821C": { - "Type": "AWS::SecretsManager::ResourcePolicy", - "Properties": { - "ResourcePolicy": { - "Statement": [ - { - "Action": "secretsmanager:DeleteSecret", - "Effect": "Deny", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "SecretId": { - "Ref": "SecretA720EF05" - } - } - }, - "LambdaServiceRoleA8ED4D3B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LambdaServiceRoleDefaultPolicyDAE46E21": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue", - "secretsmanager:PutSecretValue", - "secretsmanager:UpdateSecretVersionStage" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - }, - { - "Action": "secretsmanager:GetRandomPassword", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaServiceRoleDefaultPolicyDAE46E21", - "Roles": [ - { - "Ref": "LambdaServiceRoleA8ED4D3B" - } - ] - } - }, - "LambdaD247545B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "NOOP" - }, - "Role": { - "Fn::GetAtt": [ - "LambdaServiceRoleA8ED4D3B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "LambdaServiceRoleDefaultPolicyDAE46E21", - "LambdaServiceRoleA8ED4D3B" - ] - }, - "LambdaInvokeServicePrincipalsecretsmanageramazonawscomB927629E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "LambdaD247545B", - "Arn" - ] - }, - "Principal": "secretsmanager.amazonaws.com" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.replica.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.replica.expected.json deleted file mode 100644 index 6483de751a884..0000000000000 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.replica.expected.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Resources": { - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {}, - "ReplicaRegions": [ - { - "Region": "eu-central-1" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json deleted file mode 100644 index b4a3687322701..0000000000000 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.expected.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "Resources": { - "DefaultSecret67034726": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {} - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "NamedSecret7CD5422D": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {}, - "Name": "namedSecret" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "NamedSecretWithHyphen6DC9716A": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {}, - "Name": "named-secret-1" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {} - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A": { - "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", - "Resource": [ - { - "Ref": "DefaultSecret67034726" - }, - { - "Ref": "NamedSecret7CD5422D" - }, - { - "Ref": "NamedSecretWithHyphen6DC9716A" - }, - { - "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" - } - ], - "Action": [ - "secretsmanager:DescribeSecret" - ] - } - ] - } - } - ] - } - }, - "CustomIntegVerificationSecretNameMatchesCustomResourceProviderHandler2A57F6AE": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33S3Bucket499DB3A2" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33S3VersionKey8F35128C" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33S3VersionKey8F35128C" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A", - "Arn" - ] - }, - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "CustomIntegVerificationSecretNameMatchesCustomResourceProviderRole4A6F8B2A" - ] - }, - "SecretNameVerification": { - "Type": "Custom::IntegVerificationSecretNameMatches", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomIntegVerificationSecretNameMatchesCustomResourceProviderHandler2A57F6AE", - "Arn" - ] - }, - "Secrets": [ - { - "secretArn": { - "Ref": "DefaultSecret67034726" - }, - "secretName": { - "Fn::Join": [ - "-", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "DefaultSecret67034726" - } - ] - } - ] - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "DefaultSecret67034726" - } - ] - } - ] - } - ] - } - ] - } - ] - ] - } - }, - { - "secretArn": { - "Ref": "NamedSecret7CD5422D" - }, - "secretName": { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "NamedSecret7CD5422D" - } - ] - } - ] - } - ] - } - ] - } - }, - { - "secretArn": { - "Ref": "NamedSecretWithHyphen6DC9716A" - }, - "secretName": { - "Fn::Join": [ - "-", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "NamedSecretWithHyphen6DC9716A" - } - ] - } - ] - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "NamedSecretWithHyphen6DC9716A" - } - ] - } - ] - } - ] - } - ] - }, - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "NamedSecretWithHyphen6DC9716A" - } - ] - } - ] - } - ] - } - ] - } - ] - ] - } - }, - { - "secretArn": { - "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" - }, - "secretName": { - "Fn::Join": [ - "-", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" - } - ] - } - ] - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "-", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "AReallyLongLogicalIThatWillBeTrimmedBeforeItsUsedInTheName83476586" - } - ] - } - ] - } - ] - } - ] - } - ] - ] - } - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33S3Bucket499DB3A2": { - "Type": "String", - "Description": "S3 bucket for asset \"7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33\"" - }, - "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33S3VersionKey8F35128C": { - "Type": "String", - "Description": "S3 key for asset version \"7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33\"" - }, - "AssetParameters7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33ArtifactHashD7AC58BE": { - "Type": "String", - "Description": "Artifact hash for asset \"7452e934e8e327a54ba0c8e462065f22bf095d0722d22cc4c29d2ed4c2f2ff33\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.expected.json b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.expected.json deleted file mode 100644 index 62a4980a4548a..0000000000000 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.expected.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "Resources": { - "TestRole6C9272DF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestRoleDefaultPolicyD1C92014": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestRoleDefaultPolicyD1C92014", - "Roles": [ - { - "Ref": "TestRole6C9272DF" - } - ] - } - }, - "SecretA720EF05": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": {} - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "User00B015A1": { - "Type": "AWS::IAM::User", - "Properties": { - "LoginProfile": { - "Password": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "SecretA720EF05" - }, - ":SecretString:::}}" - ] - ] - } - } - } - }, - "TemplatedSecret3D98B577": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "GenerateSecretString": { - "GenerateStringKey": "password", - "SecretStringTemplate": "{\"username\":\"user\"}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "OtherUser6093621C": { - "Type": "AWS::IAM::User", - "Properties": { - "LoginProfile": { - "Password": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "TemplatedSecret3D98B577" - }, - ":SecretString:password::}}" - ] - ] - } - }, - "UserName": { - "Fn::Join": [ - "", - [ - "{{resolve:secretsmanager:", - { - "Ref": "TemplatedSecret3D98B577" - }, - ":SecretString:username::}}" - ] - ] - } - } - }, - "AccessKeyE6B25659": { - "Type": "AWS::IAM::AccessKey", - "Properties": { - "UserName": { - "Ref": "User00B015A1" - } - } - }, - "PredefinedSecret660AF4EC": { - "Type": "AWS::SecretsManager::Secret", - "Properties": { - "SecretString": { - "Fn::GetAtt": [ - "AccessKeyE6B25659", - "SecretAccessKey" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalog/test/integ.portfolio.expected.json b/packages/@aws-cdk/aws-servicecatalog/test/integ.portfolio.expected.json deleted file mode 100644 index c25d867209591..0000000000000 --- a/packages/@aws-cdk/aws-servicecatalog/test/integ.portfolio.expected.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "Resources": { - "TestRole6C9272DF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestGroupAF88660E": { - "Type": "AWS::IAM::Group" - }, - "TestPortfolio4AC794EB": { - "Type": "AWS::ServiceCatalog::Portfolio", - "Properties": { - "DisplayName": "TestPortfolio", - "ProviderName": "TestProvider", - "AcceptLanguage": "en", - "Description": "This is our Service Catalog Portfolio" - } - }, - "TestPortfolioPortolioPrincipalAssociation20e1afa20ac27E1A060D": { - "Type": "AWS::ServiceCatalog::PortfolioPrincipalAssociation", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "PrincipalARN": { - "Fn::GetAtt": [ - "TestRole6C9272DF", - "Arn" - ] - }, - "PrincipalType": "IAM" - } - }, - "TestPortfolioPortolioPrincipalAssociation44a1ca1c23384D6E460B": { - "Type": "AWS::ServiceCatalog::PortfolioPrincipalAssociation", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "PrincipalARN": { - "Fn::GetAtt": [ - "TestGroupAF88660E", - "Arn" - ] - }, - "PrincipalType": "IAM" - } - }, - "TestPortfolioTagOptionAssociation517ba9dbaf19EA8252F0": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestPortfolio4AC794EB" - }, - "TagOptionId": { - "Ref": "TagOptions5f31c54ba705F110F743" - } - } - }, - "TestPortfolioTagOptionAssociationb38e9aae7f1bD3708991": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestPortfolio4AC794EB" - }, - "TagOptionId": { - "Ref": "TagOptions8d263919cebb6764AC10" - } - } - }, - "TestPortfolioTagOptionAssociationeeabbf0db0e3ADBF0A6D": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestPortfolio4AC794EB" - }, - "TagOptionId": { - "Ref": "TagOptionsa260cbbd99c416C40F73" - } - } - }, - "TestPortfolioPortfolioSharebf5b82f042508F035880": { - "Type": "AWS::ServiceCatalog::PortfolioShare", - "Properties": { - "AccountId": "123456789012", - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - } - } - }, - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7": { - "Type": "AWS::ServiceCatalog::PortfolioProductAssociation", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - } - } - }, - "TestPortfolioResourceUpdateConstrainta0185761d231AB0EAAE0": { - "Type": "AWS::ServiceCatalog::ResourceUpdateConstraint", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - }, - "TagUpdateOnProvisionedProduct": "ALLOWED" - }, - "DependsOn": [ - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7" - ] - }, - "TestPortfolioLaunchNotificationConstraintf2572fdcecadB6DD8541": { - "Type": "AWS::ServiceCatalog::LaunchNotificationConstraint", - "Properties": { - "NotificationArns": [ - { - "Ref": "Topic198E71B3E" - } - ], - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - } - }, - "DependsOn": [ - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7" - ] - }, - "TestPortfolioLaunchNotificationConstrainta9675fc4d6aa995BF1B9": { - "Type": "AWS::ServiceCatalog::LaunchNotificationConstraint", - "Properties": { - "NotificationArns": [ - { - "Ref": "specialTopic7664DE4C" - } - ], - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - }, - "AcceptLanguage": "en", - "Description": "special topic description" - }, - "DependsOn": [ - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7" - ] - }, - "TestPortfolioLaunchRoleConstrainta0185761d2312183162C": { - "Type": "AWS::ServiceCatalog::LaunchRoleConstraint", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - }, - "RoleArn": { - "Fn::GetAtt": [ - "LaunchRole2CFB2E44", - "Arn" - ] - } - }, - "DependsOn": [ - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7" - ] - }, - "TestPortfolioLaunchTemplateConstraintfac7b49c426e599F9FFF": { - "Type": "AWS::ServiceCatalog::LaunchTemplateConstraint", - "Properties": { - "PortfolioId": { - "Ref": "TestPortfolio4AC794EB" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - }, - "Rules": "{\"SubnetsinVPC\":{\"Assertions\":[{\"Assert\":{\"Fn::EachMemberIn\":[{\"Fn::ValueOfAll\":[\"AWs::EC2::Subnet::Id\",\"VpcId\"]},{\"Fn::RefAll\":\"AWS::EC2::VPC::Id\"}]},\"AssertDescription\":\"test description\"}]}}" - }, - "DependsOn": [ - "TestPortfolioPortfolioProductAssociationa0185761d231B0D998A7" - ] - }, - "TagOptions5f31c54ba705F110F743": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key1", - "Value": "value1", - "Active": true - } - }, - "TagOptions8d263919cebb6764AC10": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key1", - "Value": "value2", - "Active": true - } - }, - "TagOptionsa260cbbd99c416C40F73": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key2", - "Value": "value1", - "Active": true - } - }, - "TestProduct7606930B": { - "Type": "AWS::ServiceCatalog::CloudFormationProduct", - "Properties": { - "Name": "testProduct", - "Owner": "testOwner", - "ProvisioningArtifactParameters": [ - { - "DisableTemplateValidation": true, - "Info": { - "LoadTemplateFromURL": "https://awsdocs.s3.amazonaws.com/servicecatalog/development-environment.template" - } - } - ] - } - }, - "TestProductTagOptionAssociation667d45e6d8a1F30303D6": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptions5f31c54ba705F110F743" - } - } - }, - "TestProductTagOptionAssociationec68fcd0154fF6DAD979": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptions8d263919cebb6764AC10" - } - } - }, - "TestProductTagOptionAssociation259ba31b62cc63D068F9": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptionsa260cbbd99c416C40F73" - } - } - }, - "Topic198E71B3E": { - "Type": "AWS::SNS::Topic" - }, - "specialTopic7664DE4C": { - "Type": "AWS::SNS::Topic" - }, - "LaunchRole2CFB2E44": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "servicecatalog.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "SecondTestPortfolio96C8F4BA": { - "Type": "AWS::ServiceCatalog::Portfolio", - "Properties": { - "DisplayName": "SecondTestPortfolio", - "ProviderName": "TestProvider" - } - }, - "SecondTestPortfolioPortfolioProductAssociationcda67a671c209FE862F2": { - "Type": "AWS::ServiceCatalog::PortfolioProductAssociation", - "Properties": { - "PortfolioId": { - "Ref": "SecondTestPortfolio96C8F4BA" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - } - } - }, - "SecondTestPortfolioStackSetConstraintcda67a671c20A02367A6": { - "Type": "AWS::ServiceCatalog::StackSetConstraint", - "Properties": { - "AccountList": [ - "000000000000", - "111111111111", - "222222222222" - ], - "AdminRole": { - "Fn::GetAtt": [ - "AdminRole38563C57", - "Arn" - ] - }, - "Description": "", - "ExecutionRole": "StackSetExecutionRole", - "PortfolioId": { - "Ref": "SecondTestPortfolio96C8F4BA" - }, - "ProductId": { - "Ref": "TestProduct7606930B" - }, - "RegionList": [ - "us-east-1", - "us-west-2", - "eu-west-1" - ], - "StackInstanceControl": "ALLOWED" - }, - "DependsOn": [ - "SecondTestPortfolioPortfolioProductAssociationcda67a671c209FE862F2" - ] - }, - "AdminRole38563C57": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalog/test/integ.product.expected.json b/packages/@aws-cdk/aws-servicecatalog/test/integ.product.expected.json deleted file mode 100644 index 05ea621ec10fd..0000000000000 --- a/packages/@aws-cdk/aws-servicecatalog/test/integ.product.expected.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "Resources": { - "TestProduct7606930B": { - "Type": "AWS::ServiceCatalog::CloudFormationProduct", - "Properties": { - "Name": "testProduct", - "Owner": "testOwner", - "ProvisioningArtifactParameters": [ - { - "DisableTemplateValidation": true, - "Info": { - "LoadTemplateFromURL": "https://awsdocs.s3.amazonaws.com/servicecatalog/development-environment.template" - } - }, - { - "DisableTemplateValidation": false, - "Info": { - "LoadTemplateFromURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eS3BucketCF629374" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eS3VersionKeyC94BC7EE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eS3VersionKeyC94BC7EE" - } - ] - } - ] - } - ] - ] - } - } - }, - { - "DisableTemplateValidation": false, - "Info": { - "LoadTemplateFromURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5S3Bucket85C3FF42" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5S3VersionKey34A02667" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5S3VersionKey34A02667" - } - ] - } - ] - } - ] - ] - } - } - }, - { - "DisableTemplateValidation": false, - "Info": { - "LoadTemplateFromURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3BucketB4751C98" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3VersionKeyEB38C6F9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3VersionKeyEB38C6F9" - } - ] - } - ] - } - ] - ] - } - } - }, - { - "DisableTemplateValidation": false, - "Info": { - "LoadTemplateFromURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3BucketB4751C98" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3VersionKeyEB38C6F9" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3VersionKeyEB38C6F9" - } - ] - } - ] - } - ] - ] - } - } - } - ] - } - }, - "TestProductTagOptionAssociation0d813eebb333DA3E2F21": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptions5f31c54ba705F110F743" - } - } - }, - "TestProductTagOptionAssociation5d93a5c977b4B664DD87": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptions8d263919cebb6764AC10" - } - } - }, - "TestProductTagOptionAssociationcfaf40b186a3E5FDECDC": { - "Type": "AWS::ServiceCatalog::TagOptionAssociation", - "Properties": { - "ResourceId": { - "Ref": "TestProduct7606930B" - }, - "TagOptionId": { - "Ref": "TagOptionsa260cbbd99c416C40F73" - } - } - }, - "TagOptions5f31c54ba705F110F743": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key1", - "Value": "value1", - "Active": true - } - }, - "TagOptions8d263919cebb6764AC10": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key1", - "Value": "value2", - "Active": true - } - }, - "TagOptionsa260cbbd99c416C40F73": { - "Type": "AWS::ServiceCatalog::TagOption", - "Properties": { - "Key": "key2", - "Value": "value1", - "Active": true - } - } - }, - "Parameters": { - "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eS3BucketCF629374": { - "Type": "String", - "Description": "S3 bucket for asset \"b59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09e\"" - }, - "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eS3VersionKeyC94BC7EE": { - "Type": "String", - "Description": "S3 key for asset version \"b59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09e\"" - }, - "AssetParametersb59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09eArtifactHashB9EF04B2": { - "Type": "String", - "Description": "Artifact hash for asset \"b59f768286e16b69628bb23b9c1a1f07300a24101b8979d8e2a94ff1ab03d09e\"" - }, - "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5S3Bucket85C3FF42": { - "Type": "String", - "Description": "S3 bucket for asset \"6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5\"" - }, - "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5S3VersionKey34A02667": { - "Type": "String", - "Description": "S3 key for asset version \"6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5\"" - }, - "AssetParameters6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5ArtifactHashDC26AFAC": { - "Type": "String", - "Description": "Artifact hash for asset \"6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5\"" - }, - "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3BucketB4751C98": { - "Type": "String", - "Description": "S3 bucket for asset \"dd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1f\"" - }, - "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fS3VersionKeyEB38C6F9": { - "Type": "String", - "Description": "S3 key for asset version \"dd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1f\"" - }, - "AssetParametersdd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1fArtifactHash5C1F9228": { - "Type": "String", - "Description": "Artifact hash for asset \"dd2d087eeb6ede1d2a9166639ccbde7bd1b10eef9ba2b4cb3d9855faa4fe8c1f\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json deleted file mode 100644 index 562d0de4d3b84..0000000000000 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "Resources": { - "TestApplication2FBC585F": { - "Type": "AWS::ServiceCatalogAppRegistry::Application", - "Properties": { - "Name": "myApplicationtest", - "Description": "my application description" - } - }, - "TestApplicationResourceAssociationd232b63e52a8414E905D": { - "Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation", - "Properties": { - "Application": { - "Fn::GetAtt": [ - "TestApplication2FBC585F", - "Id" - ] - }, - "Resource": { - "Ref": "AWS::StackId" - }, - "ResourceType": "CFN_STACK" - } - }, - "TestApplicationAttributeGroupAssociation4ba7f5842818B8EE1C6F": { - "Type": "AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation", - "Properties": { - "Application": { - "Fn::GetAtt": [ - "TestApplication2FBC585F", - "Id" - ] - }, - "AttributeGroup": { - "Fn::GetAtt": [ - "TestAttributeGroupB1CB284F", - "Id" - ] - } - } - }, - "TestAttributeGroupB1CB284F": { - "Type": "AWS::ServiceCatalogAppRegistry::AttributeGroup", - "Properties": { - "Attributes": { - "stage": "alpha", - "teamMembers": [ - "markI", - "markII", - "markIII" - ], - "public": false, - "publishYear": 2021, - "plannedRoadMap": { - "alpha": "some time", - "beta": "another time", - "gamma": "penultimate time", - "release": "go time" - } - }, - "Name": "myAttributeGroupTest", - "Description": "my attribute group description" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.expected.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.expected.json deleted file mode 100644 index 28e604a883d70..0000000000000 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.expected.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Resources": { - "TestAttributeGroupB1CB284F": { - "Type": "AWS::ServiceCatalogAppRegistry::AttributeGroup", - "Properties": { - "Attributes": { - "stage": "alpha", - "teamMembers": [ - "markI", - "markII", - "markIII" - ], - "plannedRoadMap": { - "alpha": "time1", - "beta": "time2" - } - }, - "Name": "myAttributeGroupTest", - "Description": "my attribute group description" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-cname-record.lit.expected.json b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-cname-record.lit.expected.json deleted file mode 100644 index f9065a5add49d..0000000000000 --- a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-cname-record.lit.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Resources": { - "Namespace9B63B8C8": { - "Type": "AWS::ServiceDiscovery::PublicDnsNamespace", - "Properties": { - "Name": "foobar.com" - } - }, - "NamespaceServiceCABDF534": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 30, - "Type": "CNAME" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - }, - "RoutingPolicy": "WEIGHTED" - }, - "Name": "foo", - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - } - } - }, - "NamespaceServiceCnameInstance5863ED3A": { - "Type": "AWS::ServiceDiscovery::Instance", - "Properties": { - "InstanceAttributes": { - "AWS_INSTANCE_CNAME": "service.pizza" - }, - "ServiceId": { - "Fn::GetAtt": [ - "NamespaceServiceCABDF534", - "Id" - ] - }, - "InstanceId": "awsservicediscoveryintegNamespaceServiceCnameInstance0F7DE989" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-http-namespace.lit.expected.json b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-http-namespace.lit.expected.json deleted file mode 100644 index 69355efb172d9..0000000000000 --- a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-http-namespace.lit.expected.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "Resources": { - "MyNamespaceD0BB8558": { - "Type": "AWS::ServiceDiscovery::HttpNamespace", - "Properties": { - "Name": "covfefe" - } - }, - "MyNamespaceNonIpService3B425009": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "Description": "service registering non-ip instances", - "NamespaceId": { - "Fn::GetAtt": [ - "MyNamespaceD0BB8558", - "Id" - ] - } - } - }, - "MyNamespaceNonIpServiceNonIpInstanceFF8FB3DE": { - "Type": "AWS::ServiceDiscovery::Instance", - "Properties": { - "InstanceAttributes": { - "arn": "arn:aws:s3:::mybucket" - }, - "ServiceId": { - "Fn::GetAtt": [ - "MyNamespaceNonIpService3B425009", - "Id" - ] - }, - "InstanceId": "ervicediscoveryintegMyNamespaceNonIpServiceNonIpInstance45389A2A" - } - }, - "MyNamespaceIpService220F547F": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "Description": "service registering ip instances", - "HealthCheckConfig": { - "FailureThreshold": 1, - "ResourcePath": "/check", - "Type": "HTTP" - }, - "NamespaceId": { - "Fn::GetAtt": [ - "MyNamespaceD0BB8558", - "Id" - ] - } - } - }, - "MyNamespaceIpServiceIpInstance8CD1B210": { - "Type": "AWS::ServiceDiscovery::Instance", - "Properties": { - "InstanceAttributes": { - "AWS_INSTANCE_IPV4": "54.239.25.192", - "AWS_INSTANCE_PORT": "80" - }, - "ServiceId": { - "Fn::GetAtt": [ - "MyNamespaceIpService220F547F", - "Id" - ] - }, - "InstanceId": "awsservicediscoveryintegMyNamespaceIpServiceIpInstance56070746" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.expected.json b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.expected.json deleted file mode 100644 index b94cc2060e80b..0000000000000 --- a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.expected.json +++ /dev/null @@ -1,469 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-servicediscovery-integ/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "Namespace9B63B8C8": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "boobar.com", - "Vpc": { - "Ref": "Vpc8378EB38" - } - } - }, - "NamespaceServiceCABDF534": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 30, - "Type": "A" - }, - { - "TTL": 30, - "Type": "AAAA" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - }, - "RoutingPolicy": "WEIGHTED" - }, - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - } - } - }, - "NamespaceServiceLoadbalancerD271391A": { - "Type": "AWS::ServiceDiscovery::Instance", - "Properties": { - "InstanceAttributes": { - "AWS_ALIAS_DNS_NAME": { - "Fn::GetAtt": [ - "LB8A12904C", - "DNSName" - ] - } - }, - "ServiceId": { - "Fn::GetAtt": [ - "NamespaceServiceCABDF534", - "Id" - ] - }, - "InstanceId": "awsservicediscoveryintegNamespaceServiceLoadbalancerA3D252B2" - } - }, - "LB8A12904C": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internet-facing", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "LBSecurityGroup8A41EA2B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - ], - "Type": "application" - }, - "DependsOn": [ - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet2DefaultRoute97F91067" - ] - }, - "LBSecurityGroup8A41EA2B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB awsservicediscoveryintegLB0601B046", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.expected.json b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.expected.json deleted file mode 100644 index 7a5183b0361e3..0000000000000 --- a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.expected.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "Resources": { - "Namespace9B63B8C8": { - "Type": "AWS::ServiceDiscovery::PublicDnsNamespace", - "Properties": { - "Name": "foobar.com" - } - }, - "NamespaceServiceCABDF534": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 30, - "Type": "A" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "HealthCheckConfig": { - "FailureThreshold": 2, - "ResourcePath": "/healthcheck", - "Type": "HTTPS" - }, - "Name": "foo", - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - } - } - }, - "NamespaceServiceIpInstanceCCED93E7": { - "Type": "AWS::ServiceDiscovery::Instance", - "Properties": { - "InstanceAttributes": { - "AWS_INSTANCE_IPV4": "54.239.25.192", - "AWS_INSTANCE_PORT": "443" - }, - "ServiceId": { - "Fn::GetAtt": [ - "NamespaceServiceCABDF534", - "Id" - ] - }, - "InstanceId": "awsservicediscoveryintegNamespaceServiceIpInstance5A6845D4" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json b/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json deleted file mode 100644 index 22aa1e4657fdc..0000000000000 --- a/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "Resources": { - "TopicBFC7AF6E": { - "Type": "AWS::SNS::Topic" - }, - "FunctionServiceRole675BB04A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Function76856677": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async (event) => event;" - }, - "Role": { - "Fn::GetAtt": [ - "FunctionServiceRole675BB04A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FunctionServiceRole675BB04A" - ] - }, - "FunctionAllowSes1829904A": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - }, - "Principal": "ses.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - } - } - }, - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "BucketPolicyE9A3008A": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "Bucket83908E77" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutObject", - "Condition": { - "StringEquals": { - "aws:Referer": { - "Ref": "AWS::AccountId" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "ses.amazonaws.com" - }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/emails/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "Key961B73FD": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Encrypt", - "kms:GenerateDataKey" - ], - "Condition": { - "Null": { - "kms:EncryptionContext:aws:ses:rule-name": "false", - "kms:EncryptionContext:aws:ses:message-id": "false" - }, - "StringEquals": { - "kms:EncryptionContext:aws:ses:source-account": { - "Ref": "AWS::AccountId" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "ses.amazonaws.com" - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "RuleSetE30C6C48": { - "Type": "AWS::SES::ReceiptRuleSet" - }, - "RuleSetDropSpamRule5809F51B": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Actions": [ - { - "LambdaAction": { - "FunctionArn": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15", - "Arn" - ] - }, - "InvocationType": "RequestResponse" - } - } - ], - "Enabled": true, - "ScanEnabled": true - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - } - } - }, - "RuleSetFirstRule0A27C8CC": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Actions": [ - { - "AddHeaderAction": { - "HeaderName": "X-My-Header", - "HeaderValue": "value" - } - }, - { - "LambdaAction": { - "FunctionArn": { - "Fn::GetAtt": [ - "Function76856677", - "Arn" - ] - }, - "InvocationType": "RequestResponse", - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - } - }, - { - "S3Action": { - "BucketName": { - "Ref": "Bucket83908E77" - }, - "KmsKeyArn": { - "Fn::GetAtt": [ - "Key961B73FD", - "Arn" - ] - }, - "ObjectKeyPrefix": "emails/", - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - } - }, - { - "SNSAction": { - "Encoding": "Base64", - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - } - }, - { - "BounceAction": { - "Message": "Message content rejected", - "Sender": "cdk-ses-receipt-test@yopmail.com", - "SmtpReplyCode": "500", - "StatusCode": "5.6.1", - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - } - } - ], - "Enabled": true, - "Name": "FirstRule", - "Recipients": [ - "cdk-ses-receipt-test@yopmail.com" - ], - "ScanEnabled": true, - "TlsPolicy": "Require" - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - }, - "After": { - "Ref": "RuleSetDropSpamRule5809F51B" - } - }, - "DependsOn": [ - "BucketPolicyE9A3008A", - "FunctionAllowSes1829904A" - ] - }, - "RuleSetSecondRule03178AD4": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Actions": [ - { - "StopAction": { - "Scope": "RuleSet", - "TopicArn": { - "Ref": "TopicBFC7AF6E" - } - } - } - ], - "Enabled": true - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - }, - "After": { - "Ref": "RuleSetFirstRule0A27C8CC" - } - } - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4" - ] - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba16AllowSesB42DF904": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15", - "Arn" - ] - }, - "Principal": "ses.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - } - } - } - }, - "Parameters": { - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F": { - "Type": "String", - "Description": "S3 bucket for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - }, - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086": { - "Type": "String", - "Description": "S3 key for asset version \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - }, - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34ArtifactHash6BE57680": { - "Type": "String", - "Description": "Artifact hash for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/integ.receipt.expected.json b/packages/@aws-cdk/aws-ses/test/integ.receipt.expected.json deleted file mode 100644 index f0a9a624f4f3f..0000000000000 --- a/packages/@aws-cdk/aws-ses/test/integ.receipt.expected.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "Resources": { - "RuleSetE30C6C48": { - "Type": "AWS::SES::ReceiptRuleSet" - }, - "RuleSetDropSpamRule5809F51B": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Actions": [ - { - "LambdaAction": { - "FunctionArn": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15", - "Arn" - ] - }, - "InvocationType": "RequestResponse" - } - } - ], - "Enabled": true, - "ScanEnabled": true - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - } - } - }, - "RuleSetFirstRule0A27C8CC": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Enabled": true, - "Name": "FirstRule", - "Recipients": [ - "cdk-ses-receipt-test@yopmail.com" - ], - "ScanEnabled": true, - "TlsPolicy": "Require" - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - }, - "After": { - "Ref": "RuleSetDropSpamRule5809F51B" - } - } - }, - "RuleSetSecondRule03178AD4": { - "Type": "AWS::SES::ReceiptRule", - "Properties": { - "Rule": { - "Enabled": true - }, - "RuleSetName": { - "Ref": "RuleSetE30C6C48" - }, - "After": { - "Ref": "RuleSetFirstRule0A27C8CC" - } - } - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4" - ] - }, - "SingletonLambda224e77f9a32e4b4dac32983477abba16AllowSesB42DF904": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "SingletonLambda224e77f9a32e4b4dac32983477abba164533EA15", - "Arn" - ] - }, - "Principal": "ses.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - } - } - }, - "AllowlistBlockAll7E0A7F11": { - "Type": "AWS::SES::ReceiptFilter", - "Properties": { - "Filter": { - "IpFilter": { - "Cidr": "0.0.0.0/0", - "Policy": "Block" - } - } - } - }, - "AllowlistAllow1000016E9465A18": { - "Type": "AWS::SES::ReceiptFilter", - "Properties": { - "Filter": { - "IpFilter": { - "Cidr": "10.0.0.0/16", - "Policy": "Allow" - } - } - } - } - }, - "Parameters": { - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F": { - "Type": "String", - "Description": "S3 bucket for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - }, - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086": { - "Type": "String", - "Description": "S3 key for asset version \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - }, - "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34ArtifactHash6BE57680": { - "Type": "String", - "Description": "Artifact hash for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda-cross-region.expected.json b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda-cross-region.expected.json deleted file mode 100644 index 4d177008c6722..0000000000000 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda-cross-region.expected.json +++ /dev/null @@ -1,116 +0,0 @@ -[ - { - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic", - "Properties": { - "TopicName": "topicstackopicstackmytopicc43e67afb24f28bb94f9" - } - } - } - }, - { - "Resources": { - "EchoServiceRoleBE28060B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Echo11F3FB29": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n /* eslint-disable no-console */\n console.log('====================================================');\n console.log(JSON.stringify(event, undefined, 2));\n console.log('====================================================');\n return callback(undefined, event);\n}" - }, - "Role": { - "Fn::GetAtt": [ - "EchoServiceRoleBE28060B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "EchoServiceRoleBE28060B" - ] - }, - "EchoAllowInvokeTopicStackMyTopicC43E67AF32CF6EFA": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Echo11F3FB29", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sns:us-east-1:12345678:topicstackopicstackmytopicc43e67afb24f28bb94f9" - ] - ] - } - } - }, - "EchoMyTopic4CB8819E": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sns:us-east-1:12345678:topicstackopicstackmytopicc43e67afb24f28bb94f9" - ] - ] - }, - "Endpoint": { - "Fn::GetAtt": [ - "Echo11F3FB29", - "Arn" - ] - }, - "Region": "us-east-1" - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.expected.json b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.expected.json deleted file mode 100644 index 035d9df3a990b..0000000000000 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.expected.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "EchoServiceRoleBE28060B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Echo11F3FB29": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n /* eslint-disable no-console */\n console.log('====================================================');\n console.log(JSON.stringify(event, undefined, 2));\n console.log('====================================================');\n return callback(undefined, event);\n}" - }, - "Role": { - "Fn::GetAtt": [ - "EchoServiceRoleBE28060B", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "EchoServiceRoleBE28060B" - ] - }, - "EchoAllowInvokeawscdksnslambdaMyTopic6C62AB907F727CDA": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Echo11F3FB29", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "EchoMyTopic4CB8819E": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "Echo11F3FB29", - "Arn" - ] - }, - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - } - } - }, - "DeadLetterQueue9F481546": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeadLetterQueuePolicyB1FB890C": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "DeadLetterQueue9F481546" - } - ] - } - }, - "FilteredServiceRole16D9DDC1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Filtered186C0D0A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n /* eslint-disable no-console */\n console.log('====================================================');\n console.log(JSON.stringify(event, undefined, 2));\n console.log('====================================================');\n return callback(undefined, event);\n}" - }, - "Role": { - "Fn::GetAtt": [ - "FilteredServiceRole16D9DDC1", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "FilteredServiceRole16D9DDC1" - ] - }, - "FilteredAllowInvokeawscdksnslambdaMyTopic6C62AB90A2EA1666": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Filtered186C0D0A", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "FilteredMyTopicC8395C27": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "Filtered186C0D0A", - "Arn" - ] - }, - "FilterPolicy": { - "color": [ - "red", - { - "prefix": "bl" - }, - { - "prefix": "ye" - } - ], - "size": [ - { - "anything-but": [ - "small", - "medium" - ] - } - ], - "price": [ - { - "numeric": [ - ">=", - 100, - "<=", - 200 - ] - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs-cross-region.lit.expected.json b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs-cross-region.lit.expected.json deleted file mode 100644 index 5bbffb5e31628..0000000000000 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs-cross-region.lit.expected.json +++ /dev/null @@ -1,90 +0,0 @@ -[ - { - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic", - "Properties": { - "TopicName": "topicstackopicstackmytopicc43e67afb24f28bb94f9" - } - } - } - }, - { - "Resources": { - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sns:us-east-1:12345678:topicstackopicstackmytopicc43e67afb24f28bb94f9" - ] - ] - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyQueueTopicStackMyTopicC43E67AFC8DC8B4A": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sns:us-east-1:12345678:topicstackopicstackmytopicc43e67afb24f28bb94f9" - ] - ] - }, - "Endpoint": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - }, - "Region": "us-east-1" - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.expected.json b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.expected.json deleted file mode 100644 index f9b68ad7da9ca..0000000000000 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.expected.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyQueueawscdksnssqsMyTopic9361DEA223429051": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - }, - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - } - } - }, - "DeadLetterQueue9F481546": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeadLetterQueuePolicyB1FB890C": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "DeadLetterQueue9F481546" - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns/test/integ.sns-fifo.expected.json b/packages/@aws-cdk/aws-sns/test/integ.sns-fifo.expected.json deleted file mode 100644 index 3ec2f43e17317..0000000000000 --- a/packages/@aws-cdk/aws-sns/test/integ.sns-fifo.expected.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic", - "Properties": { - "ContentBasedDeduplication": true, - "DisplayName": "fooDisplayName", - "FifoTopic": true, - "TopicName": "fooTopic.fifo" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns/test/integ.sns.expected.json b/packages/@aws-cdk/aws-sns/test/integ.sns.expected.json deleted file mode 100644 index 86cfd60faf932..0000000000000 --- a/packages/@aws-cdk/aws-sns/test/integ.sns.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Resources": { - "CustomKey1E6D0D07": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyTopic86869434": { - "Type": "AWS::SNS::Topic", - "Properties": { - "DisplayName": "fooDisplayName", - "KmsMasterKeyId": { - "Fn::GetAtt": [ - "CustomKey1E6D0D07", - "Arn" - ] - }, - "TopicName": "fooTopic" - } - } - } -} diff --git a/packages/@aws-cdk/aws-sqs/test/integ.sqs.expected.json b/packages/@aws-cdk/aws-sqs/test/integ.sqs.expected.json deleted file mode 100644 index a25e39dc58a03..0000000000000 --- a/packages/@aws-cdk/aws-sqs/test/integ.sqs.expected.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "Resources": { - "DeadLetterQueue9F481546": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Queue4A7E3555": { - "Type": "AWS::SQS::Queue", - "Properties": { - "KmsMasterKeyId": "alias/aws/sqs", - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - }, - "maxReceiveCount": 5 - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EncryptionKey1B843E66": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "FifoQueueE5FF7273": { - "Type": "AWS::SQS::Queue", - "Properties": { - "FifoQueue": true, - "KmsMasterKeyId": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "HighThroughputFifoQueue40A0EEE4": { - "Type": "AWS::SQS::Queue", - "Properties": { - "DeduplicationScope": "messageGroup", - "FifoQueue": true, - "FifoThroughputLimit": "perMessageGroupId" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RoleDefaultPolicy5FFB7DAB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ChangeMessageVisibility", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes", - "sqs:GetQueueUrl", - "sqs:ReceiveMessage" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "FifoQueueE5FF7273", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "HighThroughputFifoQueue40A0EEE4", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Queue4A7E3555", - "Arn" - ] - } - ] - }, - { - "Action": "kms:Decrypt", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RoleDefaultPolicy5FFB7DAB", - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - } - }, - "Outputs": { - "QueueUrl": { - "Value": { - "Ref": "Queue4A7E3555" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.expected.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.expected.json deleted file mode 100644 index 1c4b0348b7888..0000000000000 --- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.expected.json +++ /dev/null @@ -1,287 +0,0 @@ -{ - "Parameters": { - "ParameterNameParameter": { - "Type": "String", - "Default": "myParamName" - } - }, - "Resources": { - "StringAutogenE7E896E4": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "hello, world" - } - }, - "StringSimpleA681514D": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "hello, world", - "Name": "simple-name" - } - }, - "StringPathD8120137": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "hello, world", - "Name": "/path/name/foo/bar" - } - }, - "ListAutogenC5DA1CAE": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "StringList", - "Value": "hello,world" - } - }, - "ListSimple9DB641CB": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "StringList", - "Value": "hello,world", - "Name": "list-simple-name" - } - }, - "ListPath120D6FAB": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "StringList", - "Value": "hello,world", - "Name": "/list/path/name" - } - }, - "ParameterizedSimpleB6311859": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "hello, world", - "Name": { - "Ref": "ParameterNameParameter" - } - } - }, - "ParameterizedNonSimple23C44BF6": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "hello, world", - "Name": { - "Fn::Join": [ - "", - [ - "/", - { - "Ref": "ParameterNameParameter" - }, - "/non/simple" - ] - ] - } - } - } - }, - "Outputs": { - "StringAutogenArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "StringAutogenE7E896E4" - } - ] - ] - } - }, - "StringSimpleArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "StringSimpleA681514D" - } - ] - ] - } - }, - "StringPathArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter", - { - "Ref": "StringPathD8120137" - } - ] - ] - } - }, - "ListAutogenArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "ListAutogenC5DA1CAE" - } - ] - ] - } - }, - "ListSimpleArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "ListSimple9DB641CB" - } - ] - ] - } - }, - "ListPathArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter", - { - "Ref": "ListPath120D6FAB" - } - ] - ] - } - }, - "ParameterizedSimpleArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "ParameterizedSimpleB6311859" - } - ] - ] - } - }, - "ParameterizedNonSimpleArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter", - { - "Ref": "ParameterizedNonSimple23C44BF6" - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.lit.expected.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.lit.expected.json deleted file mode 100644 index 074f6694ac41b..0000000000000 --- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.lit.expected.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "Resources": { - "String0BA8456E": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "abcdef", - "Name": "/My/Public/Parameter" - } - } - } - }, - { - "Parameters": { - "MyParameterVersion": { - "Type": "Number", - "Default": 1 - }, - "MyValueParameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/My/Public/Parameter" - } - }, - "Resources": { - "Dummy": { - "Type": "AWS::SNS::Topic" - } - }, - "Outputs": { - "TheValue": { - "Value": { - "Ref": "MyValueParameter" - } - }, - "TheValueVersionFromToken": { - "Value": { - "Fn::Join": [ - "", - [ - "{{resolve:ssm:/My/Public/Parameter:", - { - "Ref": "MyParameterVersion" - }, - "}}" - ] - ] - } - } - } - } -] \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.expected.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.expected.json deleted file mode 100644 index 475071ea04823..0000000000000 --- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.expected.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "Resources": { - "UserRoleB7C3739B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "UserRoleDefaultPolicyBC5E062B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ssm:DescribeParameters", - "ssm:GetParameter", - "ssm:GetParameterHistory", - "ssm:GetParameters" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "StringParameter472EED0E" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UserRoleDefaultPolicyBC5E062B", - "Roles": [ - { - "Ref": "UserRoleB7C3739B" - } - ] - } - }, - "StringParameter472EED0E": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "Initial parameter value" - } - }, - "StringListParameterFAC8EDDC": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "StringList", - "Value": "Initial parameter value A,Initial parameter value B" - } - } - }, - "Outputs": { - "StringListOutput": { - "Value": { - "Fn::Join": [ - "+", - { - "Fn::Split": [ - ",", - { - "Fn::GetAtt": [ - "StringListParameterFAC8EDDC", - "Value" - ] - } - ] - } - ] - } - }, - "ParamArn": { - "Value": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ssm:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":parameter/", - { - "Ref": "StringParameter472EED0E" - } - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.expected.json deleted file mode 100644 index 797702369a8cd..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.expected.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "Resources": { - "MyHttpApi8AEAAC21": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "MyHttpApi", - "ProtocolType": "HTTP" - } - }, - "MyHttpApiDefaultStageDCB9BC49": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "StageName": "$default", - "AutoDeploy": true - } - }, - "MyHttpApiANYDefaultIntegration5FAD8850": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "IntegrationType": "AWS_PROXY", - "IntegrationUri": { - "Fn::GetAtt": [ - "HelloHandler2E4FBA4D", - "Arn" - ] - }, - "PayloadFormatVersion": "2.0" - } - }, - "MyHttpApiANYDefaultIntegrationPermissionAB8301EF": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "HelloHandler2E4FBA4D", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyHttpApi8AEAAC21" - }, - "/*/*/" - ] - ] - } - } - }, - "MyHttpApiANYC3543576": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "MyHttpApi8AEAAC21" - }, - "RouteKey": "ANY /", - "AuthorizationType": "NONE", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "MyHttpApiANYDefaultIntegration5FAD8850" - } - ] - ] - } - } - }, - "HelloHandlerServiceRole11EF7C63": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "HelloHandler2E4FBA4D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { return { statusCode: 200, body: \"hello, world!\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "HelloHandlerServiceRole11EF7C63", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HelloHandlerServiceRole11EF7C63" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "execute-api:Invoke", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyHttpApi8AEAAC21" - }, - "/undefined/GETundefined" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Call APIGW\",\"States\":{\"Call APIGW\":{\"End\":true,\"Type\":\"Task\",\"OutputPath\":\"$.ResponseBody\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::apigateway:invoke\",\"Parameters\":{\"ApiEndpoint\":\"", - { - "Ref": "MyHttpApi8AEAAC21" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "\",\"Method\":\"GET\",\"AuthType\":\"IAM_ROLE\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.expected.json deleted file mode 100644 index 455d8d39bfd62..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.expected.json +++ /dev/null @@ -1,397 +0,0 @@ -{ - "Resources": { - "MyRestApi2D1F47A9": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "Name": "MyRestApi" - } - }, - "MyRestApiCloudWatchRoleD4042E8E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "MyRestApiAccount2FB6DB7A": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "MyRestApiCloudWatchRoleD4042E8E", - "Arn" - ] - } - }, - "DependsOn": [ - "MyRestApi2D1F47A9" - ] - }, - "MyRestApiDeploymentB555B582d61dc696e12272a0706c826196fa8d62": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "MyRestApiANY05143F93" - ] - }, - "MyRestApiDeploymentStageprodC33B8E5F": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582d61dc696e12272a0706c826196fa8d62" - }, - "StageName": "prod" - }, - "DependsOn": [ - "MyRestApiAccount2FB6DB7A" - ] - }, - "MyRestApiANYApiPermissionCallRestApiIntegMyRestApiB570839CANY0C27C1E3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyRestApi2D1F47A9" - }, - "/", - { - "Ref": "MyRestApiDeploymentStageprodC33B8E5F" - }, - "/*/" - ] - ] - } - } - }, - "MyRestApiANYApiPermissionTestCallRestApiIntegMyRestApiB570839CANY379723EF": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyRestApi2D1F47A9" - }, - "/test-invoke-stage/*/" - ] - ] - } - } - }, - "MyRestApiANY05143F93": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "ANY", - "ResourceId": { - "Fn::GetAtt": [ - "MyRestApi2D1F47A9", - "RootResourceId" - ] - }, - "RestApiId": { - "Ref": "MyRestApi2D1F47A9" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "Hello4A628BD4", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - } - }, - "HelloServiceRole1E55EA16": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Hello4A628BD4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) { return { statusCode: 200, body: \"hello, world!\" }; };" - }, - "Role": { - "Fn::GetAtt": [ - "HelloServiceRole1E55EA16", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "HelloServiceRole1E55EA16" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "execute-api:Invoke", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "MyRestApi2D1F47A9" - }, - "/prod/GET/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Call APIGW\",\"States\":{\"Call APIGW\":{\"End\":true,\"Type\":\"Task\",\"OutputPath\":\"$.ResponseBody\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::apigateway:invoke\",\"Parameters\":{\"ApiEndpoint\":\"", - { - "Ref": "MyRestApi2D1F47A9" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "\",\"Method\":\"GET\",\"Stage\":\"prod\",\"AuthType\":\"IAM_ROLE\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "MyRestApiEndpoint4C55E4CB": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "MyRestApi2D1F47A9" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "MyRestApiDeploymentStageprodC33B8E5F" - }, - "/" - ] - ] - } - }, - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json deleted file mode 100644 index edd7f6559e4d0..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.expected.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "athena:getDataCatalog", - "athena:getQueryExecution", - "athena:startQueryExecution" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":datacatalog/AwsDataCatalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":workgroup/primary" - ] - ] - } - ] - }, - { - "Action": [ - "athena:getQueryExecution", - "lakeformation:GetDataAccess", - "s3:AbortMultipartUpload", - "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", - "s3:ListBucket", - "s3:ListBucketMultipartUploads", - "s3:ListMultipartUploadParts", - "s3:PutObject" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchDeleteTable", - "glue:BatchGetPartition", - "glue:CreateDatabase", - "glue:CreatePartition", - "glue:CreateTable", - "glue:DeleteDatabase", - "glue:DeletePartition", - "glue:DeleteTable", - "glue:GetDatabase", - "glue:GetDatabases", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTables", - "glue:UpdateDatabase", - "glue:UpdatePartition", - "glue:UpdateTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":catalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":database/mydatabase" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/mydatabase/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":userDefinedFunction/mydatabase/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Athena Query\",\"States\":{\"Start Athena Query\":{\"Next\":\"Get Query Execution\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:startQueryExecution\",\"Parameters\":{\"QueryString.$\":\"$.queryString\",\"QueryExecutionContext\":{\"Database\":\"mydatabase\"},\"ResultConfiguration\":{\"EncryptionConfiguration\":{\"EncryptionOption\":\"SSE_S3\"}}}},\"Get Query Execution\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:getQueryExecution\",\"Parameters\":{\"QueryExecutionId.$\":\"$.QueryExecutionId\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json deleted file mode 100644 index cb59d216df916..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.expected.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "athena:getDataCatalog", - "athena:getQueryExecution", - "athena:startQueryExecution" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":datacatalog/AwsDataCatalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":workgroup/primary" - ] - ] - } - ] - }, - { - "Action": [ - "athena:getQueryResults", - "lakeformation:GetDataAccess", - "s3:AbortMultipartUpload", - "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", - "s3:ListBucket", - "s3:ListBucketMultipartUploads", - "s3:ListMultipartUploadParts", - "s3:PutObject" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchDeleteTable", - "glue:BatchGetPartition", - "glue:CreateDatabase", - "glue:CreatePartition", - "glue:CreateTable", - "glue:DeleteDatabase", - "glue:DeletePartition", - "glue:DeleteTable", - "glue:GetDatabase", - "glue:GetDatabases", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTables", - "glue:UpdateDatabase", - "glue:UpdatePartition", - "glue:UpdateTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":catalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":database/mydatabase" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/mydatabase/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":userDefinedFunction/mydatabase/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Athena Query\",\"States\":{\"Start Athena Query\":{\"Next\":\"Wait\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:startQueryExecution\",\"Parameters\":{\"QueryString.$\":\"$.queryString\",\"QueryExecutionContext\":{\"Database\":\"mydatabase\"},\"ResultConfiguration\":{\"EncryptionConfiguration\":{\"EncryptionOption\":\"SSE_S3\"}}}},\"Wait\":{\"Type\":\"Wait\",\"Seconds\":10,\"Next\":\"Get Query Results\"},\"Get Query Results\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:getQueryResults\",\"Parameters\":{\"QueryExecutionId.$\":\"$.QueryExecutionId\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json deleted file mode 100644 index e424f520cd722..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.expected.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "athena:getDataCatalog", - "athena:getQueryExecution", - "athena:startQueryExecution" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":datacatalog/AwsDataCatalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":workgroup/primary" - ] - ] - } - ] - }, - { - "Action": [ - "lakeformation:GetDataAccess", - "s3:AbortMultipartUpload", - "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", - "s3:ListBucket", - "s3:ListBucketMultipartUploads", - "s3:ListMultipartUploadParts", - "s3:PutObject" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchDeleteTable", - "glue:BatchGetPartition", - "glue:CreateDatabase", - "glue:CreatePartition", - "glue:CreateTable", - "glue:DeleteDatabase", - "glue:DeletePartition", - "glue:DeleteTable", - "glue:GetDatabase", - "glue:GetDatabases", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTables", - "glue:UpdateDatabase", - "glue:UpdatePartition", - "glue:UpdateTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":catalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":database/mydatabase" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/mydatabase/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":userDefinedFunction/mydatabase/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Athena Query\",\"States\":{\"Start Athena Query\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:startQueryExecution\",\"Parameters\":{\"QueryString.$\":\"$.queryString\",\"QueryExecutionContext\":{\"Database\":\"mydatabase\"},\"ResultConfiguration\":{\"EncryptionConfiguration\":{\"EncryptionOption\":\"SSE_S3\"}}}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json deleted file mode 100644 index 21d7d19a3251e..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.expected.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "athena:getDataCatalog", - "athena:getQueryExecution", - "athena:startQueryExecution" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":datacatalog/AwsDataCatalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":athena:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":workgroup/primary" - ] - ] - } - ] - }, - { - "Action": [ - "athena:stopQueryExecution", - "lakeformation:GetDataAccess", - "s3:AbortMultipartUpload", - "s3:CreateBucket", - "s3:GetBucketLocation", - "s3:GetObject", - "s3:ListBucket", - "s3:ListBucketMultipartUploads", - "s3:ListMultipartUploadParts", - "s3:PutObject" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "glue:BatchCreatePartition", - "glue:BatchDeletePartition", - "glue:BatchDeleteTable", - "glue:BatchGetPartition", - "glue:CreateDatabase", - "glue:CreatePartition", - "glue:CreateTable", - "glue:DeleteDatabase", - "glue:DeletePartition", - "glue:DeleteTable", - "glue:GetDatabase", - "glue:GetDatabases", - "glue:GetPartition", - "glue:GetPartitions", - "glue:GetTable", - "glue:GetTables", - "glue:UpdateDatabase", - "glue:UpdatePartition", - "glue:UpdateTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":catalog" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":database/mydatabase" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/mydatabase/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":userDefinedFunction/mydatabase/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Athena Query\",\"States\":{\"Start Athena Query\":{\"Next\":\"Stop Query Execution\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:startQueryExecution\",\"Parameters\":{\"QueryString.$\":\"$.queryString\",\"QueryExecutionContext\":{\"Database\":\"mydatabase\"},\"ResultConfiguration\":{\"EncryptionConfiguration\":{\"EncryptionOption\":\"SSE_S3\"}}}},\"Stop Query Execution\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::athena:stopQueryExecution\",\"Parameters\":{\"QueryExecutionId.$\":\"$.QueryExecutionId\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.expected.json deleted file mode 100644 index fb1387f0f9980..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.expected.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "Resources": { - "Bucket83908E77": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:deleteObject", - "s3:getObject", - "s3:putObject" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"PutObject\",\"States\":{\"PutObject\":{\"Next\":\"GetObject\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::aws-sdk:s3:putObject\",\"Parameters\":{\"Body.$\":\"$.body\",\"Bucket\":\"", - { - "Ref": "Bucket83908E77" - }, - "\",\"Key\":\"test.txt\"}},\"GetObject\":{\"Next\":\"DeleteObject\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::aws-sdk:s3:getObject\",\"Parameters\":{\"Bucket\":\"", - { - "Ref": "Bucket83908E77" - }, - "\",\"Key\":\"test.txt\"}},\"DeleteObject\":{\"End\":true,\"Type\":\"Task\",\"ResultPath\":null,\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::aws-sdk:s3:deleteObject\",\"Parameters\":{\"Bucket\":\"", - { - "Ref": "Bucket83908E77" - }, - "\",\"Key\":\"test.txt\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json deleted file mode 100644 index aff74626991ab..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.expected.json +++ /dev/null @@ -1,1047 +0,0 @@ -{ - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet3Subnet11B92D7C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableA3C00665": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableAssociationD102D1C4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - } - } - }, - "vpcPublicSubnet3DefaultRoute3F356A11": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet3EIP2C3B9D91": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3NATGateway82F6CA9E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet3EIP2C3B9D91", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcPrivateSubnet3Subnet985AC459": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTable24DA79A0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - } - }, - "vpcPrivateSubnet3DefaultRoute30C45F47": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet3NATGateway82F6CA9E" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "ComputeEnvResourceSecurityGroupB84CF86B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-stepfunctions-integ/ComputeEnv/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvEcsInstanceRoleCFB290F9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvInstanceProfile81AFCCF2": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ComputeEnvEcsInstanceRoleCFB290F9" - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvResourceServiceInstanceRoleCF89E9E1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnv2C40ACC2": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "AllocationStrategy": "BEST_FIT", - "InstanceRole": { - "Fn::GetAtt": [ - "ComputeEnvInstanceProfile81AFCCF2", - "Arn" - ] - }, - "InstanceTypes": [ - "optimal" - ], - "MaxvCpus": 256, - "MinvCpus": 0, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "ComputeEnvResourceSecurityGroupB84CF86B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Type": "EC2" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ComputeEnvResourceServiceInstanceRoleCF89E9E1", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "JobQueueEE3AD499": { - "Type": "AWS::Batch::JobQueue", - "Properties": { - "ComputeEnvironmentOrder": [ - { - "ComputeEnvironment": { - "Ref": "ComputeEnv2C40ACC2" - }, - "Order": 1 - } - ], - "Priority": 1, - "State": "ENABLED" - } - }, - "JobDefinition24FFE3ED": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:8b518243ecbfcfd08b4734069e7e74ff97b7889dfde0a60d16e7bdc96e6c593b" - ] - ] - }, - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { - "Type": "VCPU", - "Value": "1" - }, - { - "Type": "MEMORY", - "Value": "4" - } - ] - }, - "PlatformCapabilities": [ - "EC2" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "batch:SubmitJob", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":batch:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":job-definition/*" - ] - ] - }, - { - "Ref": "JobQueueEE3AD499" - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForBatchJobsRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"Submit Job\"},\"Submit Job\":{\"End\":true,\"Parameters\":{\"JobDefinition\":\"", - { - "Ref": "JobDefinition24FFE3ED" - }, - "\",\"JobName\":\"MyJob\",\"JobQueue\":\"", - { - "Ref": "JobQueueEE3AD499" - }, - "\",\"Parameters\":{\"foo.$\":\"$.bar\"},\"ContainerOverrides\":{\"Environment\":[{\"Name\":\"key\",\"Value\":\"value\"}],\"Memory\":256,\"Vcpus\":1},\"RetryStrategy\":{\"Attempts\":3},\"Timeout\":{\"AttemptDurationSeconds\":60}},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::batch:submitJob.sync\"}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "JobQueueArn": { - "Value": { - "Ref": "JobQueueEE3AD499" - } - }, - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json deleted file mode 100644 index a722fd182008c..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.expected.json +++ /dev/null @@ -1,1047 +0,0 @@ -{ - "Resources": { - "vpcA2121C38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc" - } - ] - } - }, - "vpcPublicSubnet1Subnet2E65531E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTable48A2DF9B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1RouteTableAssociation5D3F4579": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - } - } - }, - "vpcPublicSubnet1DefaultRoute10708846": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet1EIPDA49DCBE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet1NATGateway9C16659E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet1EIPDA49DCBE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet1" - } - ] - } - }, - "vpcPublicSubnet2Subnet009B674F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableEB40D4CB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2RouteTableAssociation21F81B59": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - } - } - }, - "vpcPublicSubnet2DefaultRouteA1EC0F60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet2EIP9B3743B1": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet2NATGateway9B8AE11A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet2EIP9B3743B1", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet2" - } - ] - } - }, - "vpcPublicSubnet3Subnet11B92D7C": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableA3C00665": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3RouteTableAssociationD102D1C4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - } - } - }, - "vpcPublicSubnet3DefaultRoute3F356A11": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet3RouteTableA3C00665" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - }, - "DependsOn": [ - "vpcVPCGW7984C166" - ] - }, - "vpcPublicSubnet3EIP2C3B9D91": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPublicSubnet3NATGateway82F6CA9E": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet3Subnet11B92D7C" - }, - "AllocationId": { - "Fn::GetAtt": [ - "vpcPublicSubnet3EIP2C3B9D91", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PublicSubnet3" - } - ] - } - }, - "vpcPrivateSubnet1Subnet934893E8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableB41A48CC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet1" - } - ] - } - }, - "vpcPrivateSubnet1RouteTableAssociation67945127": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - } - } - }, - "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet1NATGateway9C16659E" - } - } - }, - "vpcPrivateSubnet2Subnet7031C2BA": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTable7280F23E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet2" - } - ] - } - }, - "vpcPrivateSubnet2RouteTableAssociation007E94D3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - } - }, - "vpcPrivateSubnet2DefaultRouteB0E07F99": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" - } - } - }, - "vpcPrivateSubnet3Subnet985AC459": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "vpcA2121C38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTable24DA79A0": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc/PrivateSubnet3" - } - ] - } - }, - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "SubnetId": { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - } - }, - "vpcPrivateSubnet3DefaultRoute30C45F47": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet3RouteTable24DA79A0" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "vpcPublicSubnet3NATGateway82F6CA9E" - } - } - }, - "vpcIGWE57CBDCA": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-integ/vpc" - } - ] - } - }, - "vpcVPCGW7984C166": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, - "InternetGatewayId": { - "Ref": "vpcIGWE57CBDCA" - } - } - }, - "ComputeEnvResourceSecurityGroupB84CF86B": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-stepfunctions-integ/ComputeEnv/Resource-Security-Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "vpcA2121C38" - } - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvEcsInstanceRoleCFB290F9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvInstanceProfile81AFCCF2": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "ComputeEnvEcsInstanceRoleCFB290F9" - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnvResourceServiceInstanceRoleCF89E9E1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "batch.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSBatchServiceRole" - ] - ] - } - ] - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "ComputeEnv2C40ACC2": { - "Type": "AWS::Batch::ComputeEnvironment", - "Properties": { - "Type": "MANAGED", - "ComputeResources": { - "AllocationStrategy": "BEST_FIT", - "InstanceRole": { - "Fn::GetAtt": [ - "ComputeEnvInstanceProfile81AFCCF2", - "Arn" - ] - }, - "InstanceTypes": [ - "optimal" - ], - "MaxvCpus": 256, - "MinvCpus": 0, - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "ComputeEnvResourceSecurityGroupB84CF86B", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - }, - { - "Ref": "vpcPrivateSubnet3Subnet985AC459" - } - ], - "Type": "EC2" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ComputeEnvResourceServiceInstanceRoleCF89E9E1", - "Arn" - ] - }, - "State": "ENABLED" - }, - "DependsOn": [ - "vpcIGWE57CBDCA", - "vpcPrivateSubnet1DefaultRoute1AA8E2E5", - "vpcPrivateSubnet1RouteTableB41A48CC", - "vpcPrivateSubnet1RouteTableAssociation67945127", - "vpcPrivateSubnet1Subnet934893E8", - "vpcPrivateSubnet2DefaultRouteB0E07F99", - "vpcPrivateSubnet2RouteTable7280F23E", - "vpcPrivateSubnet2RouteTableAssociation007E94D3", - "vpcPrivateSubnet2Subnet7031C2BA", - "vpcPrivateSubnet3DefaultRoute30C45F47", - "vpcPrivateSubnet3RouteTable24DA79A0", - "vpcPrivateSubnet3RouteTableAssociationC58B3C2C", - "vpcPrivateSubnet3Subnet985AC459", - "vpcPublicSubnet1DefaultRoute10708846", - "vpcPublicSubnet1EIPDA49DCBE", - "vpcPublicSubnet1NATGateway9C16659E", - "vpcPublicSubnet1RouteTable48A2DF9B", - "vpcPublicSubnet1RouteTableAssociation5D3F4579", - "vpcPublicSubnet1Subnet2E65531E", - "vpcPublicSubnet2DefaultRouteA1EC0F60", - "vpcPublicSubnet2EIP9B3743B1", - "vpcPublicSubnet2NATGateway9B8AE11A", - "vpcPublicSubnet2RouteTableEB40D4CB", - "vpcPublicSubnet2RouteTableAssociation21F81B59", - "vpcPublicSubnet2Subnet009B674F", - "vpcPublicSubnet3DefaultRoute3F356A11", - "vpcPublicSubnet3EIP2C3B9D91", - "vpcPublicSubnet3NATGateway82F6CA9E", - "vpcPublicSubnet3RouteTableA3C00665", - "vpcPublicSubnet3RouteTableAssociationD102D1C4", - "vpcPublicSubnet3Subnet11B92D7C", - "vpcA2121C38", - "vpcVPCGW7984C166" - ] - }, - "JobQueueEE3AD499": { - "Type": "AWS::Batch::JobQueue", - "Properties": { - "ComputeEnvironmentOrder": [ - { - "ComputeEnvironment": { - "Ref": "ComputeEnv2C40ACC2" - }, - "Order": 1 - } - ], - "Priority": 1, - "State": "ENABLED" - } - }, - "JobDefinition24FFE3ED": { - "Type": "AWS::Batch::JobDefinition", - "Properties": { - "Type": "container", - "ContainerProperties": { - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:8b518243ecbfcfd08b4734069e7e74ff97b7889dfde0a60d16e7bdc96e6c593b" - ] - ] - }, - "Privileged": false, - "ReadonlyRootFilesystem": false, - "ResourceRequirements": [ - { - "Type": "VCPU", - "Value": "1" - }, - { - "Type": "MEMORY", - "Value": "4" - } - ] - }, - "PlatformCapabilities": [ - "EC2" - ], - "RetryStrategy": { - "Attempts": 1 - }, - "Timeout": {} - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "batch:SubmitJob", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":batch:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":job-definition/*" - ] - ] - }, - { - "Ref": "JobQueueEE3AD499" - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForBatchJobsRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"Submit Job\"},\"Submit Job\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::batch:submitJob.sync\",\"Parameters\":{\"JobDefinition\":\"", - { - "Ref": "JobDefinition24FFE3ED" - }, - "\",\"JobName\":\"MyJob\",\"JobQueue\":\"", - { - "Ref": "JobQueueEE3AD499" - }, - "\",\"Parameters\":{\"foo.$\":\"$.bar\"},\"ContainerOverrides\":{\"Environment\":[{\"Name\":\"key\",\"Value\":\"value\"}],\"ResourceRequirements\":[{\"Type\":\"MEMORY\",\"Value\":\"256\"},{\"Type\":\"VCPU\",\"Value\":\"1\"}]},\"RetryStrategy\":{\"Attempts\":3},\"Timeout\":{\"AttemptDurationSeconds\":60}}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "JobQueueArn": { - "Value": { - "Ref": "JobQueueEE3AD499" - } - }, - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json deleted file mode 100644 index 7b9ec9d7b7ac5..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "Resources": { - "ProjectRole4CCB274E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ProjectRoleDefaultPolicy7F29461B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "ProjectC78D97AD" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "ProjectC78D97AD" - }, - "-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ProjectRoleDefaultPolicy7F29461B", - "Roles": [ - { - "Ref": "ProjectRole4CCB274E" - } - ] - } - }, - "ProjectC78D97AD": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "zone", - "Type": "PLAINTEXT", - "Value": "defaultZone" - } - ], - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "ProjectRole4CCB274E", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": "alias/aws/s3", - "Name": "MyTestProject" - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:BatchGetReports", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ProjectC78D97AD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"build-task\"},\"build-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::codebuild:startBuild\",\"Parameters\":{\"ProjectName\":\"", - { - "Ref": "ProjectC78D97AD" - }, - "\",\"EnvironmentVariablesOverride\":[{\"Name\":\"ZONE\",\"Type\":\"PLAINTEXT\",\"Value.$\":\"$.envVariables.zone\"}]}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "ProjectName": { - "Value": { - "Ref": "ProjectC78D97AD" - } - }, - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.expected.json deleted file mode 100644 index 48c2d71e45c27..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.expected.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "Resources": { - "JobOutputBucketACE3BC7B": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DataBrewRole7E60F80D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "databrew.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - "arn:aws:iam::aws:policy/service-role/AWSGlueDataBrewServiceRole" - ], - "Path": "/", - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject", - "s3:GetObject", - "s3:ListBucket", - "s3:PutObject" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "JobOutputBucketACE3BC7B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::databrew-public-datasets-", - { - "Ref": "AWS::Region" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::databrew-public-datasets-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "JobOutputBucketACE3BC7B", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DataBrewPolicy" - } - ] - } - }, - "DataBrewRecipe": { - "Type": "AWS::DataBrew::Recipe", - "Properties": { - "Name": "recipe-1", - "Steps": [ - { - "Action": { - "Operation": "UPPER_CASE", - "Parameters": { - "sourceColumn": "description" - } - } - }, - { - "Action": { - "Operation": "DELETE", - "Parameters": { - "sourceColumn": "doc_id" - } - } - } - ] - } - }, - "DataBrewDataset": { - "Type": "AWS::DataBrew::Dataset", - "Properties": { - "Input": { - "S3InputDefinition": { - "Bucket": { - "Fn::Join": [ - "", - [ - "databrew-public-datasets-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "Key": "votes.csv" - } - }, - "Name": "dataset-1" - } - }, - "DataBrewProject": { - "Type": "AWS::DataBrew::Project", - "Properties": { - "DatasetName": "dataset-1", - "Name": "project-1", - "RecipeName": "recipe-1", - "RoleArn": { - "Fn::GetAtt": [ - "DataBrewRole7E60F80D", - "Arn" - ] - } - }, - "DependsOn": [ - "DataBrewDataset", - "DataBrewRecipe" - ] - }, - "DataBrewJob": { - "Type": "AWS::DataBrew::Job", - "Properties": { - "Name": "job-1", - "RoleArn": { - "Fn::GetAtt": [ - "DataBrewRole7E60F80D", - "Arn" - ] - }, - "Type": "RECIPE", - "Outputs": [ - { - "Location": { - "Bucket": { - "Ref": "JobOutputBucketACE3BC7B" - } - } - } - ], - "ProjectName": "project-1" - }, - "DependsOn": [ - "DataBrewProject" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "databrew:startJobRun", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":databrew:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":job/job-1" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start DataBrew Job run\",\"States\":{\"Start DataBrew Job run\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::databrew:startJobRun\",\"Parameters\":{\"Name\":\"job-1\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.expected.json deleted file mode 100644 index 53a09ed1a9974..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.expected.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "Resources": { - "Messages804FA4EB": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "KeySchema": [ - { - "AttributeName": "MessageId", - "KeyType": "HASH" - } - ], - "AttributeDefinitions": [ - { - "AttributeName": "MessageId", - "AttributeType": "S" - } - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": 10, - "WriteCapacityUnits": 5 - }, - "TableName": "Messages" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "Messages804FA4EB" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"PutItem\"},\"PutItem\":{\"Next\":\"GetItemAfterPut\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::dynamodb:putItem\",\"Parameters\":{\"Item\":{\"MessageId\":{\"S\":\"1234\"},\"Text\":{\"S.$\":\"$.bar\"},\"TotalCount\":{\"N\":\"18\"},\"Activated\":{\"BOOL.$\":\"$.foo\"},\"List\":{\"L.$\":\"$.list\"}},\"TableName\":\"", - { - "Ref": "Messages804FA4EB" - }, - "\"}},\"GetItemAfterPut\":{\"Next\":\"UpdateItem\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::dynamodb:getItem\",\"Parameters\":{\"Key\":{\"MessageId\":{\"S\":\"1234\"}},\"TableName\":\"", - { - "Ref": "Messages804FA4EB" - }, - "\",\"ConsistentRead\":false}},\"UpdateItem\":{\"Next\":\"GetItemAfterUpdate\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::dynamodb:updateItem\",\"Parameters\":{\"Key\":{\"MessageId\":{\"S\":\"1234\"}},\"TableName\":\"", - { - "Ref": "Messages804FA4EB" - }, - "\",\"ExpressionAttributeValues\":{\":val\":{\"N.$\":\"$.Item.TotalCount.N\"},\":rand\":{\"N\":\"24\"}},\"UpdateExpression\":\"SET TotalCount = :val + :rand\"}},\"GetItemAfterUpdate\":{\"Next\":\"DeleteItem\",\"Type\":\"Task\",\"OutputPath\":\"$.Item.TotalCount.N\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::dynamodb:getItem\",\"Parameters\":{\"Key\":{\"MessageId\":{\"S\":\"1234\"}},\"TableName\":\"", - { - "Ref": "Messages804FA4EB" - }, - "\",\"ConsistentRead\":false}},\"DeleteItem\":{\"End\":true,\"Type\":\"Task\",\"ResultPath\":null,\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::dynamodb:deleteItem\",\"Parameters\":{\"Key\":{\"MessageId\":{\"S\":\"1234\"}},\"TableName\":\"", - { - "Ref": "Messages804FA4EB" - }, - "\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json deleted file mode 100644 index 5c8171c47d44c..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.expected.json +++ /dev/null @@ -1,1247 +0,0 @@ -{ - "Resources": { - "Ec2ClusterEE43E89D": { - "Type": "AWS::ECS::Cluster" - }, - "Ec2ClusterVpc568127F1": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet1SubnetD46FD92B": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet1RouteTableE30610F5": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet1RouteTableAssociation9C78F646": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPublicSubnet1RouteTableE30610F5" - }, - "SubnetId": { - "Ref": "Ec2ClusterVpcPublicSubnet1SubnetD46FD92B" - } - } - }, - "Ec2ClusterVpcPublicSubnet1DefaultRouteC7FBE273": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPublicSubnet1RouteTableE30610F5" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "Ec2ClusterVpcIGW605638EB" - } - }, - "DependsOn": [ - "Ec2ClusterVpcVPCGW24F3B413" - ] - }, - "Ec2ClusterVpcPublicSubnet1EIPD4B5D142": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet1NATGateway79A8A839": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "Ec2ClusterVpcPublicSubnet1SubnetD46FD92B" - }, - "AllocationId": { - "Fn::GetAtt": [ - "Ec2ClusterVpcPublicSubnet1EIPD4B5D142", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet2Subnet207D9E5E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet2RouteTable44A09188": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet2RouteTableAssociation7615C6B2": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPublicSubnet2RouteTable44A09188" - }, - "SubnetId": { - "Ref": "Ec2ClusterVpcPublicSubnet2Subnet207D9E5E" - } - } - }, - "Ec2ClusterVpcPublicSubnet2DefaultRouteEBA52256": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPublicSubnet2RouteTable44A09188" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "Ec2ClusterVpcIGW605638EB" - } - }, - "DependsOn": [ - "Ec2ClusterVpcVPCGW24F3B413" - ] - }, - "Ec2ClusterVpcPublicSubnet2EIP921925E6": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPublicSubnet2NATGateway302F96C0": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "Ec2ClusterVpcPublicSubnet2Subnet207D9E5E" - }, - "AllocationId": { - "Fn::GetAtt": [ - "Ec2ClusterVpcPublicSubnet2EIP921925E6", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PublicSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPrivateSubnet1Subnet0AE9B91E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPrivateSubnet1RouteTable50D391D1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "Ec2ClusterVpcPrivateSubnet1RouteTableAssociation1043DBDA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPrivateSubnet1RouteTable50D391D1" - }, - "SubnetId": { - "Ref": "Ec2ClusterVpcPrivateSubnet1Subnet0AE9B91E" - } - } - }, - "Ec2ClusterVpcPrivateSubnet1DefaultRouteD31A76F0": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPrivateSubnet1RouteTable50D391D1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "Ec2ClusterVpcPublicSubnet1NATGateway79A8A839" - } - } - }, - "Ec2ClusterVpcPrivateSubnet2Subnet16B68C19": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPrivateSubnet2RouteTable22B9DAE6": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "Ec2ClusterVpcPrivateSubnet2RouteTableAssociation3AFD70F4": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPrivateSubnet2RouteTable22B9DAE6" - }, - "SubnetId": { - "Ref": "Ec2ClusterVpcPrivateSubnet2Subnet16B68C19" - } - } - }, - "Ec2ClusterVpcPrivateSubnet2DefaultRoute22B3073E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "Ec2ClusterVpcPrivateSubnet2RouteTable22B9DAE6" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "Ec2ClusterVpcPublicSubnet2NATGateway302F96C0" - } - } - }, - "Ec2ClusterVpcIGW605638EB": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/Vpc" - } - ] - } - }, - "Ec2ClusterVpcVPCGW24F3B413": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - }, - "InternetGatewayId": { - "Ref": "Ec2ClusterVpcIGW605638EB" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceSecurityGroup149B0A9E": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "Ec2ClusterVpc568127F1" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupInstanceProfileDB232471": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLaunchConfig7B2FED3A": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupInstanceProfileDB232471" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupInstanceSecurityGroup149B0A9E", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "Ec2ClusterEE43E89D" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy6D2DC2FD", - "Ec2ClusterDefaultAutoScalingGroupInstanceRole73D80898" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLaunchConfig7B2FED3A" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "Ec2ClusterVpcPublicSubnet1SubnetD46FD92B" - }, - { - "Ref": "Ec2ClusterVpcPublicSubnet2Subnet207D9E5E" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "Ec2ClusterEE43E89D" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecsec2integEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicEE9E39A29ACCEEA3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - }, - "Endpoint": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B", - "Roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7" - } - ] - } - }, - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHook5CB1467E": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - }, - "RoleARN": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7", - "Arn" - ] - } - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicyE499974B", - "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole71045ED7" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "TheContainer" - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awssfntasksecsec2integTaskDefFAFE2BE7", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - } - ] - } - ] - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeTasks", - "ecs:StopTask" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForECSTaskRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"SomeKey\":\"SomeValue\"},\"Next\":\"Run\"},\"Run\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::ecs:runTask.sync\",\"Parameters\":{\"Cluster\":\"", - { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - }, - "\",\"TaskDefinition\":\"awssfntasksecsec2integTaskDefFAFE2BE7\",\"Overrides\":{\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"EC2\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json deleted file mode 100644 index 2b9c1c4701151..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.expected.json +++ /dev/null @@ -1,1136 +0,0 @@ -{ - "Resources": { - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "FargateClusterVpc377E8024": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1SubnetB9C24BC7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTable1D7FA747": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTableAssociation80F1442F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - } - } - }, - "FargateClusterVpcPublicSubnet1DefaultRoute80086690": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet1EIPF91909D0": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1NATGateway5202D86A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet1EIPF91909D0", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2Subnet24C0F9D8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTable1493C5D6": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTableAssociation3EFA74DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - } - } - }, - "FargateClusterVpcPublicSubnet2DefaultRoute8E847CD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet2EIPBBB24774": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet2EIPBBB24774", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1Subnet9127625F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTableAssociation78F6E213": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet1Subnet9127625F" - } - } - }, - "FargateClusterVpcPrivateSubnet1DefaultRoute0438DCBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet1NATGateway5202D86A" - } - } - }, - "FargateClusterVpcPrivateSubnet2Subnet307CEE57": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTableAssociation3A46964C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet2Subnet307CEE57" - } - } - }, - "FargateClusterVpcPrivateSubnet2DefaultRoute35FDD29D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2" - } - } - }, - "FargateClusterVpcIGW827638CB": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcVPCGW38717255": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "InternetGatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - } - }, - "FargateClusterDefaultAutoScalingGroupInstanceSecurityGroup42AF8A40": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/InstanceSecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ], - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - } - } - }, - "FargateClusterDefaultAutoScalingGroupInstanceRole0C1F7FF7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy3BD78F3E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:DeregisterContainerInstance", - "ecs:RegisterContainerInstance", - "ecs:Submit*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - }, - { - "Action": [ - "ecs:Poll", - "ecs:StartTelemetrySession" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecr:GetAuthorizationToken", - "ecs:DiscoverPollEndpoint", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy3BD78F3E", - "Roles": [ - { - "Ref": "FargateClusterDefaultAutoScalingGroupInstanceRole0C1F7FF7" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupInstanceProfile2C0FEF3B": { - "Type": "AWS::IAM::InstanceProfile", - "Properties": { - "Roles": [ - { - "Ref": "FargateClusterDefaultAutoScalingGroupInstanceRole0C1F7FF7" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupLaunchConfig57306899": { - "Type": "AWS::AutoScaling::LaunchConfiguration", - "Properties": { - "ImageId": { - "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" - }, - "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "FargateClusterDefaultAutoScalingGroupInstanceProfile2C0FEF3B" - }, - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupInstanceSecurityGroup42AF8A40", - "GroupId" - ] - } - ], - "UserData": { - "Fn::Base64": { - "Fn::Join": [ - "", - [ - "#!/bin/bash\necho ECS_CLUSTER=", - { - "Ref": "FargateCluster7CCD5F93" - }, - " >> /etc/ecs/ecs.config\nsudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP\nsudo service iptables save\necho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config" - ] - ] - } - } - }, - "DependsOn": [ - "FargateClusterDefaultAutoScalingGroupInstanceRoleDefaultPolicy3BD78F3E", - "FargateClusterDefaultAutoScalingGroupInstanceRole0C1F7FF7" - ] - }, - "FargateClusterDefaultAutoScalingGroupASG36A4948F": { - "Type": "AWS::AutoScaling::AutoScalingGroup", - "Properties": { - "MaxSize": "1", - "MinSize": "1", - "LaunchConfigurationName": { - "Ref": "FargateClusterDefaultAutoScalingGroupLaunchConfig57306899" - }, - "Tags": [ - { - "Key": "Name", - "PropagateAtLaunch": true, - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ], - "VPCZoneIdentifier": [ - { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - } - ] - }, - "UpdatePolicy": { - "AutoScalingReplacingUpdate": { - "WillReplace": true - }, - "AutoScalingScheduledAction": { - "IgnoreUnmodifiedGroupSizeProperties": true - } - } - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ], - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "FargateClusterDefaultAutoScalingGroupASG36A4948F" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343", - "Roles": [ - { - "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(event))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(event))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n \n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n \n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n \n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "FargateCluster7CCD5F93" - } - } - }, - "Handler": "index.lambda_handler", - "Runtime": "python3.6", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ], - "Timeout": 310 - }, - "DependsOn": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343", - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" - ] - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsinteg2FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9C6EC468C75B1F21": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - } - } - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic37856E82": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - }, - "Endpoint": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", - "Arn" - ] - } - } - }, - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10": { - "Type": "AWS::SNS::Topic", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole410D556D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "autoscaling.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy4958D19D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy4958D19D", - "Roles": [ - { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole410D556D" - } - ] - } - }, - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHook2AE13680": { - "Type": "AWS::AutoScaling::LifecycleHook", - "Properties": { - "AutoScalingGroupName": { - "Ref": "FargateClusterDefaultAutoScalingGroupASG36A4948F" - }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", - "DefaultResult": "CONTINUE", - "HeartbeatTimeout": 300, - "NotificationTargetARN": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - }, - "RoleARN": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole410D556D", - "Arn" - ] - } - }, - "DependsOn": [ - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleDefaultPolicy4958D19D", - "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookRole410D556D" - ] - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "TheContainer" - } - ], - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsinteg2TaskDef1F38909D", - "NetworkMode": "bridge", - "RequiresCompatibilities": [ - "EC2" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Effect": "Allow", - "Resource": { - "Ref": "TaskDef54694570" - } - }, - { - "Action": [ - "ecs:DescribeTasks", - "ecs:StopTask" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForECSTaskRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"SomeKey\":\"SomeValue\"},\"Next\":\"Run\"},\"Run\":{\"End\":true,\"Parameters\":{\"Cluster\":\"", - { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - }, - "\",\"TaskDefinition\":\"", - { - "Ref": "TaskDef54694570" - }, - "\",\"Overrides\":{\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"EC2\"},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::ecs:runTask.sync\"}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Parameters": { - "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json deleted file mode 100644 index 8976862fd9678..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.expected.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "Resources": { - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "FargateClusterVpc377E8024": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1SubnetB9C24BC7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTable1D7FA747": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTableAssociation80F1442F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - } - } - }, - "FargateClusterVpcPublicSubnet1DefaultRoute80086690": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet1EIPF91909D0": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1NATGateway5202D86A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet1EIPF91909D0", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2Subnet24C0F9D8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTable1493C5D6": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTableAssociation3EFA74DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - } - } - }, - "FargateClusterVpcPublicSubnet2DefaultRoute8E847CD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet2EIPBBB24774": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet2EIPBBB24774", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1Subnet9127625F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTableAssociation78F6E213": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet1Subnet9127625F" - } - } - }, - "FargateClusterVpcPrivateSubnet1DefaultRoute0438DCBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet1NATGateway5202D86A" - } - } - }, - "FargateClusterVpcPrivateSubnet2Subnet307CEE57": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTableAssociation3A46964C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet2Subnet307CEE57" - } - } - }, - "FargateClusterVpcPrivateSubnet2DefaultRoute35FDD29D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2" - } - } - }, - "FargateClusterVpcIGW827638CB": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-fargate-integ/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcVPCGW38717255": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "InternetGatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "TheContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awssfntasksecsfargateintegTaskDefD0F4AD10", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "FargateTaskSecurityGroup0BBB27CB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-sfn-tasks-ecs-fargate-integ/FargateTask/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - } - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 2, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 4, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - }, - ":", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - } - ] - } - ] - }, - "/", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Ref": "TaskDef54694570" - } - ] - } - ] - } - ] - } - ] - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeTasks", - "ecs:StopTask" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForECSTaskRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"SomeKey\":\"SomeValue\"},\"Next\":\"FargateTask\"},\"FargateTask\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::ecs:runTask.sync\",\"Parameters\":{\"Cluster\":\"", - { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - }, - "\",\"TaskDefinition\":\"awssfntasksecsfargateintegTaskDefD0F4AD10\",\"NetworkConfiguration\":{\"AwsvpcConfiguration\":{\"AssignPublicIp\":\"ENABLED\",\"Subnets\":[\"", - { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - "\",\"", - { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - }, - "\"],\"SecurityGroups\":[\"", - { - "Fn::GetAtt": [ - "FargateTaskSecurityGroup0BBB27CB", - "GroupId" - ] - }, - "\"]}},\"Overrides\":{\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"FARGATE\",\"PlatformVersion\":\"1.4.0\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json deleted file mode 100644 index 3ea1f2bcb5a6d..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.expected.json +++ /dev/null @@ -1,699 +0,0 @@ -{ - "Resources": { - "FargateCluster7CCD5F93": { - "Type": "AWS::ECS::Cluster" - }, - "FargateClusterVpc377E8024": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1SubnetB9C24BC7": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTable1D7FA747": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1RouteTableAssociation80F1442F": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - } - } - }, - "FargateClusterVpcPublicSubnet1DefaultRoute80086690": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet1RouteTable1D7FA747" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet1EIPF91909D0": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet1NATGateway5202D86A": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet1EIPF91909D0", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet1" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2Subnet24C0F9D8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTable1493C5D6": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2RouteTableAssociation3EFA74DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - } - } - }, - "FargateClusterVpcPublicSubnet2DefaultRoute8E847CD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPublicSubnet2RouteTable1493C5D6" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - }, - "DependsOn": [ - "FargateClusterVpcVPCGW38717255" - ] - }, - "FargateClusterVpcPublicSubnet2EIPBBB24774": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - }, - "AllocationId": { - "Fn::GetAtt": [ - "FargateClusterVpcPublicSubnet2EIPBBB24774", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PublicSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1Subnet9127625F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1a", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet1" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet1RouteTableAssociation78F6E213": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet1Subnet9127625F" - } - } - }, - "FargateClusterVpcPrivateSubnet1DefaultRoute0438DCBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet1RouteTable21B3CEAE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet1NATGateway5202D86A" - } - } - }, - "FargateClusterVpcPrivateSubnet2Subnet307CEE57": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "AvailabilityZone": "test-region-1b", - "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": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc/PrivateSubnet2" - } - ] - } - }, - "FargateClusterVpcPrivateSubnet2RouteTableAssociation3A46964C": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "SubnetId": { - "Ref": "FargateClusterVpcPrivateSubnet2Subnet307CEE57" - } - } - }, - "FargateClusterVpcPrivateSubnet2DefaultRoute35FDD29D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "FargateClusterVpcPrivateSubnet2RouteTable7B7F9678" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "FargateClusterVpcPublicSubnet2NATGatewayFFEC8ED2" - } - } - }, - "FargateClusterVpcIGW827638CB": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-ecs-integ2/FargateCluster/Vpc" - } - ] - } - }, - "FargateClusterVpcVPCGW38717255": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - }, - "InternetGatewayId": { - "Ref": "FargateClusterVpcIGW827638CB" - } - } - }, - "TaskDefTaskRole1EDB4A67": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDef54694570": { - "Type": "AWS::ECS::TaskDefinition", - "Properties": { - "ContainerDefinitions": [ - { - "Essential": true, - "Image": { - "Fn::Join": [ - "", - [ - { - "Ref": "AWS::AccountId" - }, - ".dkr.ecr.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/aws-cdk/assets:7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2" - ] - ] - }, - "LogConfiguration": { - "LogDriver": "awslogs", - "Options": { - "awslogs-group": { - "Ref": "TaskDefTheContainerLogGroupD94C8EF5" - }, - "awslogs-stream-prefix": "EventDemo", - "awslogs-region": { - "Ref": "AWS::Region" - } - } - }, - "Memory": 256, - "Name": "TheContainer" - } - ], - "Cpu": "256", - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - "Family": "awsecsinteg2TaskDef1F38909D", - "Memory": "512", - "NetworkMode": "awsvpc", - "RequiresCompatibilities": [ - "FARGATE" - ], - "TaskRoleArn": { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - } - }, - "TaskDefTheContainerLogGroupD94C8EF5": { - "Type": "AWS::Logs::LogGroup", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TaskDefExecutionRoleB4775C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TaskDefExecutionRoleDefaultPolicy0DBB737A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ecr:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":repository/aws-cdk/assets" - ] - ] - } - }, - { - "Action": "ecr:GetAuthorizationToken", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TaskDefTheContainerLogGroupD94C8EF5", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TaskDefExecutionRoleDefaultPolicy0DBB737A", - "Roles": [ - { - "Ref": "TaskDefExecutionRoleB4775C97" - } - ] - } - }, - "FargateTaskSecurityGroup0BBB27CB": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "aws-ecs-integ2/FargateTask/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "FargateClusterVpc377E8024" - } - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ecs:RunTask", - "Effect": "Allow", - "Resource": { - "Ref": "TaskDef54694570" - } - }, - { - "Action": [ - "ecs:DescribeTasks", - "ecs:StopTask" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TaskDefExecutionRoleB4775C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TaskDefTaskRole1EDB4A67", - "Arn" - ] - } - ] - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForECSTaskRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"SomeKey\":\"SomeValue\"},\"Next\":\"FargateTask\"},\"FargateTask\":{\"End\":true,\"Parameters\":{\"Cluster\":\"", - { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - }, - "\",\"TaskDefinition\":\"", - { - "Ref": "TaskDef54694570" - }, - "\",\"NetworkConfiguration\":{\"AwsvpcConfiguration\":{\"AssignPublicIp\":\"ENABLED\",\"Subnets\":[\"", - { - "Ref": "FargateClusterVpcPublicSubnet1SubnetB9C24BC7" - }, - "\",\"", - { - "Ref": "FargateClusterVpcPublicSubnet2Subnet24C0F9D8" - }, - "\"],\"SecurityGroups\":[\"", - { - "Fn::GetAtt": [ - "FargateTaskSecurityGroup0BBB27CB", - "GroupId" - ] - }, - "\"]}},\"Overrides\":{\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"FARGATE\"},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::ecs:runTask.sync\"}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.expected.json deleted file mode 100644 index fd29689fa4b2e..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.expected.json +++ /dev/null @@ -1,1588 +0,0 @@ -{ - "Resources": { - "EksClusterDefaultVpcB24550B2": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet1RouteTableAssociation36D085C2": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047" - } - } - }, - "EksClusterDefaultVpcPublicSubnet1DefaultRouteCE5F6EF3": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksClusterDefaultVpcIGWCA6A3220" - } - }, - "DependsOn": [ - "EksClusterDefaultVpcVPCGW0E4A5673" - ] - }, - "EksClusterDefaultVpcPublicSubnet1EIPF53713C9": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet1NATGateway548C2CDF": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksClusterDefaultVpcPublicSubnet1EIPF53713C9", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet2RouteTableAssociation39E2ABB3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D" - } - } - }, - "EksClusterDefaultVpcPublicSubnet2DefaultRoute8B910E5C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksClusterDefaultVpcIGWCA6A3220" - } - }, - "DependsOn": [ - "EksClusterDefaultVpcVPCGW0E4A5673" - ] - }, - "EksClusterDefaultVpcPublicSubnet2EIP16D41D80": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet2NATGateway869DDCBF": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksClusterDefaultVpcPublicSubnet2EIP16D41D80", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet3RouteTableAssociationFE466321": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1" - } - } - }, - "EksClusterDefaultVpcPublicSubnet3DefaultRoute1F5BE861": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "EksClusterDefaultVpcIGWCA6A3220" - } - }, - "DependsOn": [ - "EksClusterDefaultVpcVPCGW0E4A5673" - ] - }, - "EksClusterDefaultVpcPublicSubnet3EIPF8D34EDE": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPublicSubnet3NATGatewayC35C74D3": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1" - }, - "AllocationId": { - "Fn::GetAtt": [ - "EksClusterDefaultVpcPublicSubnet3EIPF8D34EDE", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet1RouteTableAssociationCC31B65B": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F" - } - } - }, - "EksClusterDefaultVpcPrivateSubnet1DefaultRoute790DE5CF": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksClusterDefaultVpcPublicSubnet1NATGateway548C2CDF" - } - } - }, - "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet2RouteTableAssociation86243837": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71" - } - } - }, - "EksClusterDefaultVpcPrivateSubnet2DefaultRoute99A19B21": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksClusterDefaultVpcPublicSubnet2NATGateway869DDCBF" - } - } - }, - "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "EksClusterDefaultVpcPrivateSubnet3RouteTableAssociationCE2741BE": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1" - }, - "SubnetId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07" - } - } - }, - "EksClusterDefaultVpcPrivateSubnet3DefaultRouteDC2E9DE0": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "EksClusterDefaultVpcPublicSubnet3NATGatewayC35C74D3" - } - } - }, - "EksClusterDefaultVpcIGWCA6A3220": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-eks-call-integ/EksCluster/DefaultVpc" - } - ] - } - }, - "EksClusterDefaultVpcVPCGW0E4A5673": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - }, - "InternetGatewayId": { - "Ref": "EksClusterDefaultVpcIGWCA6A3220" - } - } - }, - "EksClusterRoleC84B376F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "EksClusterControlPlaneSecurityGroup9257A6D0": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "EksClusterDefaultVpcB24550B2" - } - } - }, - "EksClusterCreationRole75AABE42": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "EksClusterDefaultVpcIGWCA6A3220", - "EksClusterDefaultVpcPrivateSubnet1DefaultRoute790DE5CF", - "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB", - "EksClusterDefaultVpcPrivateSubnet1RouteTableAssociationCC31B65B", - "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F", - "EksClusterDefaultVpcPrivateSubnet2DefaultRoute99A19B21", - "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031", - "EksClusterDefaultVpcPrivateSubnet2RouteTableAssociation86243837", - "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71", - "EksClusterDefaultVpcPrivateSubnet3DefaultRouteDC2E9DE0", - "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1", - "EksClusterDefaultVpcPrivateSubnet3RouteTableAssociationCE2741BE", - "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07", - "EksClusterDefaultVpcPublicSubnet1DefaultRouteCE5F6EF3", - "EksClusterDefaultVpcPublicSubnet1EIPF53713C9", - "EksClusterDefaultVpcPublicSubnet1NATGateway548C2CDF", - "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A", - "EksClusterDefaultVpcPublicSubnet1RouteTableAssociation36D085C2", - "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047", - "EksClusterDefaultVpcPublicSubnet2DefaultRoute8B910E5C", - "EksClusterDefaultVpcPublicSubnet2EIP16D41D80", - "EksClusterDefaultVpcPublicSubnet2NATGateway869DDCBF", - "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE", - "EksClusterDefaultVpcPublicSubnet2RouteTableAssociation39E2ABB3", - "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D", - "EksClusterDefaultVpcPublicSubnet3DefaultRoute1F5BE861", - "EksClusterDefaultVpcPublicSubnet3EIPF8D34EDE", - "EksClusterDefaultVpcPublicSubnet3NATGatewayC35C74D3", - "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A", - "EksClusterDefaultVpcPublicSubnet3RouteTableAssociationFE466321", - "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1", - "EksClusterDefaultVpcB24550B2", - "EksClusterDefaultVpcVPCGW0E4A5673" - ] - }, - "EksClusterCreationRoleDefaultPolicy2DFE4D73": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EksClusterRoleC84B376F", - "Arn" - ] - } - }, - { - "Action": [ - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster/eksCluster" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster/eksCluster/*" - ] - ] - } - ] - }, - { - "Action": [ - "eks:DeleteFargateProfile", - "eks:DescribeFargateProfile" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":fargateprofile/eksCluster/*" - ] - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EksClusterCreationRoleDefaultPolicy2DFE4D73", - "Roles": [ - { - "Ref": "EksClusterCreationRole75AABE42" - } - ] - }, - "DependsOn": [ - "EksClusterDefaultVpcIGWCA6A3220", - "EksClusterDefaultVpcPrivateSubnet1DefaultRoute790DE5CF", - "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB", - "EksClusterDefaultVpcPrivateSubnet1RouteTableAssociationCC31B65B", - "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F", - "EksClusterDefaultVpcPrivateSubnet2DefaultRoute99A19B21", - "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031", - "EksClusterDefaultVpcPrivateSubnet2RouteTableAssociation86243837", - "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71", - "EksClusterDefaultVpcPrivateSubnet3DefaultRouteDC2E9DE0", - "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1", - "EksClusterDefaultVpcPrivateSubnet3RouteTableAssociationCE2741BE", - "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07", - "EksClusterDefaultVpcPublicSubnet1DefaultRouteCE5F6EF3", - "EksClusterDefaultVpcPublicSubnet1EIPF53713C9", - "EksClusterDefaultVpcPublicSubnet1NATGateway548C2CDF", - "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A", - "EksClusterDefaultVpcPublicSubnet1RouteTableAssociation36D085C2", - "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047", - "EksClusterDefaultVpcPublicSubnet2DefaultRoute8B910E5C", - "EksClusterDefaultVpcPublicSubnet2EIP16D41D80", - "EksClusterDefaultVpcPublicSubnet2NATGateway869DDCBF", - "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE", - "EksClusterDefaultVpcPublicSubnet2RouteTableAssociation39E2ABB3", - "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D", - "EksClusterDefaultVpcPublicSubnet3DefaultRoute1F5BE861", - "EksClusterDefaultVpcPublicSubnet3EIPF8D34EDE", - "EksClusterDefaultVpcPublicSubnet3NATGatewayC35C74D3", - "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A", - "EksClusterDefaultVpcPublicSubnet3RouteTableAssociationFE466321", - "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1", - "EksClusterDefaultVpcB24550B2", - "EksClusterDefaultVpcVPCGW0E4A5673" - ] - }, - "EksClusterFAB68BDB": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awsstepfunctionstasksekscallintegawscdkawseksClusterResourceProviderframeworkonEvent5722A6A8Arn" - ] - }, - "Config": { - "name": "eksCluster", - "version": "1.18", - "roleArn": { - "Fn::GetAtt": [ - "EksClusterRoleC84B376F", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047" - }, - { - "Ref": "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D" - }, - { - "Ref": "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1" - }, - { - "Ref": "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F" - }, - { - "Ref": "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71" - }, - { - "Ref": "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "EksClusterControlPlaneSecurityGroup9257A6D0", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "EksClusterCreationRole75AABE42", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "EksClusterDefaultVpcIGWCA6A3220", - "EksClusterDefaultVpcPrivateSubnet1DefaultRoute790DE5CF", - "EksClusterDefaultVpcPrivateSubnet1RouteTable9104CFAB", - "EksClusterDefaultVpcPrivateSubnet1RouteTableAssociationCC31B65B", - "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F", - "EksClusterDefaultVpcPrivateSubnet2DefaultRoute99A19B21", - "EksClusterDefaultVpcPrivateSubnet2RouteTable04B34031", - "EksClusterDefaultVpcPrivateSubnet2RouteTableAssociation86243837", - "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71", - "EksClusterDefaultVpcPrivateSubnet3DefaultRouteDC2E9DE0", - "EksClusterDefaultVpcPrivateSubnet3RouteTableA8F449F1", - "EksClusterDefaultVpcPrivateSubnet3RouteTableAssociationCE2741BE", - "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07", - "EksClusterDefaultVpcPublicSubnet1DefaultRouteCE5F6EF3", - "EksClusterDefaultVpcPublicSubnet1EIPF53713C9", - "EksClusterDefaultVpcPublicSubnet1NATGateway548C2CDF", - "EksClusterDefaultVpcPublicSubnet1RouteTable163DE10A", - "EksClusterDefaultVpcPublicSubnet1RouteTableAssociation36D085C2", - "EksClusterDefaultVpcPublicSubnet1SubnetCB1D1047", - "EksClusterDefaultVpcPublicSubnet2DefaultRoute8B910E5C", - "EksClusterDefaultVpcPublicSubnet2EIP16D41D80", - "EksClusterDefaultVpcPublicSubnet2NATGateway869DDCBF", - "EksClusterDefaultVpcPublicSubnet2RouteTable1027E4DE", - "EksClusterDefaultVpcPublicSubnet2RouteTableAssociation39E2ABB3", - "EksClusterDefaultVpcPublicSubnet2SubnetA8FE675D", - "EksClusterDefaultVpcPublicSubnet3DefaultRoute1F5BE861", - "EksClusterDefaultVpcPublicSubnet3EIPF8D34EDE", - "EksClusterDefaultVpcPublicSubnet3NATGatewayC35C74D3", - "EksClusterDefaultVpcPublicSubnet3RouteTableEBB51B8A", - "EksClusterDefaultVpcPublicSubnet3RouteTableAssociationFE466321", - "EksClusterDefaultVpcPublicSubnet3SubnetA04EFFC1", - "EksClusterDefaultVpcB24550B2", - "EksClusterDefaultVpcVPCGW0E4A5673", - "EksClusterCreationRoleDefaultPolicy2DFE4D73", - "EksClusterCreationRole75AABE42" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EksClusterKubectlReadyBarrier502B0E83": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "EksClusterCreationRoleDefaultPolicy2DFE4D73", - "EksClusterCreationRole75AABE42", - "EksClusterFAB68BDB" - ] - }, - "EksClusterMastersRole3F49FAC3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EksClusterAwsAuthmanifest4F460A9B": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awsstepfunctionstasksekscallintegawscdkawseksKubectlProviderframeworkonEventAF076895Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c8f58087a1a3e6c10f65d847befda9c1aa2145a8fc\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "EksClusterMastersRole3F49FAC3", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "EksClusterMastersRole3F49FAC3", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "EksClusterNodegroupDefaultCapacityNodeGroupRole70D09CEC", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "Role1ABCC5F0", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "Role1ABCC5F0", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "EksClusterFAB68BDB" - }, - "RoleArn": { - "Fn::GetAtt": [ - "EksClusterCreationRole75AABE42", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8f58087a1a3e6c10f65d847befda9c1aa2145a8fc", - "Overwrite": true - }, - "DependsOn": [ - "EksClusterKubectlReadyBarrier502B0E83" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "EksClusterNodegroupDefaultCapacityNodeGroupRole70D09CEC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "EksClusterNodegroupDefaultCapacityA81E70F9": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "EksClusterFAB68BDB" - }, - "NodeRole": { - "Fn::GetAtt": [ - "EksClusterNodegroupDefaultCapacityNodeGroupRole70D09CEC", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F" - }, - { - "Ref": "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71" - }, - { - "Ref": "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695S3Bucket28E1275C" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695S3VersionKeyF39C35C5" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695S3VersionKeyF39C35C5" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksekscallintegAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket00B4958CRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey361D9C06Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterCreationRole00B486C4Arn": { - "Fn::GetAtt": [ - "EksClusterCreationRole75AABE42", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket0B5E022ERef": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKeyFC16B266Ref": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket060661ABRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyEAB94B97Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45S3Bucket9880C2B9" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45S3VersionKey02679A48" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45S3VersionKey02679A48" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksekscallintegEksClusterCA674174Arn": { - "Fn::GetAtt": [ - "EksClusterFAB68BDB", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterCreationRole00B486C4Arn": { - "Fn::GetAtt": [ - "EksClusterCreationRole75AABE42", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3BucketE7B0B7E5Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyCD195549Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterDefaultVpcPrivateSubnet1Subnet3A6964EARef": { - "Ref": "EksClusterDefaultVpcPrivateSubnet1Subnet4D665A2F" - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterDefaultVpcPrivateSubnet2Subnet08905A58Ref": { - "Ref": "EksClusterDefaultVpcPrivateSubnet2Subnet180B8A71" - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterDefaultVpcPrivateSubnet3SubnetF3A2081ERef": { - "Ref": "EksClusterDefaultVpcPrivateSubnet3Subnet6C4BFC07" - }, - "referencetoawsstepfunctionstasksekscallintegEksClusterCA674174ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "EksClusterFAB68BDB", - "ClusterSecurityGroupId" - ] - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketF5A5D7D1Ref": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKeyB1080616Ref": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket91831D54Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyAFE7B9F9Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket060661ABRef": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksekscallintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyEAB94B97Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": "stateMachineExecutionRole" - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "Role1ABCC5F0", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Call a EKS Endpoint\",\"States\":{\"Call a EKS Endpoint\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::eks:call\",\"Parameters\":{\"ClusterName\":\"", - { - "Ref": "EksClusterFAB68BDB" - }, - "\",\"CertificateAuthority\":\"", - { - "Fn::GetAtt": [ - "EksClusterFAB68BDB", - "CertificateAuthorityData" - ] - }, - "\",\"Endpoint\":\"", - { - "Fn::GetAtt": [ - "EksClusterFAB68BDB", - "Endpoint" - ] - }, - "\",\"Method\":\"GET\",\"Path\":\"/api/v1/namespaces/default/pods\"}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "Role1ABCC5F0" - ] - } - }, - "Outputs": { - "EksClusterConfigCommand2AE6ED67": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "EksClusterFAB68BDB" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "EksClusterMastersRole3F49FAC3", - "Arn" - ] - } - ] - ] - } - }, - "EksClusterGetTokenCommandDF0BEDB9": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "EksClusterFAB68BDB" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "EksClusterMastersRole3F49FAC3", - "Arn" - ] - } - ] - ] - } - }, - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E": { - "Type": "String", - "Description": "S3 bucket for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF": { - "Type": "String", - "Description": "S3 key for asset version \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647ArtifactHashE94F67E3": { - "Type": "String", - "Description": "Artifact hash for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695S3Bucket28E1275C": { - "Type": "String", - "Description": "S3 bucket for asset \"ccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695\"" - }, - "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695S3VersionKeyF39C35C5": { - "Type": "String", - "Description": "S3 key for asset version \"ccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695\"" - }, - "AssetParametersccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695ArtifactHashB1AF64BD": { - "Type": "String", - "Description": "Artifact hash for asset \"ccf7ba5dd6e4a143970849e29cd4f0b5e83779a4229ae89c9a281dfb8129b695\"" - }, - "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45S3Bucket9880C2B9": { - "Type": "String", - "Description": "S3 bucket for asset \"d2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45\"" - }, - "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45S3VersionKey02679A48": { - "Type": "String", - "Description": "S3 key for asset version \"d2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45\"" - }, - "AssetParametersd2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45ArtifactHash172B8CCD": { - "Type": "String", - "Description": "Artifact hash for asset \"d2e7fbc583da5b26abfdeeddf4a017fe8ea21cc7708079de0f67dc762bd14b45\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.expected.json deleted file mode 100644 index 632be9f6d5ea6..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.expected.json +++ /dev/null @@ -1,1757 +0,0 @@ -{ - "Resources": { - "integrationtesteksclusterDefaultVpc395E1A86": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1" - } - } - }, - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-all-services-integ/integration-test-eks-cluster/DefaultVpc" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "InternetGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - } - }, - "integrationtesteksclusterRole03F70AF0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "integrationtesteksclusterControlPlaneSecurityGroup6E92F333": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - } - } - }, - "integrationtesteksclusterCreationRoleB98FE02A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "integrationtesteksclusterRole03F70AF0", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "Roles": [ - { - "Ref": "integrationtesteksclusterCreationRoleB98FE02A" - } - ] - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterE5C0ED98": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awsstepfunctionstasksemrcontainersallservicesintegawscdkawseksClusterResourceProviderframeworkonEventFF3F425BArn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterRole03F70AF0", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "integrationtesteksclusterControlPlaneSecurityGroup6E92F333", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204", - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "integrationtesteksclusterCreationRoleB98FE02A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "integrationtesteksclusterCreationRoleB98FE02A", - "integrationtesteksclusterE5C0ED98" - ] - }, - "integrationtesteksclusterMastersRole63B9B0BF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "integrationtesteksclusterAwsAuthmanifestAEF9C6DF": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awsstepfunctionstasksemrcontainersallservicesintegawscdkawseksKubectlProviderframeworkonEvent3B33A326Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c89f1e1be2a935f1b46af591dd13f7d1a5d084570d\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "RoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c89f1e1be2a935f1b46af591dd13f7d1a5d084570d", - "Overwrite": true - }, - "DependsOn": [ - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "integrationtesteksclusterNodegroupDefaultCapacity536CF32C": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "NodeRole": { - "Fn::GetAtt": [ - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.xlarge" - ], - "ScalingConfig": { - "DesiredSize": 3, - "MaxSize": 3, - "MinSize": 3 - } - } - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aS3Bucket2F5D4D08" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aS3VersionKeyA75A8D2B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aS3VersionKeyA75A8D2B" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3BucketE001F8ECRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey112AFD6DRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtesteksclusterCreationRole78F8A91EArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket970D47D8Ref": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey130969C4Ref": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket3AEB52A5Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey7B083B20Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67S3Bucket7A7690F3" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67S3VersionKeyC21848A0" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67S3VersionKeyC21848A0" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtestekscluster4FFBB19EArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterE5C0ED98", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtesteksclusterCreationRole78F8A91EArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3BucketA20ABE41Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKey968B9973Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtesteksclusterDefaultVpcPrivateSubnet1SubnetFBC220C4Ref": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtesteksclusterDefaultVpcPrivateSubnet2Subnet7E4A5E3BRef": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtesteksclusterDefaultVpcPrivateSubnet3Subnet482649D5Ref": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegintegrationtestekscluster4FFBB19EClusterSecurityGroupId": { - "Fn::GetAtt": [ - "integrationtesteksclusterE5C0ED98", - "ClusterSecurityGroupId" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketC3A07F1BRef": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey9350B036Ref": { - "Ref": "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3Bucket8CD29A22Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyE130152FRef": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3Bucket3AEB52A5Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksemrcontainersallservicesintegAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey7B083B20Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "JobExecutionRoleF19B4342": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "emr-containers.amazonaws.com", - { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "JobExecutionRolePolicy6968CCB9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "StartaJobRunMonitoringBucket899C33D9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "StartaJobRunMonitoringBucket899C33D9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "StartaJobRunMonitoringLogGroupD033B7AF", - "Arn" - ] - } - }, - { - "Action": "logs:DescribeLogGroups", - "Effect": "Allow", - "Resource": "arn:aws:logs:*:*:*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "JobExecutionRolePolicy6968CCB9", - "Roles": [ - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "JobExecutionRoleF19B4342", - "Arn" - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "StartaJobRunMonitoringLogGroupD033B7AF": { - "Type": "AWS::Logs::LogGroup", - "Properties": { - "RetentionInDays": 731 - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "StartaJobRunMonitoringBucket899C33D9": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "emr-containers:CreateVirtualCluster", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:CreateServiceLinkedRole", - "Condition": { - "StringLike": { - "iam:AWSServiceName": "emr-containers.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/emr-containers.amazonaws.com/AWSServiceRoleForAmazonEMRContainers" - ] - ] - } - }, - { - "Action": "emr-containers:StartJobRun", - "Condition": { - "StringEquals": { - "emr-containers:ExecutionRoleArn": { - "Fn::GetAtt": [ - "JobExecutionRoleF19B4342", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":emr-containers:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":/virtualclusters/*" - ] - ] - } - }, - { - "Action": [ - "emr-containers:CancelJobRun", - "emr-containers:DeleteVirtualCluster", - "emr-containers:DescribeJobRun" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":emr-containers:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":/virtualclusters/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Create a virtual Cluster\",\"States\":{\"Create a virtual Cluster\":{\"Next\":\"Start a Job Run\",\"Type\":\"Task\",\"ResultPath\":\"$.cluster\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::emr-containers:createVirtualCluster\",\"Parameters\":{\"Name\":\"Virtual-Cluster-Name\",\"ContainerProvider\":{\"Id\":\"", - { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "\",\"Info\":{\"EksInfo\":{\"Namespace\":\"default\"}},\"Type\":\"EKS\"}}},\"Start a Job Run\":{\"Next\":\"Delete a Virtual Cluster\",\"Type\":\"Task\",\"ResultPath\":\"$.job\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::emr-containers:startJobRun.sync\",\"Parameters\":{\"VirtualClusterId.$\":\"$.cluster.Id\",\"Name\":\"EMR-Containers-Job\",\"ExecutionRoleArn\":\"", - { - "Fn::GetAtt": [ - "JobExecutionRoleF19B4342", - "Arn" - ] - }, - "\",\"ReleaseLabel\":\"emr-6.2.0-latest\",\"JobDriver\":{\"SparkSubmitJobDriver\":{\"EntryPoint\":\"local:///usr/lib/spark/examples/src/main/python/pi.py\",\"EntryPointArguments\":[\"2\"],\"SparkSubmitParameters\":\"--conf spark.driver.memory=512M --conf spark.kubernetes.driver.request.cores=0.2 --conf spark.kubernetes.executor.request.cores=0.2 --conf spark.sql.shuffle.partitions=60 --conf spark.dynamicAllocation.enabled=false\"}},\"ConfigurationOverrides\":{\"ApplicationConfiguration\":[{\"Classification\":\"spark-defaults\",\"Properties\":{\"spark.executor.instances\":\"1\",\"spark.executor.memory\":\"512M\"}}],\"MonitoringConfiguration\":{\"CloudWatchMonitoringConfiguration\":{\"LogGroupName\":\"", - { - "Ref": "StartaJobRunMonitoringLogGroupD033B7AF" - }, - "\"},\"PersistentAppUI\":\"ENABLED\",\"S3MonitoringConfiguration\":{\"LogUri\":\"s3://", - { - "Ref": "StartaJobRunMonitoringBucket899C33D9" - }, - "\"}}}}},\"Delete a Virtual Cluster\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::emr-containers:deleteVirtualCluster\",\"Parameters\":{\"Id.$\":\"$.job.VirtualClusterId\"}}},\"TimeoutSeconds\":1200}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "integrationtesteksclusterConfigCommandFA814999": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - } - ] - ] - } - }, - "integrationtesteksclusterGetTokenCommandD7B92682": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - } - ] - ] - } - }, - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E": { - "Type": "String", - "Description": "S3 bucket for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF": { - "Type": "String", - "Description": "S3 key for asset version \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647ArtifactHashE94F67E3": { - "Type": "String", - "Description": "Artifact hash for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3BucketE02B5488": { - "Type": "String", - "Description": "S3 bucket for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95S3VersionKey4D8E71F2": { - "Type": "String", - "Description": "S3 key for asset version \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersf331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95ArtifactHash16B60F6C": { - "Type": "String", - "Description": "Artifact hash for asset \"f331b32a8ad8983464106a58e420e7bc7e6341ba2ffb8ac9ad350d7e32845d95\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aS3Bucket2F5D4D08": { - "Type": "String", - "Description": "S3 bucket for asset \"2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174a\"" - }, - "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aS3VersionKeyA75A8D2B": { - "Type": "String", - "Description": "S3 key for asset version \"2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174a\"" - }, - "AssetParameters2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174aArtifactHash7B798644": { - "Type": "String", - "Description": "Artifact hash for asset \"2a5ab35f4420d68f96a6e36cc4fc8d320de3bcf01199547acb57af0530db174a\"" - }, - "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67S3Bucket7A7690F3": { - "Type": "String", - "Description": "S3 bucket for asset \"55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67\"" - }, - "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67S3VersionKeyC21848A0": { - "Type": "String", - "Description": "S3 key for asset version \"55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67\"" - }, - "AssetParameters55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67ArtifactHash7C23762C": { - "Type": "String", - "Description": "Artifact hash for asset \"55ab944087ff7fca11470005814dff76a703d8bf01b6f1569046163522029e67\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.expected.json deleted file mode 100644 index 50ea79608b669..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.expected.json +++ /dev/null @@ -1,2246 +0,0 @@ -{ - "Resources": { - "integrationtesteksclusterDefaultVpc395E1A86": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - } - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - }, - "AllocationId": { - "Fn::GetAtt": [ - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PublicSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet1" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet2" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc/PrivateSubnet3" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791" - }, - "SubnetId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - } - }, - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1" - } - } - }, - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/integration-test-eks-cluster/DefaultVpc" - } - ] - } - }, - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - }, - "InternetGatewayId": { - "Ref": "integrationtesteksclusterDefaultVpcIGW9ADAFE6F" - } - } - }, - "integrationtesteksclusterRole03F70AF0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "integrationtesteksclusterControlPlaneSecurityGroup6E92F333": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "integrationtesteksclusterDefaultVpc395E1A86" - } - } - }, - "integrationtesteksclusterCreationRoleB98FE02A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "integrationtesteksclusterRole03F70AF0", - "Arn" - ] - } - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DeleteFargateProfile", - "eks:DescribeCluster", - "eks:DescribeFargateProfile", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "Roles": [ - { - "Ref": "integrationtesteksclusterCreationRoleB98FE02A" - } - ] - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204" - ] - }, - "integrationtesteksclusterE5C0ED98": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksClusterResourceProviderframeworkonEventD439F3D7Arn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterRole03F70AF0", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "integrationtesteksclusterControlPlaneSecurityGroup6E92F333", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "AttributesRevision": 2 - }, - "DependsOn": [ - "integrationtesteksclusterDefaultVpcIGW9ADAFE6F", - "integrationtesteksclusterDefaultVpcPrivateSubnet1DefaultRouteCC99A72C", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTable4A47F4AC", - "integrationtesteksclusterDefaultVpcPrivateSubnet1RouteTableAssociation7482DD1E", - "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB", - "integrationtesteksclusterDefaultVpcPrivateSubnet2DefaultRoute50FF167F", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableD7E59903", - "integrationtesteksclusterDefaultVpcPrivateSubnet2RouteTableAssociation99F934D5", - "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8", - "integrationtesteksclusterDefaultVpcPrivateSubnet3DefaultRoute6DE23E60", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableA2B42791", - "integrationtesteksclusterDefaultVpcPrivateSubnet3RouteTableAssociationB70598F3", - "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1", - "integrationtesteksclusterDefaultVpcPublicSubnet1DefaultRoute33CE7FC3", - "integrationtesteksclusterDefaultVpcPublicSubnet1EIP62A0A17B", - "integrationtesteksclusterDefaultVpcPublicSubnet1NATGatewayC9C984F9", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTable1D5A7569", - "integrationtesteksclusterDefaultVpcPublicSubnet1RouteTableAssociation4831B6A7", - "integrationtesteksclusterDefaultVpcPublicSubnet1Subnet58061317", - "integrationtesteksclusterDefaultVpcPublicSubnet2DefaultRoute253A231E", - "integrationtesteksclusterDefaultVpcPublicSubnet2EIPFC53AC43", - "integrationtesteksclusterDefaultVpcPublicSubnet2NATGatewayE109B761", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableA4C7B327", - "integrationtesteksclusterDefaultVpcPublicSubnet2RouteTableAssociation62710C52", - "integrationtesteksclusterDefaultVpcPublicSubnet2Subnet68EAAF11", - "integrationtesteksclusterDefaultVpcPublicSubnet3DefaultRouteB0117918", - "integrationtesteksclusterDefaultVpcPublicSubnet3EIP33828C59", - "integrationtesteksclusterDefaultVpcPublicSubnet3NATGateway01B2F0F1", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTable51E9DA7C", - "integrationtesteksclusterDefaultVpcPublicSubnet3RouteTableAssociation14A23BAF", - "integrationtesteksclusterDefaultVpcPublicSubnet3Subnet4307D52D", - "integrationtesteksclusterDefaultVpc395E1A86", - "integrationtesteksclusterDefaultVpcVPCGWE4DC2204", - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "integrationtesteksclusterCreationRoleB98FE02A" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" - }, - "DependsOn": [ - "integrationtesteksclusterCreationRoleDefaultPolicy5417802D", - "integrationtesteksclusterCreationRoleB98FE02A", - "integrationtesteksclusterE5C0ED98" - ] - }, - "integrationtesteksclusterMastersRole63B9B0BF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "integrationtesteksclusterAwsAuthmanifestAEF9C6DF": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderframeworkonEvent69C4EA38Arn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c89091867a17cdada4a752b4f280c4353e38671b20\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]},{\\\"rolearn\\\":\\\"arn:aws:iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/AWSServiceRoleForAmazonEMRContainers\\\",\\\"username\\\":\\\"emr-containers\\\",\\\"groups\\\":[]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "RoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c89091867a17cdada4a752b4f280c4353e38671b20", - "Overwrite": true - }, - "DependsOn": [ - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] - } - }, - "integrationtesteksclusterNodegroupDefaultCapacity536CF32C": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "NodeRole": { - "Fn::GetAtt": [ - "integrationtesteksclusterNodegroupDefaultCapacityNodeGroupRole75D45BA7", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.xlarge" - ], - "ScalingConfig": { - "DesiredSize": 3, - "MaxSize": 3, - "MinSize": 3 - } - } - }, - "integrationtesteksclustermanifestemrRoleCCE4E328": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderframeworkonEvent69C4EA38Arn" - ] - }, - "Manifest": "[{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"Role\",\"metadata\":{\"name\":\"emr-containers\",\"namespace\":\"default\",\"labels\":{\"aws.cdk.eks/prune-c8cef729fffd80e01dd767818967a268148bb13a2a\":\"\"}},\"rules\":[{\"apiGroups\":[\"\"],\"resources\":[\"namespaces\"],\"verbs\":[\"get\"]},{\"apiGroups\":[\"\"],\"resources\":[\"serviceaccounts\",\"services\",\"configmaps\",\"events\",\"pods\",\"pods/log\"],\"verbs\":[\"get\",\"list\",\"watch\",\"describe\",\"create\",\"edit\",\"delete\",\"deletecollection\",\"annotate\",\"patch\",\"label\"]},{\"apiGroups\":[\"\"],\"resources\":[\"secrets\"],\"verbs\":[\"create\",\"patch\",\"delete\",\"watch\"]},{\"apiGroups\":[\"apps\"],\"resources\":[\"statefulsets\",\"deployments\"],\"verbs\":[\"get\",\"list\",\"watch\",\"describe\",\"create\",\"edit\",\"delete\",\"annotate\",\"patch\",\"label\"]},{\"apiGroups\":[\"batch\"],\"resources\":[\"jobs\"],\"verbs\":[\"get\",\"list\",\"watch\",\"describe\",\"create\",\"edit\",\"delete\",\"annotate\",\"patch\",\"label\"]},{\"apiGroups\":[\"extensions\"],\"resources\":[\"ingresses\"],\"verbs\":[\"get\",\"list\",\"watch\",\"describe\",\"create\",\"edit\",\"delete\",\"annotate\",\"patch\",\"label\"]},{\"apiGroups\":[\"rbac.authorization.k8s.io\"],\"resources\":[\"roles\",\"rolebindings\"],\"verbs\":[\"get\",\"list\",\"watch\",\"describe\",\"create\",\"edit\",\"delete\",\"deletecollection\",\"annotate\",\"patch\",\"label\"]}]}]", - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "RoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c8cef729fffd80e01dd767818967a268148bb13a2a" - }, - "DependsOn": [ - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "integrationtesteksclustermanifestemrRoleBind8B35D2A2": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awsstepfunctionstasksemrcontainersstartjobrunintegtestawscdkawseksKubectlProviderframeworkonEvent69C4EA38Arn" - ] - }, - "Manifest": "[{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"RoleBinding\",\"metadata\":{\"name\":\"emr-containers\",\"namespace\":\"default\",\"labels\":{\"aws.cdk.eks/prune-c892a3812e60d138dd377a538f9d47aace2a0a8bb6\":\"\"}},\"subjects\":[{\"kind\":\"User\",\"name\":\"emr-containers\",\"apiGroup\":\"rbac.authorization.k8s.io\"}],\"roleRef\":{\"kind\":\"Role\",\"name\":\"emr-containers\",\"apiGroup\":\"rbac.authorization.k8s.io\"}}]", - "ClusterName": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "RoleArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c892a3812e60d138dd377a538f9d47aace2a0a8bb6" - }, - "DependsOn": [ - "integrationtesteksclusterKubectlReadyBarrier0D4A21B0", - "integrationtesteksclustermanifestemrRoleCCE4E328" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1S3Bucket5BEEED81" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1S3VersionKeyD7F17160" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1S3VersionKeyD7F17160" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket3302917DRef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey910A3B24Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtesteksclusterCreationRole19DB152EArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket2A349F05Ref": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey33F19E9BRef": { - "Ref": "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketACB46494Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4099BBC8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eS3Bucket91C98648" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eS3VersionKey8051CFBE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eS3VersionKey8051CFBE" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtestekscluster4D8C900FArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterE5C0ED98", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtesteksclusterCreationRole19DB152EArn": { - "Fn::GetAtt": [ - "integrationtesteksclusterCreationRoleB98FE02A", - "Arn" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3BucketDB162633Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKey428A28B8Ref": { - "Ref": "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtesteksclusterDefaultVpcPrivateSubnet1SubnetDFF56EB6Ref": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet1Subnet4E00CAFB" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0E779258Ref": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet2Subnet0C3539A8" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtesteksclusterDefaultVpcPrivateSubnet3SubnetA1BAE26ERef": { - "Ref": "integrationtesteksclusterDefaultVpcPrivateSubnet3SubnetD17D4AF1" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestintegrationtestekscluster4D8C900FClusterSecurityGroupId": { - "Fn::GetAtt": [ - "integrationtesteksclusterE5C0ED98", - "ClusterSecurityGroupId" - ] - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket694141C5Ref": { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket940CB35D" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey89E46F11Ref": { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketF38DB26BRef": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKey1E1E9DA8Ref": { - "Ref": "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketACB46494Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "referencetoawsstepfunctionstasksemrcontainersstartjobrunintegtestAssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKey4099BBC8Ref": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "VirtualCluster": { - "Type": "AWS::EMRContainers::VirtualCluster", - "Properties": { - "ContainerProvider": { - "Id": { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - "Info": { - "EksInfo": { - "Namespace": "default" - } - }, - "Type": "EKS" - }, - "Name": "Virtual-Cluster-Name" - }, - "DependsOn": [ - "integrationtesteksclusterAwsAuthmanifestAEF9C6DF", - "integrationtesteksclustermanifestemrRoleBind8B35D2A2" - ] - }, - "StartaJobRunJobExecutionRole157B6BE1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": [ - "emr-containers.amazonaws.com", - { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - ] - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StartaJobRunJobExecutionRoleDefaultPolicyEA7882C0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "logs:DescribeLogGroups", - "Effect": "Allow", - "Resource": "arn:aws:logs:*:*:*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StartaJobRunJobExecutionRoleDefaultPolicyEA7882C0", - "Roles": [ - { - "Ref": "StartaJobRunJobExecutionRole157B6BE1" - } - ] - } - }, - "StartaJobRunGetEksClusterInfoCustomResourcePolicy7AA7B106": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "emr-containers:DescribeVirtualCluster", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StartaJobRunGetEksClusterInfoCustomResourcePolicy7AA7B106", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "StartaJobRunGetEksClusterInfoD0E31373": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"EMRcontainers\",\"action\":\"describeVirtualCluster\",\"parameters\":{\"id\":\"", - { - "Fn::GetAtt": [ - "VirtualCluster", - "Id" - ] - }, - "\"},\"outputPaths\":[\"virtualCluster.containerProvider.info.eksInfo.namespace\",\"virtualCluster.containerProvider.id\"],\"physicalResourceId\":{\"id\":\"id\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "StartaJobRunGetEksClusterInfoCustomResourcePolicy7AA7B106" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "StartaJobRunawsclilayer110EEF0B": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket940CB35D" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "StartaJobRunCustomResourceProviderframeworkonEventServiceRole1D6E2464": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "StartaJobRunCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy95FB1565": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CB6182A5B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CB6182A5B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StartaJobRunCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy95FB1565", - "Roles": [ - { - "Ref": "StartaJobRunCustomResourceProviderframeworkonEventServiceRole1D6E2464" - } - ] - } - }, - "StartaJobRunCustomResourceProviderframeworkonEventAC961165": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "StartaJobRunCustomResourceProviderframeworkonEventServiceRole1D6E2464", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run-integ-test/Start a Job Run/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CB6182A5B", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "StartaJobRunCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy95FB1565", - "StartaJobRunCustomResourceProviderframeworkonEventServiceRole1D6E2464" - ] - }, - "StartaJobRunCustomResource3BD90664": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "StartaJobRunCustomResourceProviderframeworkonEventAC961165", - "Arn" - ] - }, - "eksNamespace": { - "Fn::GetAtt": [ - "StartaJobRunGetEksClusterInfoD0E31373", - "virtualCluster.containerProvider.info.eksInfo.namespace" - ] - }, - "eksClusterId": { - "Fn::GetAtt": [ - "StartaJobRunGetEksClusterInfoD0E31373", - "virtualCluster.containerProvider.id" - ] - }, - "roleName": { - "Ref": "StartaJobRunJobExecutionRole157B6BE1" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "eks:DescribeCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster/", - { - "Fn::GetAtt": [ - "StartaJobRunGetEksClusterInfoD0E31373", - "virtualCluster.containerProvider.id" - ] - } - ] - ] - } - }, - { - "Action": [ - "iam:GetRole", - "iam:UpdateAssumeRolePolicy" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "StartaJobRunJobExecutionRole157B6BE1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA", - "Roles": [ - { - "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" - } - ] - } - }, - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CB6182A5B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680S3Bucket56B5C500" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680S3VersionKey966662B2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680S3VersionKey966662B2" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "StartaJobRunawsclilayer110EEF0B" - } - ], - "MemorySize": 256, - "Runtime": "python3.6", - "Timeout": 30 - }, - "DependsOn": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA", - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "emr-containers:StartJobRun", - "Condition": { - "StringEquals": { - "emr-containers:ExecutionRoleArn": { - "Fn::GetAtt": [ - "StartaJobRunJobExecutionRole157B6BE1", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":emr-containers:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":/virtualclusters/", - { - "Fn::GetAtt": [ - "VirtualCluster", - "Id" - ] - } - ] - ] - } - }, - { - "Action": [ - "emr-containers:CancelJobRun", - "emr-containers:DescribeJobRun" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":emr-containers:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":/virtualclusters/", - { - "Fn::GetAtt": [ - "VirtualCluster", - "Id" - ] - }, - "/jobruns/*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start a Job Run\",\"States\":{\"Start a Job Run\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::emr-containers:startJobRun.sync\",\"Parameters\":{\"VirtualClusterId\":\"", - { - "Fn::GetAtt": [ - "VirtualCluster", - "Id" - ] - }, - "\",\"Name\":\"EMR-Containers-Job\",\"ExecutionRoleArn\":\"", - { - "Fn::GetAtt": [ - "StartaJobRunJobExecutionRole157B6BE1", - "Arn" - ] - }, - "\",\"ReleaseLabel\":\"emr-6.2.0-latest\",\"JobDriver\":{\"SparkSubmitJobDriver\":{\"EntryPoint\":\"local:///usr/lib/spark/examples/src/main/python/pi.py\",\"EntryPointArguments\":[\"2\"],\"SparkSubmitParameters\":\"--conf spark.driver.memory=512M --conf spark.kubernetes.driver.request.cores=0.2 --conf spark.kubernetes.executor.request.cores=0.2 --conf spark.sql.shuffle.partitions=60 --conf spark.dynamicAllocation.enabled=false\"}},\"ConfigurationOverrides\":{\"MonitoringConfiguration\":{\"PersistentAppUI\":\"ENABLED\"}}}}},\"TimeoutSeconds\":1000}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "integrationtesteksclusterConfigCommandFA814999": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks update-kubeconfig --name ", - { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - } - ] - ] - } - }, - "integrationtesteksclusterGetTokenCommandD7B92682": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "integrationtesteksclusterE5C0ED98" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "integrationtesteksclusterMastersRole63B9B0BF", - "Arn" - ] - } - ] - ] - } - }, - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3Bucket05488C5E": { - "Type": "String", - "Description": "S3 bucket for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647S3VersionKey174B23DF": { - "Type": "String", - "Description": "S3 key for asset version \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647ArtifactHashE94F67E3": { - "Type": "String", - "Description": "Artifact hash for asset \"8b11ea303df4b9db9feef6ed5f901a2d1185023a40c80c9630cf5c36559ae647\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3Bucket4CD5FFC3": { - "Type": "String", - "Description": "S3 bucket for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8S3VersionKeyE06BA291": { - "Type": "String", - "Description": "S3 key for asset version \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersa70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8ArtifactHashA4AB6609": { - "Type": "String", - "Description": "Artifact hash for asset \"a70c48e7047fb793b2378668accb1dc2d92f2d7b1fff80c9c718f4964dc69cb8\"" - }, - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket940CB35D": { - "Type": "String", - "Description": "S3 bucket for asset \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936": { - "Type": "String", - "Description": "S3 key for asset version \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27ArtifactHash934284DB": { - "Type": "String", - "Description": "Artifact hash for asset \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3BucketD3288998": { - "Type": "String", - "Description": "S3 bucket for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eS3VersionKeyB00C0565": { - "Type": "String", - "Description": "S3 key for asset version \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParametersea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03eArtifactHash4654D012": { - "Type": "String", - "Description": "Artifact hash for asset \"ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680S3Bucket56B5C500": { - "Type": "String", - "Description": "S3 bucket for asset \"b866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680\"" - }, - "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680S3VersionKey966662B2": { - "Type": "String", - "Description": "S3 key for asset version \"b866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680\"" - }, - "AssetParametersb866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680ArtifactHashE32BBB7E": { - "Type": "String", - "Description": "Artifact hash for asset \"b866fb0fd5a9b4215d1e23188632d74c01f3195f6f9d706134b197b400afb680\"" - }, - "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1S3Bucket5BEEED81": { - "Type": "String", - "Description": "S3 bucket for asset \"2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1\"" - }, - "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1S3VersionKeyD7F17160": { - "Type": "String", - "Description": "S3 key for asset version \"2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1\"" - }, - "AssetParameters2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1ArtifactHash74CF0762": { - "Type": "String", - "Description": "Artifact hash for asset \"2daac167596520ae78884b19c51078420864f0dbaed10dc7d68927e0f9f8f3d1\"" - }, - "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eS3Bucket91C98648": { - "Type": "String", - "Description": "S3 bucket for asset \"a0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47e\"" - }, - "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eS3VersionKey8051CFBE": { - "Type": "String", - "Description": "S3 key for asset version \"a0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47e\"" - }, - "AssetParametersa0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47eArtifactHash6EFA2AF6": { - "Type": "String", - "Description": "Artifact hash for asset \"a0c3cdfbc06ef95d340baf52d0c1a88f573ee45813d1552c057f6c6017b5e47e\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.expected.json deleted file mode 100644 index c02d4d5afa789..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.expected.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "Resources": { - "EventBus7B8748AA": { - "Type": "AWS::Events::EventBus", - "Properties": { - "Name": "MyEventBus1" - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "events:PutEvents", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "EventBus7B8748AA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":event-bus/default" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Put Custom Events\",\"States\":{\"Put Custom Events\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::events:putEvents\",\"Parameters\":{\"Entries\":[{\"Detail\":{\"Message\":\"Hello from Step Functions!\"},\"DetailType\":\"MessageFromStepFunctions\",\"Source\":\"step.functions\"},{\"Detail\":{\"Message\":\"Hello from Step Functions!\"},\"DetailType\":\"MessageFromStepFunctions\",\"EventBusName\":\"", - { - "Fn::GetAtt": [ - "EventBus7B8748AA", - "Arn" - ] - }, - "\",\"Source\":\"step.functions\"}]}}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.expected.json deleted file mode 100644 index 7214c2b028f1b..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.expected.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "Parameters": { - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B": { - "Type": "String", - "Description": "S3 bucket for asset \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - }, - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC": { - "Type": "String", - "Description": "S3 key for asset version \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - }, - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dArtifactHashEC764944": { - "Type": "String", - "Description": "Artifact hash for asset \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - } - }, - "Resources": { - "GlueJobRole1CD031E0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "glue.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSGlueServiceRole" - ] - ] - } - ] - } - }, - "GlueJobRoleDefaultPolicy3D94D6F1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "GlueJobRoleDefaultPolicy3D94D6F1", - "Roles": [ - { - "Ref": "GlueJobRole1CD031E0" - } - ] - } - }, - "GlueJob": { - "Type": "AWS::Glue::Job", - "Properties": { - "Command": { - "Name": "glueetl", - "PythonVersion": "3", - "ScriptLocation": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "GlueJobRole1CD031E0", - "Arn" - ] - }, - "GlueVersion": "1.0", - "Name": "My Glue Job" - } - }, - "StateMachineRole543B9670": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDA5F7DA8": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "glue:BatchStopJobRun", - "glue:GetJobRun", - "glue:GetJobRuns", - "glue:StartJobRun" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":job/My Glue Job" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDA5F7DA8", - "Roles": [ - { - "Ref": "StateMachineRole543B9670" - } - ] - } - }, - "StateMachine81935E76": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRole543B9670", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Task\",\"States\":{\"Start Task\":{\"Type\":\"Pass\",\"Next\":\"Glue Job Task\"},\"Glue Job Task\":{\"Next\":\"End Task\",\"Parameters\":{\"JobName\":\"My Glue Job\",\"Arguments\":{\"--enable-metrics\":\"true\"}},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::glue:startJobRun.sync\"},\"End Task\":{\"Type\":\"Pass\",\"End\":true}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDA5F7DA8", - "StateMachineRole543B9670" - ] - } - }, - "Outputs": { - "StateMachineARNOutput": { - "Value": { - "Ref": "StateMachine81935E76" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.expected.json deleted file mode 100644 index a35e42ab649d9..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.expected.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "Parameters": { - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B": { - "Type": "String", - "Description": "S3 bucket for asset \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - }, - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC": { - "Type": "String", - "Description": "S3 key for asset version \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - }, - "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dArtifactHashEC764944": { - "Type": "String", - "Description": "Artifact hash for asset \"d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d\"" - } - }, - "Resources": { - "GlueJobRole1CD031E0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "glue.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSGlueServiceRole" - ] - ] - } - ] - } - }, - "GlueJobRoleDefaultPolicy3D94D6F1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - }, - "/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "GlueJobRoleDefaultPolicy3D94D6F1", - "Roles": [ - { - "Ref": "GlueJobRole1CD031E0" - } - ] - } - }, - "GlueJob": { - "Type": "AWS::Glue::Job", - "Properties": { - "Command": { - "Name": "glueetl", - "PythonVersion": "3", - "ScriptLocation": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3BucketB8F6851B" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0dS3VersionKey7BCC06FC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "GlueJobRole1CD031E0", - "Arn" - ] - }, - "GlueVersion": "1.0", - "Name": "My Glue Job" - } - }, - "StateMachineRole543B9670": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDA5F7DA8": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "glue:BatchStopJobRun", - "glue:GetJobRun", - "glue:GetJobRuns", - "glue:StartJobRun" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":glue:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":job/My Glue Job" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDA5F7DA8", - "Roles": [ - { - "Ref": "StateMachineRole543B9670" - } - ] - } - }, - "StateMachine81935E76": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRole543B9670", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start Task\",\"States\":{\"Start Task\":{\"Type\":\"Pass\",\"Next\":\"Glue Job Task\"},\"Glue Job Task\":{\"Next\":\"End Task\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::glue:startJobRun.sync\",\"Parameters\":{\"JobName\":\"My Glue Job\",\"Arguments\":{\"--enable-metrics\":\"true\"}}},\"End Task\":{\"Type\":\"Pass\",\"End\":true}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDA5F7DA8", - "StateMachineRole543B9670" - ] - } - }, - "Outputs": { - "StateMachineARNOutput": { - "Value": { - "Ref": "StateMachine81935E76" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.expected.json deleted file mode 100644 index 9a5de368628cd..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.expected.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "Resources": { - "Evalda2d1181604e4a4586941a6abd7fe42dServiceRoleED144118": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bS3Bucket743A2950" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bS3VersionKey2DBCB833" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bS3VersionKey2DBCB833" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dServiceRoleED144118", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "Evalda2d1181604e4a4586941a6abd7fe42dServiceRoleED144118" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Sum\",\"States\":{\"Sum\":{\"Next\":\"Multiply\",\"Type\":\"Task\",\"ResultPath\":\"$.c\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D", - "Arn" - ] - }, - "\",\"Parameters\":{\"expression\":\"$.a + $.b\",\"expressionAttributeValues\":{\"$.a.$\":\"$.a\",\"$.b.$\":\"$.b\"}}},\"Multiply\":{\"Next\":\"Wait\",\"Type\":\"Task\",\"ResultPath\":\"$.d\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D", - "Arn" - ] - }, - "\",\"Parameters\":{\"expression\":\"$.c * 2\",\"expressionAttributeValues\":{\"$.c.$\":\"$.c\"}}},\"Wait\":{\"Type\":\"Wait\",\"SecondsPath\":\"$.d\",\"Next\":\"Now\"},\"Now\":{\"End\":true,\"Type\":\"Task\",\"ResultPath\":\"$.now\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "Evalda2d1181604e4a4586941a6abd7fe42dF371675D", - "Arn" - ] - }, - "\",\"Parameters\":{\"expression\":\"(new Date()).toUTCString()\",\"expressionAttributeValues\":{}}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Parameters": { - "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bS3Bucket743A2950": { - "Type": "String", - "Description": "S3 bucket for asset \"bc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626b\"" - }, - "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bS3VersionKey2DBCB833": { - "Type": "String", - "Description": "S3 key for asset version \"bc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626b\"" - }, - "AssetParametersbc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626bArtifactHashAD6C554B": { - "Type": "String", - "Description": "Artifact hash for asset \"bc320c7bd6a0eba90db647aa586cf65548560a54c141153fdc12f22eb3b2626b\"" - } - }, - "Outputs": { - "StateMachineARN": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.expected.json deleted file mode 100644 index 0a90d0093ec04..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.expected.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Resources": { - "SubmitJobFB773A16": { - "Type": "AWS::StepFunctions::Activity", - "Properties": { - "Name": "awsstepfunctionsintegSubmitJobA2508960" - } - }, - "CheckJob5FFC1D6F": { - "Type": "AWS::StepFunctions::Activity", - "Properties": { - "Name": "awsstepfunctionsintegCheckJobC4AC762D" - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Submit Job\",\"States\":{\"Submit Job\":{\"Next\":\"Wait X Seconds\",\"Type\":\"Task\",\"Resource\":\"", - { - "Ref": "SubmitJobFB773A16" - }, - "\",\"ResultPath\":\"$.guid\"},\"Wait X Seconds\":{\"Type\":\"Wait\",\"SecondsPath\":\"$.wait_time\",\"Next\":\"Get Job Status\"},\"Get Job Status\":{\"Next\":\"Job Complete?\",\"InputPath\":\"$.guid\",\"Type\":\"Task\",\"Resource\":\"", - { - "Ref": "CheckJob5FFC1D6F" - }, - "\",\"ResultPath\":\"$.status\"},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Get Final Job Status\"}],\"Default\":\"Wait X Seconds\"},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"DescribeJob returned FAILED\",\"Cause\":\"AWS Batch Job Failed\"},\"Get Final Job Status\":{\"End\":true,\"InputPath\":\"$.guid\",\"Type\":\"Task\",\"Resource\":\"", - { - "Ref": "CheckJob5FFC1D6F" - }, - "\"}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleB840431D" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.expected.json deleted file mode 100644 index f7bf0fa42dc2e..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.expected.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "Resources": { - "ChildRole1E3E0EF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ChildDAB30558": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "ChildRole1E3E0EF5", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"Pass\",\"States\":{\"Pass\":{\"Type\":\"Pass\",\"End\":true}}}" - }, - "DependsOn": [ - "ChildRole1E3E0EF5" - ] - }, - "ParentRole5F0C366C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ParentRoleDefaultPolicy9BDC56DC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "ChildDAB30558" - } - }, - { - "Action": [ - "states:DescribeExecution", - "states:StopExecution" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":states:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":execution:", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "ChildDAB30558" - } - ] - } - ] - }, - "*" - ] - ] - } - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForStepFunctionsExecutionRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ParentRoleDefaultPolicy9BDC56DC", - "Roles": [ - { - "Ref": "ParentRole5F0C366C" - } - ] - } - }, - "Parent8B210403": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "ParentRole5F0C366C", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Task\",\"States\":{\"Task\":{\"End\":true,\"Parameters\":{\"Input\":{\"hello.$\":\"$.hello\"},\"StateMachineArn\":\"", - { - "Ref": "ChildDAB30558" - }, - "\"},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::states:startExecution.sync\"}}}" - ] - ] - } - }, - "DependsOn": [ - "ParentRoleDefaultPolicy9BDC56DC", - "ParentRole5F0C366C" - ] - } - }, - "Outputs": { - "StateMachineARN": { - "Value": { - "Ref": "Parent8B210403" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.expected.json deleted file mode 100644 index 70549c1ed2ef2..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.expected.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "Resources": { - "HandlerServiceRoleFCDC14AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Handler886CB40B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3Bucket1354C645" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "HandlerServiceRoleFCDC14AE", - "Arn" - ] - }, - "Handler": "index.main", - "Runtime": "python3.6" - }, - "DependsOn": [ - "HandlerServiceRoleFCDC14AE" - ] - }, - "CallbackHandlerServiceRole3689695E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CallbackHandler4434C38D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3Bucket1354C645" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "CallbackHandlerServiceRole3689695E", - "Arn" - ] - }, - "Handler": "index.main", - "Runtime": "python3.6" - }, - "DependsOn": [ - "CallbackHandlerServiceRole3689695E" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CallbackHandler4434C38D", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "CallbackHandler4434C38D", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Invoke Handler\",\"States\":{\"Invoke Handler\":{\"Next\":\"Invoke Handler with task token\",\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - "\"},\"Invoke Handler with task token\":{\"Next\":\"Job Complete?\",\"InputPath\":\"$.guid\",\"Parameters\":{\"FunctionName\":\"", - { - "Ref": "CallbackHandler4434C38D" - }, - "\",\"Payload\":{\"token.$\":\"$$.Task.Token\"}},\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::lambda:invoke.waitForTaskToken\",\"ResultPath\":\"$.status\"},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Final step\"}]},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"DescribeJob returned FAILED\",\"Cause\":\"AWS Batch Job Failed\"},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Parameters": { - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3Bucket1354C645": { - "Type": "String", - "Description": "S3 bucket for asset \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - }, - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232S3VersionKey5D873FAC": { - "Type": "String", - "Description": "S3 key for asset version \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - }, - "AssetParameters9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232ArtifactHashFA16AACF": { - "Type": "String", - "Description": "Artifact hash for asset \"9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.expected.json deleted file mode 100644 index 08e8e50cc8ee7..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.expected.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "Resources": { - "submitJobLambdaServiceRole4D897ABD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "submitJobLambdaEFB00F3C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "submitJobLambdaServiceRole4D897ABD", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "submitJobLambdaServiceRole4D897ABD" - ] - }, - "checkJobStateLambdaServiceRoleB8B57B65": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "checkJobStateLambda4618B7B7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) {\n return {\n status: event.statusCode === '200' ? 'SUCCEEDED' : 'FAILED'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "checkJobStateLambdaServiceRoleB8B57B65", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "checkJobStateLambdaServiceRoleB8B57B65" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Invoke Handler\",\"States\":{\"Invoke Handler\":{\"Next\":\"Check the job state\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"OutputPath\":\"$.Payload\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"", - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - "\",\"Payload.$\":\"$\"}},\"Check the job state\":{\"Next\":\"Job Complete?\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"ResultSelector\":{\"status.$\":\"$.Payload.status\"},\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"", - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - "\",\"Payload.$\":\"$\"}},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Final step\"}]},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"Received a status that was not 200\",\"Cause\":\"Job Failed\"},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.expected.json deleted file mode 100644 index 8bd6968f1ef99..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.expected.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "Resources": { - "submitJobLambdaServiceRole4D897ABD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "submitJobLambdaEFB00F3C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "submitJobLambdaServiceRole4D897ABD", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "submitJobLambdaServiceRole4D897ABD" - ] - }, - "checkJobStateLambdaServiceRoleB8B57B65": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "checkJobStateLambda4618B7B7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) {\n return {\n status: event.statusCode === '200' ? 'SUCCEEDED' : 'FAILED'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "checkJobStateLambdaServiceRoleB8B57B65", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "checkJobStateLambdaServiceRoleB8B57B65" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Invoke Handler\",\"States\":{\"Invoke Handler\":{\"Next\":\"Check the job state\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - "\"},\"Check the job state\":{\"Next\":\"Job Complete?\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - "\"},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Final step\"}]},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"Received a status that was not 200\",\"Cause\":\"Job Failed\"},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.expected.json deleted file mode 100644 index 30a7cac4f955a..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.expected.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "Resources": { - "submitJobLambdaServiceRole4D897ABD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "submitJobLambdaEFB00F3C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "submitJobLambdaServiceRole4D897ABD", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "submitJobLambdaServiceRole4D897ABD" - ] - }, - "checkJobStateLambdaServiceRoleB8B57B65": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "checkJobStateLambda4618B7B7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = async function(event, context) {\n return {\n status: event.statusCode === '200' ? 'SUCCEEDED' : 'FAILED'\n };\n };" - }, - "Role": { - "Fn::GetAtt": [ - "checkJobStateLambdaServiceRoleB8B57B65", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "checkJobStateLambdaServiceRoleB8B57B65" - ] - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "checkJobStateLambda4618B7B7", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "submitJobLambdaEFB00F3C", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Invoke Handler\",\"States\":{\"Invoke Handler\":{\"Next\":\"Check the job state\",\"Parameters\":{\"FunctionName\":\"", - { - "Ref": "submitJobLambdaEFB00F3C" - }, - "\",\"Payload.$\":\"$\"},\"OutputPath\":\"$.Payload\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::lambda:invoke\"},\"Check the job state\":{\"Next\":\"Job Complete?\",\"Parameters\":{\"FunctionName\":\"", - { - "Ref": "checkJobStateLambda4618B7B7" - }, - "\",\"Payload.$\":\"$\"},\"OutputPath\":\"$.Payload\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::lambda:invoke\"},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Final step\"}]},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"Received a status that was not 200\",\"Cause\":\"Job Failed\"},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.expected.json deleted file mode 100644 index d8d68cf762861..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.expected.json +++ /dev/null @@ -1,547 +0,0 @@ -{ - "Resources": { - "EncryptionKey1B843E66": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TrainingData3FDB6D34": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TrainTaskSagemakerRoleD5A6F967": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "sagemaker.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudwatch:PutMetricData", - "ecr:GetAuthorizationToken", - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateTrainingJob" - } - ] - } - }, - "TrainTaskSagemakerRoleDefaultPolicy163CCC72": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - "/data/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - "/result/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TrainTaskSagemakerRoleDefaultPolicy163CCC72", - "Roles": [ - { - "Ref": "TrainTaskSagemakerRoleD5A6F967" - } - ] - } - }, - "CreateModelSagemakerRoleC2E07FC0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "sagemaker.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudwatch:PutMetricData", - "ecr:GetAuthorizationToken", - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateModel" - } - ] - } - }, - "CreateModelSagemakerRoleDefaultPolicyD7EAA79E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetDownloadUrlForLayer", - "s3:GetObject", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateModelSagemakerRoleDefaultPolicyD7EAA79E", - "Roles": [ - { - "Ref": "CreateModelSagemakerRoleC2E07FC0" - } - ] - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sagemaker:CreateTrainingJob", - "sagemaker:DescribeTrainingJob", - "sagemaker:StopTrainingJob" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":training-job/mytrainingjob*" - ] - ] - } - }, - { - "Action": "sagemaker:ListTags", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Condition": { - "StringEquals": { - "iam:PassedToService": "sagemaker.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "CreateModelSagemakerRoleC2E07FC0", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TrainTaskSagemakerRoleD5A6F967", - "Arn" - ] - } - ] - }, - { - "Action": "sagemaker:CreateModel", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":model/*" - ] - ] - } - }, - { - "Action": "sagemaker:CreateEndpointConfig", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":endpoint-config/*" - ] - ] - } - }, - { - "Action": [ - "sagemaker:createEndpoint", - "sagemaker:updateEndpoint" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":endpoint-config/*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":endpoint/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"Endpoint\":{\"Image\":\"ImageArn\",\"Config\":\"MyEndpointConfig\",\"Name\":\"MyEndpointName\",\"Model\":\"MyEndpointModelName\"}},\"Next\":\"Train Task\"},\"Train Task\":{\"Next\":\"Create Model\",\"Type\":\"Task\",\"ResultPath\":\"$.TrainingJob\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:createTrainingJob\",\"Parameters\":{\"TrainingJobName\":\"mytrainingjob\",\"RoleArn\":\"", - { - "Fn::GetAtt": [ - "TrainTaskSagemakerRoleD5A6F967", - "Arn" - ] - }, - "\",\"AlgorithmSpecification\":{\"TrainingInputMode\":\"File\",\"AlgorithmName\":\"arn:aws:sagemaker:us-east-1:865070037744:algorithm/scikit-decision-trees-15423055-57b73412d2e93e9239e4e16f83298b8f\"},\"InputDataConfig\":[{\"ChannelName\":\"InputData\",\"DataSource\":{\"S3DataSource\":{\"S3Uri\":\"https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "TrainingData3FDB6D34" - }, - "/data/\",\"S3DataType\":\"S3Prefix\"}}}],\"OutputDataConfig\":{\"S3OutputPath\":\"https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "TrainingData3FDB6D34" - }, - "/result/\"},\"ResourceConfig\":{\"InstanceCount\":1,\"InstanceType\":\"ml.m4.xlarge\",\"VolumeSizeInGB\":10},\"StoppingCondition\":{\"MaxRuntimeInSeconds\":3600}}},\"Create Model\":{\"Next\":\"Create enpoint config\",\"Type\":\"Task\",\"ResultPath\":\"$.Model\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:createModel\",\"Parameters\":{\"ExecutionRoleArn\":\"", - { - "Fn::GetAtt": [ - "CreateModelSagemakerRoleC2E07FC0", - "Arn" - ] - }, - "\",\"ModelName.$\":\"$.Endpoint.Model\",\"PrimaryContainer\":{\"Image.$\":\"$.Endpoint.Image\",\"Mode\":\"SingleModel\",\"ModelDataUrl.$\":\"$.TrainingJob.ModelArtifacts.S3ModelArtifacts\"}}},\"Create enpoint config\":{\"Next\":\"Create endpoint\",\"Type\":\"Task\",\"ResultPath\":\"$.EndpointConfig\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:createEndpointConfig\",\"Parameters\":{\"EndpointConfigName.$\":\"$.Endpoint.Config\",\"ProductionVariants\":[{\"InitialInstanceCount\":1,\"InstanceType\":\"ml.m5.xlarge\",\"ModelName.$\":\"$.Endpoint.Model\",\"VariantName\":\"awesome-variant\"}]}},\"Create endpoint\":{\"End\":true,\"Catch\":[{\"ErrorEquals\":[\"States.TaskFailed\"],\"ResultPath\":\"$.EndpointDeployed\",\"Next\":\"Update endpoint\"}],\"Type\":\"Task\",\"ResultPath\":\"$.EndpointDeployed\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:createEndpoint\",\"Parameters\":{\"EndpointConfigName.$\":\"$.Endpoint.Config\",\"EndpointName.$\":\"$.Endpoint.Name\",\"Tags\":[{\"Key\":\"Endpoint\",\"Value\":\"New\"}]}},\"Update endpoint\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:updateEndpoint\",\"Parameters\":{\"EndpointConfigName.$\":\"$.Endpoint.Config\",\"EndpointName.$\":\"$.Endpoint.Name\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "StateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.expected.json deleted file mode 100644 index 72d830f466baa..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.expected.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "Resources": { - "EncryptionKey1B843E66": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TrainingData3FDB6D34": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TrainTaskSagemakerRole0A9B1CDD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "sagemaker.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cloudwatch:PutMetricData", - "ecr:GetAuthorizationToken", - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateTrainingJob" - } - ] - } - }, - "TrainTaskSagemakerRoleDefaultPolicyA28F72FA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - "/data/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EncryptionKey1B843E66", - "Arn" - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TrainingData3FDB6D34", - "Arn" - ] - }, - "/result/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TrainTaskSagemakerRoleDefaultPolicyA28F72FA", - "Roles": [ - { - "Ref": "TrainTaskSagemakerRole0A9B1CDD" - } - ] - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "sagemaker:CreateTrainingJob", - "sagemaker:DescribeTrainingJob", - "sagemaker:StopTrainingJob" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":sagemaker:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":training-job/mytrainingjob*" - ] - ] - } - }, - { - "Action": "sagemaker:ListTags", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "iam:PassRole", - "Condition": { - "StringEquals": { - "iam:PassedToService": "sagemaker.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TrainTaskSagemakerRole0A9B1CDD", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"TrainTask\",\"States\":{\"TrainTask\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sagemaker:createTrainingJob\",\"Parameters\":{\"TrainingJobName\":\"mytrainingjob\",\"RoleArn\":\"", - { - "Fn::GetAtt": [ - "TrainTaskSagemakerRole0A9B1CDD", - "Arn" - ] - }, - "\",\"AlgorithmSpecification\":{\"TrainingInputMode\":\"File\",\"AlgorithmName\":\"arn:aws:sagemaker:us-east-1:865070037744:algorithm/scikit-decision-trees-15423055-57b73412d2e93e9239e4e16f83298b8f\"},\"InputDataConfig\":[{\"ChannelName\":\"InputData\",\"DataSource\":{\"S3DataSource\":{\"S3Uri\":\"https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "TrainingData3FDB6D34" - }, - "/data/\",\"S3DataType\":\"S3Prefix\"}}}],\"OutputDataConfig\":{\"S3OutputPath\":\"https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "TrainingData3FDB6D34" - }, - "/result/\"},\"ResourceConfig\":{\"InstanceCount\":1,\"InstanceType\":\"ml.m4.xlarge\",\"VolumeSizeInGB\":10},\"StoppingCondition\":{\"MaxRuntimeInSeconds\":3600}}}}}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.expected.json deleted file mode 100644 index e5ac1d8ff84a7..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.expected.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "Resources": { - "cooltopic4736778A": { - "Type": "AWS::SNS::Topic" - }, - "showmethemessages8D16BBDB": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "showmethemessagesPolicyB08B04B0": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "cooltopic4736778A" - } - } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "showmethemessages8D16BBDB", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "Queues": [ - { - "Ref": "showmethemessages8D16BBDB" - } - ] - } - }, - "showmethemessagesawsstepfunctionstaskssnspublishintegcooltopic8388C976F1D63091": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Ref": "cooltopic4736778A" - }, - "Endpoint": { - "Fn::GetAtt": [ - "showmethemessages8D16BBDB", - "Arn" - ] - } - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "cooltopic4736778A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"publish to SNS\",\"States\":{\"publish to SNS\":{\"Next\":\"Final step\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sns:publish\",\"Parameters\":{\"TopicArn\":\"", - { - "Ref": "cooltopic4736778A" - }, - "\",\"Message\":\"sending message over\"}},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - }, - "queueUrl": { - "Value": { - "Ref": "showmethemessages8D16BBDB" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.expected.json deleted file mode 100644 index 5d13c58fc0a5b..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.expected.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "Resources": { - "showmethemessages8D16BBDB": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachineRoleDefaultPolicyDF1E6607": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "showmethemessages8D16BBDB", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", - "Roles": [ - { - "Ref": "StateMachineRoleB840431D" - } - ] - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"send message to sqs\",\"States\":{\"send message to sqs\":{\"Next\":\"Final step\",\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::sqs:sendMessage\",\"Parameters\":{\"QueueUrl\":\"", - { - "Ref": "showmethemessages8D16BBDB" - }, - "\",\"MessageBody\":\"sending message over\"}},\"Final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleDefaultPolicyDF1E6607", - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - }, - "queueUrl": { - "Value": { - "Ref": "showmethemessages8D16BBDB" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.expected.json deleted file mode 100644 index e58efc93007de..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.expected.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "Resources": { - "SubmitJobFB773A16": { - "Type": "AWS::StepFunctions::Activity", - "Properties": { - "Name": "awsstepfunctionsintegSubmitJobA2508960" - } - }, - "CheckJob5FFC1D6F": { - "Type": "AWS::StepFunctions::Activity", - "Properties": { - "Name": "awsstepfunctionsintegCheckJobC4AC762D" - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Submit Job\",\"States\":{\"Submit Job\":{\"Next\":\"Wait X Seconds\",\"Type\":\"Task\",\"ResultPath\":\"$.guid\",\"Resource\":\"", - { - "Ref": "SubmitJobFB773A16" - }, - "\"},\"Wait X Seconds\":{\"Type\":\"Wait\",\"SecondsPath\":\"$.wait_time\",\"Next\":\"Get Job Status\"},\"Get Job Status\":{\"Next\":\"Job Complete?\",\"Type\":\"Task\",\"InputPath\":\"$.guid\",\"ResultPath\":\"$.status\",\"Resource\":\"", - { - "Ref": "CheckJob5FFC1D6F" - }, - "\"},\"Job Complete?\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"FAILED\",\"Next\":\"Job Failed\"},{\"Variable\":\"$.status\",\"StringEquals\":\"SUCCEEDED\",\"Next\":\"Get Final Job Status\"}],\"Default\":\"Wait X Seconds\"},\"Job Failed\":{\"Type\":\"Fail\",\"Error\":\"DescribeJob returned FAILED\",\"Cause\":\"AWS Batch Job Failed\"},\"Get Final Job Status\":{\"End\":true,\"Type\":\"Task\",\"InputPath\":\"$.guid\",\"Resource\":\"", - { - "Ref": "CheckJob5FFC1D6F" - }, - "\"}},\"TimeoutSeconds\":300}" - ] - ] - } - }, - "DependsOn": [ - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "stateMachineArn": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.expected.json deleted file mode 100644 index 966eb60ddfe35..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.expected.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "Resources": { - "ChildRole1E3E0EF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ChildDAB30558": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "ChildRole1E3E0EF5", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"Pass\",\"States\":{\"Pass\":{\"Type\":\"Pass\",\"End\":true}}}" - }, - "DependsOn": [ - "ChildRole1E3E0EF5" - ] - }, - "ParentRole5F0C366C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ParentRoleDefaultPolicy9BDC56DC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "ChildDAB30558" - } - }, - { - "Action": [ - "states:DescribeExecution", - "states:StopExecution" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":states:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":execution:", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "ChildDAB30558" - } - ] - } - ] - }, - "*" - ] - ] - } - }, - { - "Action": [ - "events:DescribeRule", - "events:PutRule", - "events:PutTargets" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":events:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":rule/StepFunctionsGetEventsForStepFunctionsExecutionRule" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ParentRoleDefaultPolicy9BDC56DC", - "Roles": [ - { - "Ref": "ParentRole5F0C366C" - } - ] - } - }, - "Parent8B210403": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "ParentRole5F0C366C", - "Arn" - ] - }, - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"Task\",\"States\":{\"Task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", - { - "Ref": "AWS::Partition" - }, - ":states:::states:startExecution.sync:2\",\"Parameters\":{\"Input\":{\"hello.$\":\"$.hello\"},\"StateMachineArn\":\"", - { - "Ref": "ChildDAB30558" - }, - "\"}}}}" - ] - ] - } - }, - "DependsOn": [ - "ParentRoleDefaultPolicy9BDC56DC", - "ParentRole5F0C366C" - ] - } - }, - "Outputs": { - "StateMachineARN": { - "Value": { - "Ref": "Parent8B210403" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.expected.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.expected.json deleted file mode 100644 index d89acdeed9123..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.expected.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "Resources": { - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null},\"final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}" - }, - "DependsOn": [ - "StateMachineRoleB840431D" - ] - } - }, - "Outputs": { - "StateMachineARN": { - "Value": { - "Ref": "StateMachine2E01A3A5" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.expected.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.expected.json deleted file mode 100644 index 971b1de2ed585..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.expected.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "Resources": { - "Role1ABCC5F0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "RoleDefaultPolicy5FFB7DAB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "states:ListExecutions", - "states:ListStateMachines", - "states:SendTaskSuccess" - ], - "Effect": "Allow", - "Resource": { - "Ref": "StateMachine2E01A3A5" - } - }, - { - "Action": [ - "states:DescribeExecution", - "states:DescribeStateMachineForExecution", - "states:GetExecutionHistory" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":states:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":execution:", - { - "Fn::Select": [ - 6, - { - "Fn::Split": [ - ":", - { - "Ref": "StateMachine2E01A3A5" - } - ] - } - ] - }, - ":*" - ] - ] - } - }, - { - "Action": [ - "states:DescribeActivity", - "states:DescribeStateMachine", - "states:ListActivities" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "RoleDefaultPolicy5FFB7DAB", - "Roles": [ - { - "Ref": "Role1ABCC5F0" - } - ] - } - }, - "StateMachineRoleB840431D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "StateMachine2E01A3A5": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "StateMachineRoleB840431D", - "Arn" - ] - }, - "DefinitionString": "{\"StartAt\":\"wait time\",\"States\":{\"wait time\":{\"Type\":\"Wait\",\"SecondsPath\":\"$.waitSeconds\",\"End\":true}}}" - }, - "DependsOn": [ - "StateMachineRoleB840431D" - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/test/integ.canary.expected.json b/packages/@aws-cdk/aws-synthetics/test/integ.canary.expected.json deleted file mode 100644 index 9667f7720b948..0000000000000 --- a/packages/@aws-cdk/aws-synthetics/test/integ.canary.expected.json +++ /dev/null @@ -1,1083 +0,0 @@ -{ - "Resources": { - "mytestbucket8DC16178": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCanaryServiceRole593F9DD9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "mytestbucket8DC16178", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "mytestbucket8DC16178", - "Arn" - ] - }, - "/integ/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyCanary1A94CAFA": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "mytestbucket8DC16178" - }, - "/integ" - ] - ] - }, - "Code": { - "Handler": "index.handler", - "Script": "\n exports.handler = async () => {\n console.log('hello world');\n };" - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyCanaryServiceRole593F9DD9", - "Arn" - ] - }, - "Name": "canary-integ", - "RuntimeVersion": "syn-nodejs-puppeteer-3.2", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(1 minute)" - }, - "StartCanaryAfterCreation": true - } - }, - "MyCanaryOneArtifactsBucketDF4A487D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCanaryOneArtifactsBucketPolicyA2B99545": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyCanaryOneServiceRole41995561": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyCanaryOneEF6A9CB9": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" - } - ] - ] - }, - "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3Bucket59F507C2" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3VersionKeyEFB5FFF8" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3VersionKeyEFB5FFF8" - } - ] - } - ] - } - ] - ] - } - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyCanaryOneServiceRole41995561", - "Arn" - ] - }, - "Name": "assetcanary-one", - "RuntimeVersion": "syn-nodejs-puppeteer-3.2", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" - }, - "StartCanaryAfterCreation": true - } - }, - "MyCanaryTwoArtifactsBucket79B179B6": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCanaryTwoArtifactsBucketPolicy4719E279": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyCanaryTwoServiceRole041E85D4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyCanaryTwo6501D55F": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" - } - ] - ] - }, - "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3Bucket705C3761" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - } - ] - ] - } - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyCanaryTwoServiceRole041E85D4", - "Arn" - ] - }, - "Name": "assetcanary-two", - "RuntimeVersion": "syn-nodejs-puppeteer-3.2", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" - }, - "StartCanaryAfterCreation": true - } - }, - "MyCanaryThreeArtifactsBucket894E857E": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCanaryThreeArtifactsBucketPolicy568A97F7": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyCanaryThreeServiceRole68117E65": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyCanaryThree968B1271": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" - } - ] - ] - }, - "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3Bucket705C3761" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - } - ] - ] - } - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyCanaryThreeServiceRole68117E65", - "Arn" - ] - }, - "Name": "assetcanary-three", - "RuntimeVersion": "syn-nodejs-puppeteer-3.3", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" - }, - "StartCanaryAfterCreation": true - } - }, - "MyPythonCanaryArtifactsBucket7AE88133": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyPythonCanaryArtifactsBucketPolicy7E13B7C5": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyPythonCanaryServiceRole41A363E1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyPythonCanary9A3DE09E": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" - } - ] - ] - }, - "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3Bucket59F507C2" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3VersionKeyEFB5FFF8" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3VersionKeyEFB5FFF8" - } - ] - } - ] - } - ] - ] - } - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyPythonCanaryServiceRole41A363E1", - "Arn" - ] - }, - "Name": "py-canary-integ", - "RuntimeVersion": "syn-python-selenium-1.0", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" - }, - "StartCanaryAfterCreation": true - } - } - }, - "Parameters": { - "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3Bucket59F507C2": { - "Type": "String", - "Description": "S3 bucket for asset \"9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb\"" - }, - "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbS3VersionKeyEFB5FFF8": { - "Type": "String", - "Description": "S3 key for asset version \"9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb\"" - }, - "AssetParameters9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bbArtifactHash0E2FE9D4": { - "Type": "String", - "Description": "Artifact hash for asset \"9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb\"" - }, - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3Bucket705C3761": { - "Type": "String", - "Description": "S3 bucket for asset \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - }, - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B": { - "Type": "String", - "Description": "S3 key for asset version \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - }, - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820ArtifactHash536FDCC3": { - "Type": "String", - "Description": "Artifact hash for asset \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/test/integ.vpc.expected.json b/packages/@aws-cdk/aws-synthetics/test/integ.vpc.expected.json deleted file mode 100644 index ca373b57bae03..0000000000000 --- a/packages/@aws-cdk/aws-synthetics/test/integ.vpc.expected.json +++ /dev/null @@ -1,653 +0,0 @@ -{ - "Resources": { - "MyVpcF9F0CA6F": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc" - } - ] - } - }, - "MyVpcPublicSubnet1SubnetF6608456": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/18", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableC46AB2F4": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1RouteTableAssociation2ECEE1CB": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - } - } - }, - "MyVpcPublicSubnet1DefaultRoute95FDF9EB": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet1RouteTableC46AB2F4" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet1EIP096967CB": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet1NATGatewayAD3400C1": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet1SubnetF6608456" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet1EIP096967CB", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet1" - } - ] - } - }, - "MyVpcPublicSubnet2Subnet492B6BFB": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/18", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTable1DF17386": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2RouteTableAssociation227DE78D": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - } - } - }, - "MyVpcPublicSubnet2DefaultRoute052936F6": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPublicSubnet2RouteTable1DF17386" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - }, - "DependsOn": [ - "MyVpcVPCGW488ACE0D" - ] - }, - "MyVpcPublicSubnet2EIP8CCBA239": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPublicSubnet2NATGateway91BFBEC9": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "MyVpcPublicSubnet2Subnet492B6BFB" - }, - "AllocationId": { - "Fn::GetAtt": [ - "MyVpcPublicSubnet2EIP8CCBA239", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PublicSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet1Subnet5057CF7E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/18", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTable8819E6E2": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PrivateSubnet1" - } - ] - } - }, - "MyVpcPrivateSubnet1RouteTableAssociation56D38C7E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - } - } - }, - "MyVpcPrivateSubnet1DefaultRouteA8CDE2FA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet1RouteTable8819E6E2" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet1NATGatewayAD3400C1" - } - } - }, - "MyVpcPrivateSubnet2Subnet0040C983": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.192.0/18", - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableCEDCEECE": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc/PrivateSubnet2" - } - ] - } - }, - "MyVpcPrivateSubnet2RouteTableAssociation86A610DA": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "SubnetId": { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - } - }, - "MyVpcPrivateSubnet2DefaultRoute9CE96294": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "MyVpcPrivateSubnet2RouteTableCEDCEECE" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "MyVpcPublicSubnet2NATGateway91BFBEC9" - } - } - }, - "MyVpcIGW5C4A4F63": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "canary-vpc/MyVpc" - } - ] - } - }, - "MyVpcVPCGW488ACE0D": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - }, - "InternetGatewayId": { - "Ref": "MyVpcIGW5C4A4F63" - } - } - }, - "MyVpcCanaryArtifactsBucketDC69853C": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyVpcCanaryArtifactsBucketPolicy27806F2C": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "MyVpcCanaryArtifactsBucketDC69853C" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyVpcCanaryArtifactsBucketDC69853C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyVpcCanaryArtifactsBucketDC69853C", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "MyVpcCanaryServiceRole2B1BBDE8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } - ], - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyVpcCanaryArtifactsBucketDC69853C", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyVpcCanaryArtifactsBucketDC69853C", - "Arn" - ] - }, - "/*" - ] - ] - } - }, - { - "Action": "cloudwatch:PutMetricData", - "Condition": { - "StringEquals": { - "cloudwatch:namespace": "CloudWatchSynthetics" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/lambda/cwsyn-*" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "canaryPolicy" - } - ] - } - }, - "MyVpcCanarySecurityGroupEA9564AA": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Canary canaryvpcMyVpcCanaryDEF63B1A", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - }, - "MyVpcCanary8C70C179": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyVpcCanaryArtifactsBucketDC69853C" - } - ] - ] - }, - "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3Bucket705C3761" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B" - } - ] - } - ] - } - ] - ] - } - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyVpcCanaryServiceRole2B1BBDE8", - "Arn" - ] - }, - "Name": "canary-vpc", - "RuntimeVersion": "syn-nodejs-puppeteer-3.3", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" - }, - "StartCanaryAfterCreation": true, - "VPCConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "MyVpcCanarySecurityGroupEA9564AA", - "GroupId" - ] - } - ], - "SubnetIds": [ - { - "Ref": "MyVpcPrivateSubnet1Subnet5057CF7E" - }, - { - "Ref": "MyVpcPrivateSubnet2Subnet0040C983" - } - ], - "VpcId": { - "Ref": "MyVpcF9F0CA6F" - } - } - } - } - }, - "Parameters": { - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3Bucket705C3761": { - "Type": "String", - "Description": "S3 bucket for asset \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - }, - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820S3VersionKeyE546342B": { - "Type": "String", - "Description": "S3 key for asset version \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - }, - "AssetParametersb1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820ArtifactHash536FDCC3": { - "Type": "String", - "Description": "Artifact hash for asset \"b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-include/test/integ.nested-stacks.expected.json b/packages/@aws-cdk/cloudformation-include/test/integ.nested-stacks.expected.json deleted file mode 100644 index 1a8759a8256de..0000000000000 --- a/packages/@aws-cdk/cloudformation-include/test/integ.nested-stacks.expected.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Resources": { - "ChildStack": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3BucketEAA24F0C" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3VersionKey1194CAB2" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3VersionKey1194CAB2" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "MyBucketParameter": "some-magic-bucket-name" - } - } - } - }, - "Parameters": { - "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3BucketEAA24F0C": { - "Type": "String", - "Description": "S3 bucket for asset \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"" - }, - "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50S3VersionKey1194CAB2": { - "Type": "String", - "Description": "S3 key for asset version \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"" - }, - "AssetParameters5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50ArtifactHash9C417847": { - "Type": "String", - "Description": "Artifact hash for asset \"5dc7d4a99cfe2979687dc74f2db9fd75f253b5505a1912b5ceecf70c9aefba50\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.expected.json b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.expected.json deleted file mode 100644 index 38a11e5519402..0000000000000 --- a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.expected.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "Resources": { - "TopicBFC7AF6E": { - "Type": "AWS::SNS::Topic" - }, - "PublishCustomResourcePolicyDF696FCA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PublishCustomResourcePolicyDF696FCA", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "Publish2E9BDF73": { - "Type": "Custom::SNSPublisher", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"SNS\",\"action\":\"publish\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", - { - "Ref": "TopicBFC7AF6E" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Ref": "TopicBFC7AF6E" - }, - "\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"SNS\",\"action\":\"publish\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", - { - "Ref": "TopicBFC7AF6E" - }, - "\"},\"physicalResourceId\":{\"id\":\"", - { - "Ref": "TopicBFC7AF6E" - }, - "\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "PublishCustomResourcePolicyDF696FCA" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 120 - }, - "DependsOn": [ - "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - ] - }, - "ListTopicsCustomResourcePolicy31A8396A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sns:ListTopics", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ListTopicsCustomResourcePolicy31A8396A", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - }, - "DependsOn": [ - "TopicBFC7AF6E" - ] - }, - "ListTopicsCE1E0341": { - "Type": "Custom::AWS", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "Update": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "ListTopicsCustomResourcePolicy31A8396A", - "TopicBFC7AF6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DummyParameter53662B67": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "1337" - } - }, - "GetParameterCustomResourcePolicyD8E5D455": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ssm:GetParameter", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "GetParameterCustomResourcePolicyD8E5D455", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, - "GetParameter42B0A00E": { - "Type": "Custom::SSMParameter", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWS679f53fac002430cb0da5b7982bd22872D164C4C", - "Arn" - ] - }, - "Create": { - "Fn::Join": [ - "", - [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", - { - "Ref": "DummyParameter53662B67" - }, - "\",\"WithDecryption\":true},\"physicalResourceId\":{\"responsePath\":\"Parameter.ARN\"}}" - ] - ] - }, - "Update": { - "Fn::Join": [ - "", - [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", - { - "Ref": "DummyParameter53662B67" - }, - "\",\"WithDecryption\":true},\"physicalResourceId\":{\"responsePath\":\"Parameter.ARN\"}}" - ] - ] - }, - "InstallLatestAwsSdk": true - }, - "DependsOn": [ - "GetParameterCustomResourcePolicyD8E5D455" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3Bucket36F31A16": { - "Type": "String", - "Description": "S3 bucket for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87S3VersionKeyF80D542B": { - "Type": "String", - "Description": "S3 key for asset version \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - }, - "AssetParameters3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87ArtifactHash40DDF5EE": { - "Type": "String", - "Description": "Artifact hash for asset \"3744fa896361f81b76b1efde632ac07b1920ce09a4ca1ff15ab486f262a19b87\"" - } - }, - "Outputs": { - "MessageId": { - "Value": { - "Fn::GetAtt": [ - "Publish2E9BDF73", - "MessageId" - ] - } - }, - "TopicArn": { - "Value": { - "Fn::GetAtt": [ - "ListTopicsCE1E0341", - "Topics.0.TopicArn" - ] - } - }, - "ParameterValue": { - "Value": { - "Fn::GetAtt": [ - "GetParameter42B0A00E", - "Parameter.Value" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/custom-resources/test/provider-framework/integ.provider.expected.json b/packages/@aws-cdk/custom-resources/test/provider-framework/integ.provider.expected.json deleted file mode 100644 index 646f935ff4ea6..0000000000000 --- a/packages/@aws-cdk/custom-resources/test/provider-framework/integ.provider.expected.json +++ /dev/null @@ -1,1211 +0,0 @@ -{ - "Resources": { - "MyBucketF68F3FF0": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "file1F37B880C": { - "Type": "Custom::S3File", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviderframeworkonEvent34F66A68", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "Contents": "Hello, world, 1980!", - "ObjectKey": "second.txt" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRole999CEEB6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRoleDefaultPolicy10D24725": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject*" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRoleDefaultPolicy10D24725", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRole999CEEB6" - } - ] - } - }, - "comamazonawscdkcustomresourcess3fileproviders3fileonevent48293DE8": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590S3BucketF43FE553" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590S3VersionKey1CA1DD38" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590S3VersionKey1CA1DD38" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRole999CEEB6", - "Arn" - ] - }, - "Handler": "index.onEvent", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRoleDefaultPolicy10D24725", - "comamazonawscdkcustomresourcess3fileproviders3fileoneventServiceRole999CEEB6" - ] - }, - "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleABFCDA11": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleDefaultPolicyA61D075B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviders3fileonevent48293DE8", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviders3fileonevent48293DE8", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleDefaultPolicyA61D075B", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleABFCDA11" - } - ] - } - }, - "comamazonawscdkcustomresourcess3fileproviderframeworkonEvent34F66A68": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleABFCDA11", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (integ-provider-framework/com.amazonaws.cdk.custom-resources.s3file-provider/s3file-provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviders3fileonevent48293DE8", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleDefaultPolicyA61D075B", - "comamazonawscdkcustomresourcess3fileproviderframeworkonEventServiceRoleABFCDA11" - ] - }, - "file23283EA00": { - "Type": "Custom::S3File", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3fileproviderframeworkonEvent34F66A68", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "Contents": "this file has a generated physical id" - }, - "DependsOn": [ - "file1F37B880C" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "assertfileD2D1F53A": { - "Type": "Custom::S3Assert", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonEvent0FE4BD4B", - "Arn" - ] - }, - "BucketName": { - "Ref": "MyBucketF68F3FF0" - }, - "ObjectKey": { - "Fn::GetAtt": [ - "file23283EA00", - "ObjectKey" - ] - }, - "ExpectedContent": "this file has a generated physical id" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "comamazonawscdkcustomresourcess3assertproviders3assertoneventServiceRole012C0033": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3Bucket0DB889DF" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3VersionKey67FE4034" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3VersionKey67FE4034" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventServiceRole012C0033", - "Arn" - ] - }, - "Handler": "index.on_event", - "Runtime": "python3.7" - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventServiceRole012C0033" - ] - }, - "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleACAA755A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleDefaultPolicyE8D09091": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleDefaultPolicyE8D09091", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleACAA755A" - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3Bucket0DB889DF" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3VersionKey67FE4034" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3VersionKey67FE4034" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleACAA755A", - "Arn" - ] - }, - "Handler": "index.is_complete", - "Runtime": "python3.7" - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleDefaultPolicyE8D09091", - "comamazonawscdkcustomresourcess3assertproviders3assertiscompleteServiceRoleACAA755A" - ] - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRole34070F2C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRoleDefaultPolicyDD1903FC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineAC25148E" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRoleDefaultPolicyDD1903FC", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRole34070F2C" - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonEvent0FE4BD4B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRole34070F2C", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (integ-provider-framework/com.amazonaws.cdk.custom-resources.s3assert-provider/s3assert-provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineAC25148E" - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRoleDefaultPolicyDD1903FC", - "comamazonawscdkcustomresourcess3assertproviderframeworkonEventServiceRole34070F2C" - ] - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRole2C8C7983": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRoleDefaultPolicy38CF2774": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRoleDefaultPolicy38CF2774", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRole2C8C7983" - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkisComplete63829575": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRole2C8C7983", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - isComplete (integ-provider-framework/com.amazonaws.cdk.custom-resources.s3assert-provider/s3assert-provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRoleDefaultPolicy38CF2774", - "comamazonawscdkcustomresourcess3assertproviderframeworkisCompleteServiceRole2C8C7983" - ] - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRole15F6DFA2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRoleDefaultPolicyC7408011": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRoleDefaultPolicyC7408011", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRole15F6DFA2" - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutA1E1E5DC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRole15F6DFA2", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onTimeout (integ-provider-framework/com.amazonaws.cdk.custom-resources.s3assert-provider/s3assert-provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertoneventF1EEF783", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviders3assertiscomplete6AC08EF9", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRoleDefaultPolicyC7408011", - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutServiceRole15F6DFA2" - ] - }, - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRole39E8529F": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "states.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRoleDefaultPolicy9882AB39": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkisComplete63829575", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutA1E1E5DC", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkisComplete63829575", - "Arn" - ] - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutA1E1E5DC", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRoleDefaultPolicy9882AB39", - "Roles": [ - { - "Ref": "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRole39E8529F" - } - ] - } - }, - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineAC25148E": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkisComplete63829575", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderframeworkonTimeoutA1E1E5DC", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRole39E8529F", - "Arn" - ] - } - }, - "DependsOn": [ - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRoleDefaultPolicy9882AB39", - "comamazonawscdkcustomresourcess3assertproviderwaiterstatemachineRole39E8529F" - ] - } - }, - "Parameters": { - "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590S3BucketF43FE553": { - "Type": "String", - "Description": "S3 bucket for asset \"192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590\"" - }, - "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590S3VersionKey1CA1DD38": { - "Type": "String", - "Description": "S3 key for asset version \"192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590\"" - }, - "AssetParameters192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590ArtifactHashBBCB8F76": { - "Type": "String", - "Description": "Artifact hash for asset \"192597c3e09c72bcb5fca6899fca0b42745cb003a702e275a7f96123a9baf590\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3Bucket0DB889DF": { - "Type": "String", - "Description": "S3 bucket for asset \"4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8\"" - }, - "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8S3VersionKey67FE4034": { - "Type": "String", - "Description": "S3 key for asset version \"4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8\"" - }, - "AssetParameters4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8ArtifactHash6C17CFC2": { - "Type": "String", - "Description": "Artifact hash for asset \"4bafad8d010ba693e235b77d2c6decfc2ac79a8208d4477cbb36d31caf7189e8\"" - } - }, - "Outputs": { - "file1url": { - "Value": { - "Fn::GetAtt": [ - "file1F37B880C", - "URL" - ] - } - }, - "file2url": { - "Value": { - "Fn::GetAtt": [ - "file23283EA00", - "URL" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/example-construct-library/test/integ.example-resource.expected.json b/packages/@aws-cdk/example-construct-library/test/integ.example-resource.expected.json deleted file mode 100644 index c9e2f4bc4db5a..0000000000000 --- a/packages/@aws-cdk/example-construct-library/test/integ.example-resource.expected.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Resources": { - "ExampleResourceWaitConditionHandle9C53A8D3": { - "Type": "AWS::CloudFormation::WaitConditionHandle" - }, - "ExampleResourceAC53F4AE": { - "Type": "AWS::CloudFormation::WaitCondition", - "Properties": { - "Count": 0, - "Handle": { - "Ref": "ExampleResourceWaitConditionHandle9C53A8D3" - }, - "Timeout": "10" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ExampleResourceRole0533653E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "cloudformation.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/lambda-layer-awscli/test/integ.awscli-layer.expected.json b/packages/@aws-cdk/lambda-layer-awscli/test/integ.awscli-layer.expected.json deleted file mode 100644 index d9411d0b44b0d..0000000000000 --- a/packages/@aws-cdk/lambda-layer-awscli/test/integ.awscli-layer.expected.json +++ /dev/null @@ -1,821 +0,0 @@ -{ - "Resources": { - "AwsCliLayerF44AAF94": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket940CB35D" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } - }, - "Lambdapython36ServiceRole658256F3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Lambdapython36B64E8A5D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3Bucket1DD21439" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Lambdapython36ServiceRole658256F3", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "AwsCliLayerF44AAF94" - } - ], - "MemorySize": 512, - "Runtime": "python3.6", - "Timeout": 30 - }, - "DependsOn": [ - "Lambdapython36ServiceRole658256F3" - ] - }, - "Providerpython36frameworkonEventServiceRole0B176429": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Providerpython36frameworkonEventServiceRoleDefaultPolicy414F3608": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Lambdapython36B64E8A5D", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Lambdapython36B64E8A5D", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Providerpython36frameworkonEventServiceRoleDefaultPolicy414F3608", - "Roles": [ - { - "Ref": "Providerpython36frameworkonEventServiceRole0B176429" - } - ] - } - }, - "Providerpython36frameworkonEventA3B6DD44": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Providerpython36frameworkonEventServiceRole0B176429", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-awscli-integ-stack/Providerpython3.6)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "Lambdapython36B64E8A5D", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "Providerpython36frameworkonEventServiceRoleDefaultPolicy414F3608", - "Providerpython36frameworkonEventServiceRole0B176429" - ] - }, - "CustomResourcepython36": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "Providerpython36frameworkonEventA3B6DD44", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Lambdapython37ServiceRoleB5A704D4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Lambdapython3780349E0A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3Bucket1DD21439" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Lambdapython37ServiceRoleB5A704D4", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "AwsCliLayerF44AAF94" - } - ], - "MemorySize": 512, - "Runtime": "python3.7", - "Timeout": 30 - }, - "DependsOn": [ - "Lambdapython37ServiceRoleB5A704D4" - ] - }, - "Providerpython37frameworkonEventServiceRole9EA6B2B0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Lambdapython3780349E0A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Lambdapython3780349E0A", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2", - "Roles": [ - { - "Ref": "Providerpython37frameworkonEventServiceRole9EA6B2B0" - } - ] - } - }, - "Providerpython37frameworkonEvent3AA4F69E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Providerpython37frameworkonEventServiceRole9EA6B2B0", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-awscli-integ-stack/Providerpython3.7)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "Lambdapython3780349E0A", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2", - "Providerpython37frameworkonEventServiceRole9EA6B2B0" - ] - }, - "CustomResourcepython37": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "Providerpython37frameworkonEvent3AA4F69E", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Lambdapython39ServiceRoleE2CFED77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Lambdapython39426A0480": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3Bucket1DD21439" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Lambdapython39ServiceRoleE2CFED77", - "Arn" - ] - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "AwsCliLayerF44AAF94" - } - ], - "MemorySize": 512, - "Runtime": "python3.9", - "Timeout": 30 - }, - "DependsOn": [ - "Lambdapython39ServiceRoleE2CFED77" - ] - }, - "Providerpython39frameworkonEventServiceRoleA299F5C1": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Lambdapython39426A0480", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Lambdapython39426A0480", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", - "Roles": [ - { - "Ref": "Providerpython39frameworkonEventServiceRoleA299F5C1" - } - ] - } - }, - "Providerpython39frameworkonEvent00AFA742": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "Providerpython39frameworkonEventServiceRoleA299F5C1", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-awscli-integ-stack/Providerpython3.9)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "Lambdapython39426A0480", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs12.x", - "Timeout": 900 - }, - "DependsOn": [ - "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", - "Providerpython39frameworkonEventServiceRoleA299F5C1" - ] - }, - "CustomResourcepython39": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "Providerpython39frameworkonEvent00AFA742", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3Bucket940CB35D": { - "Type": "String", - "Description": "S3 bucket for asset \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27S3VersionKey248C9936": { - "Type": "String", - "Description": "S3 key for asset version \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParametersd78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27ArtifactHash934284DB": { - "Type": "String", - "Description": "Artifact hash for asset \"d78148e12051f01bfd7332d83ccd5c159c8106d3b878d178f7eb093fabafab27\"" - }, - "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3Bucket1DD21439": { - "Type": "String", - "Description": "S3 bucket for asset \"5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48\"" - }, - "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48S3VersionKey77F71A63": { - "Type": "String", - "Description": "S3 key for asset version \"5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48\"" - }, - "AssetParameters5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48ArtifactHashA6792482": { - "Type": "String", - "Description": "Artifact hash for asset \"5dff6208ccd5fb196bb0354fd6e47faa8431a789e6125d20386586fef761ed48\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3BucketB4102E9A": { - "Type": "String", - "Description": "S3 bucket for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391S3VersionKeyC1EC3ED6": { - "Type": "String", - "Description": "S3 key for asset version \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - }, - "AssetParameters5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391ArtifactHashA391D940": { - "Type": "String", - "Description": "Artifact hash for asset \"5b47c8e4cbbce7e4a8085f1aa83ed9c4691b7f65927ba092d6620bbba925f391\"" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json deleted file mode 100644 index 1f0deaf6dc981..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json +++ /dev/null @@ -1,2441 +0,0 @@ -{ - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } - } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet2EIP3C605A87": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet2NATGateway9182C01D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet2EIP3C605A87", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet2" - } - ] - } - }, - "VpcPublicSubnet3SubnetBE12F0B6": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTable93458DBB": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - } - } - }, - "VpcPublicSubnet3DefaultRoute4697774F": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet3RouteTable93458DBB" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet3EIP3A666A23": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPublicSubnet3NATGateway7640CD1D": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet3SubnetBE12F0B6" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet3EIP3A666A23", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PublicSubnet3" - } - ] - } - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet2NATGateway9182C01D" - } - } - }, - "VpcPrivateSubnet3SubnetF258B56E": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableD98824C7": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc/PrivateSubnet3" - } - ] - } - }, - "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - } - }, - "VpcPrivateSubnet3DefaultRoute94B74F0D": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet3RouteTableD98824C7" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet3NATGateway7640CD1D" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "PipelineStack/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset1CodePipelineActionRoleC0EC649A", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset2CodePipelineActionRole06965A59", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "ThirdParty", - "Provider": "GitHub", - "Version": "1" - }, - "Configuration": { - "Owner": "rix0rrr", - "Repo": "cdk-pipelines-demo", - "Branch": "main", - "OAuthToken": "{{resolve:secretsmanager:github-token:SecretString:::}}", - "PollForSourceChanges": false - }, - "Name": "rix0rrr_cdk-pipelines-demo", - "OutputArtifacts": [ - { - "Name": "rix0rrr_cdk_pipelines_demo_Source" - } - ], - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"00ebacfb32b1bde8d3638577308e7b7144dfa3b0a58a83bc6ff38a3b1f26951c\"}]" - }, - "InputArtifacts": [ - { - "Name": "rix0rrr_cdk_pipelines_demo_Source" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"c0779bd925c3a7f19be75a4973c668d10d00ce3552b882c7d2ba3fa3cee6d976\"}]" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "SelfMutate", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "UpdatePipeline" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineAssetsFileAsset185A67CB4" - } - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "FileAsset1", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset1CodePipelineActionRoleC0EC649A", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineAssetsFileAsset24D2D639B" - } - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "FileAsset2", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset2CodePipelineActionRole06965A59", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Assets" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - } - ], - "Name": "Beta" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourcerix0rrrcdkpipelinesdemoWebhookResourceDB0C1BCA": { - "Type": "AWS::CodePipeline::Webhook", - "Properties": { - "Authentication": "GITHUB_HMAC", - "AuthenticationConfiguration": { - "SecretToken": "{{resolve:secretsmanager:github-token:SecretString:::}}" - }, - "Filters": [ - { - "JsonPath": "$.ref", - "MatchEquals": "refs/heads/{Branch}" - } - ], - "TargetAction": "rix0rrr_cdk-pipelines-demo", - "TargetPipeline": { - "Ref": "Pipeline9850B417" - }, - "TargetPipelineVersion": 1, - "RegisterWithThirdParty": true - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:CreateNetworkInterfacePermission", - "Condition": { - "StringEquals": { - "ec2:Subnet": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - ] - } - ], - "ec2:AuthorizedService": "codebuild.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":network-interface/*" - ] - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:test-region:12345678:report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProjectSecurityGroup84F92459": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic generated security group for CodeBuild PipelineStackPipelineBuildSynthCdkBuildProject225CEB2C", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm ci\",\n \"npm run build\",\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/Build/Synth", - "EncryptionKey": "alias/aws/s3", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectSecurityGroup84F92459", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "DependsOn": [ - "PipelineBuildSynthCdkBuildProjectPolicyDocument4D16371A" - ] - }, - "PipelineBuildSynthCdkBuildProjectPolicyDocument4D16371A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeDhcpOptions", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectPolicyDocument4D16371A", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationDAA41400", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF" - } - ] - } - }, - "PipelineAssetsFileAsset1CodePipelineActionRoleC0EC649A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineAssetsFileAsset1CodePipelineActionRoleDefaultPolicy5F0BE7E8": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset185A67CB4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileAsset1CodePipelineActionRoleDefaultPolicy5F0BE7E8", - "Roles": [ - { - "Ref": "PipelineAssetsFileAsset1CodePipelineActionRoleC0EC649A" - } - ] - } - }, - "PipelineAssetsFileAsset2CodePipelineActionRole06965A59": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineAssetsFileAsset2CodePipelineActionRoleDefaultPolicy2399F4BC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset24D2D639B", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileAsset2CodePipelineActionRoleDefaultPolicy2399F4BC", - "Roles": [ - { - "Ref": "PipelineAssetsFileAsset2CodePipelineActionRole06965A59" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationRole57E559E8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ec2:CreateNetworkInterfacePermission", - "Condition": { - "StringEquals": { - "ec2:Subnet": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - ] - } - ], - "ec2:AuthorizedService": "codebuild.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":network-interface/*" - ] - ] - } - }, - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:test-region:12345678:report-group/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "image-publishing", - "file-publishing", - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": "arn:*:iam::12345678:role/*" - }, - { - "Action": [ - "cloudformation:DescribeStacks", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationSecurityGroup94164EDC": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic generated security group for CodeBuild PipelineStackPipelineUpdatePipelineSelfMutationE51045FC", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PipelineUpdatePipelineSelfMutationDAA41400": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationRole57E559E8", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/UpdatePipeline/SelfMutate", - "EncryptionKey": "alias/aws/s3", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationSecurityGroup94164EDC", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "DependsOn": [ - "PipelineUpdatePipelineSelfMutationPolicyDocumentD327DC74" - ] - }, - "PipelineUpdatePipelineSelfMutationPolicyDocumentD327DC74": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeDhcpOptions", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationPolicyDocumentD327DC74", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineAssetsFileRole59943A77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - }, - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineAssetsFileRoleDefaultPolicy14DB8755": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:test-region:12345678:report-group/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - }, - { - "Action": "ec2:CreateNetworkInterfacePermission", - "Condition": { - "StringEquals": { - "ec2:Subnet": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":subnet/", - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ] - ] - } - ], - "ec2:AuthorizedService": "codebuild.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":ec2:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":network-interface/*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileRoleDefaultPolicy14DB8755", - "Roles": [ - { - "Ref": "PipelineAssetsFileRole59943A77" - } - ] - } - }, - "PipelineAssetsFileAsset1SecurityGroupF04F1AD4": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic generated security group for CodeBuild PipelineStackPipelineAssetsFileAsset10191BEFB", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PipelineAssetsFileAsset185A67CB4": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/Assets/FileAsset1", - "EncryptionKey": "alias/aws/s3", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset1SecurityGroupF04F1AD4", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "DependsOn": [ - "PipelineAssetsFileAsset1PolicyDocument4681543E" - ] - }, - "PipelineAssetsFileAsset1PolicyDocument4681543E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ec2:CreateNetworkInterface", - "ec2:DeleteNetworkInterface", - "ec2:DescribeDhcpOptions", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileAsset1PolicyDocument4681543E", - "Roles": [ - { - "Ref": "PipelineAssetsFileRole59943A77" - } - ] - } - }, - "PipelineAssetsFileAsset2SecurityGroupA400C1A5": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic generated security group for CodeBuild PipelineStackPipelineAssetsFileAsset24DB856A2", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "PipelineAssetsFileAsset24D2D639B": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/Assets/FileAsset2", - "EncryptionKey": "alias/aws/s3", - "VpcConfig": { - "SecurityGroupIds": [ - { - "Fn::GetAtt": [ - "PipelineAssetsFileAsset2SecurityGroupA400C1A5", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - { - "Ref": "VpcPrivateSubnet3SubnetF258B56E" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" - } - } - }, - "DependsOn": [ - "PipelineAssetsFileAsset1PolicyDocument4681543E" - ] - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json deleted file mode 100644 index 7914350f39b6f..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json +++ /dev/null @@ -1,2378 +0,0 @@ -{ - "Resources": { - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "ThirdParty", - "Provider": "GitHub", - "Version": "1" - }, - "Configuration": { - "Owner": "rix0rrr", - "Repo": "cdk-pipelines-demo", - "Branch": "main", - "OAuthToken": "{{resolve:secretsmanager:github-token:SecretString:::}}", - "PollForSourceChanges": false - }, - "Name": "rix0rrr_cdk-pipelines-demo", - "OutputArtifacts": [ - { - "Name": "rix0rrr_cdk_pipelines_demo_Source" - } - ], - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"00ebacfb32b1bde8d3638577308e7b7144dfa3b0a58a83bc6ff38a3b1f26951c\"}]" - }, - "InputArtifacts": [ - { - "Name": "rix0rrr_cdk_pipelines_demo_Source" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"c0779bd925c3a7f19be75a4973c668d10d00ce3552b882c7d2ba3fa3cee6d976\"}]" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "SelfMutate", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "UpdatePipeline" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Beta-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - } - ], - "Name": "Beta" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod1-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod1.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod2-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod2.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod1-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod1.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod2-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod2.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod1-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod1.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod2-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod2.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod1-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod1.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod2-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod2.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - } - ], - "Name": "Wave1" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod3-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod3.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod4-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod4.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod5-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod5.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod6-Stack1", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod6.Stack1.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod3-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod3.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod4-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod4.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod5-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod5.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod6-Stack1", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod6.Stack1.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod3-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod3.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod4-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod4.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod5-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod5.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod6-Stack2", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json" - }, - "InputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "Name": "Prod6.Stack2.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod3-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod3.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod4-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod4.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod5-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod5.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "Prod6-Stack2", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Prod6.Stack2.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - } - ], - "Name": "Wave2" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourcerix0rrrcdkpipelinesdemoWebhookResourceDB0C1BCA": { - "Type": "AWS::CodePipeline::Webhook", - "Properties": { - "Authentication": "GITHUB_HMAC", - "AuthenticationConfiguration": { - "SecretToken": "{{resolve:secretsmanager:github-token:SecretString:::}}" - }, - "Filters": [ - { - "JsonPath": "$.ref", - "MatchEquals": "refs/heads/{Branch}" - } - ], - "TargetAction": "rix0rrr_cdk-pipelines-demo", - "TargetPipeline": { - "Ref": "Pipeline9850B417" - }, - "TargetPipelineVersion": 1, - "RegisterWithThirdParty": true - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:test-region:12345678:report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm ci\",\n \"npm run build\",\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/Build/Synth", - "EncryptionKey": "alias/aws/s3" - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::12345678:root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationDAA41400", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationRole57E559E8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:test-region:12345678:log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:test-region:12345678:report-group/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "image-publishing", - "file-publishing", - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": "arn:*:iam::12345678:role/*" - }, - { - "Action": [ - "cloudformation:DescribeStacks", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationDAA41400": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationRole57E559E8", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step PipelineStack/Pipeline/UpdatePipeline/SelfMutate", - "EncryptionKey": "alias/aws/s3" - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-security.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-security.expected.json deleted file mode 100644 index ebb4a166033b5..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-security.expected.json +++ /dev/null @@ -1,3035 +0,0 @@ -{ - "Resources": { - "SourceBucketDDD2130A": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SourceBucketPolicy703DFBF9": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "SourceBucketDDD2130A" - } - }, - "DependsOn": [ - "SourceBucketPolicy703DFBF9" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "SourceBucketDDD2130A" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "TestPipelineArtifactsBucketEncryptionKey13258842": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TestPipelineArtifactsBucketEncryptionKeyAliasE8D86DD3": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelinesecuritystacktestpipelinef7060861", - "TargetKeyId": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TestPipelineArtifactsBucket026AF2F9": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "TestPipelineArtifactsBucketPolicyDF75C611": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "TestPipelineArtifactsBucket026AF2F9" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineRole63C35BBD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineRoleDefaultPolicyFA69BF2D": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineBuildSynthCodePipelineActionRoleF7BF5926", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelineNoSecurityCheckEnableSecurityCheckManualApprovalCodePipelineActionRole27FC4015", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRole8D10AA6D", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelinePreProductionPreProductionManualApprovalCodePipelineActionRole81B9C4F9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRole4E54C194", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelinePreProductionSafeProductionManualApprovalCodePipelineActionRole4F30C0D9", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRole399C68A6", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelineSourceS3CodePipelineActionRoleEF21D3A0", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelineUnattachedStageSingleStageManualApprovalCodePipelineActionRoleF7A614C8", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleFF6E43E2", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineRoleDefaultPolicyFA69BF2D", - "Roles": [ - { - "Ref": "TestPipelineRole63C35BBD" - } - ] - } - }, - "TestPipeline34ACDBF9": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineRole63C35BBD", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "S3ObjectKey": "key" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineSourceS3CodePipelineActionRoleEF21D3A0", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "TestPipelineBuildSynthCdkBuildProject755D4B01" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"fade37e243023bb2c0d6730c10a2c61567fbe168675a7c5e26a8810aadc7e513\"}]" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineBuildSynthCodePipelineActionRoleF7BF5926", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B" - }, - "EnvironmentVariables": { - "Fn::Join": [ - "", - [ - "[{\"name\":\"STAGE_PATH\",\"type\":\"PLAINTEXT\",\"value\":\"PipelineSecurityStack/SingleStage\"},{\"name\":\"STAGE_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"UnattachedStage\"},{\"name\":\"ACTION_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"SingleStageManualApproval\"},{\"name\":\"NOTIFICATION_ARN\",\"type\":\"PLAINTEXT\",\"value\":\"", - { - "Ref": "SecurityChangesTopic9762A9B3" - }, - "\"},{\"name\":\"NOTIFICATION_SUBJECT\",\"type\":\"PLAINTEXT\",\"value\":\"Confirm permission broadening in SingleStage\"}]" - ] - ] - } - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SingleStageSecurityCheck", - "Namespace": "SingleStageSecurityCheck", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleFF6E43E2", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Configuration": { - "CustomData": "#{SingleStageSecurityCheck.MESSAGE}", - "ExternalEntityLink": "#{SingleStageSecurityCheck.LINK}" - }, - "Name": "SingleStageManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineUnattachedStageSingleStageManualApprovalCodePipelineActionRoleF7A614C8", - "Arn" - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "SingleStage-MyStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-SingleStage/PipelineSecurityStackSingleStageMyStack29962269.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SingleStage-MyStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "SingleStage-MyStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "SingleStage-MyStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - } - ], - "Name": "UnattachedStage" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - }, - "EnvironmentVariables": { - "Fn::Join": [ - "", - [ - "[{\"name\":\"STAGE_PATH\",\"type\":\"PLAINTEXT\",\"value\":\"PipelineSecurityStack/PreProduction\"},{\"name\":\"STAGE_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"PreProduction\"},{\"name\":\"ACTION_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"PreProductionManualApproval\"},{\"name\":\"NOTIFICATION_ARN\",\"type\":\"PLAINTEXT\",\"value\":\"", - { - "Ref": "SecurityChangesTopic9762A9B3" - }, - "\"},{\"name\":\"NOTIFICATION_SUBJECT\",\"type\":\"PLAINTEXT\",\"value\":\"Confirm permission broadening in PreProduction\"}]" - ] - ] - } - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "PreProductionSecurityCheck", - "Namespace": "PreProductionSecurityCheck", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRole4E54C194", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Configuration": { - "CustomData": "#{PreProductionSecurityCheck.MESSAGE}", - "ExternalEntityLink": "#{PreProductionSecurityCheck.LINK}" - }, - "Name": "PreProductionManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelinePreProductionPreProductionManualApprovalCodePipelineActionRole81B9C4F9", - "Arn" - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - }, - "EnvironmentVariables": { - "Fn::Join": [ - "", - [ - "[{\"name\":\"STAGE_PATH\",\"type\":\"PLAINTEXT\",\"value\":\"PipelineSecurityStack/SafeProduction\"},{\"name\":\"STAGE_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"PreProduction\"},{\"name\":\"ACTION_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"SafeProductionManualApproval\"},{\"name\":\"NOTIFICATION_ARN\",\"type\":\"PLAINTEXT\",\"value\":\"", - { - "Ref": "SecurityChangesTopic9762A9B3" - }, - "\"},{\"name\":\"NOTIFICATION_SUBJECT\",\"type\":\"PLAINTEXT\",\"value\":\"Confirm permission broadening in SafeProduction\"}]" - ] - ] - } - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SafeProductionSecurityCheck", - "Namespace": "SafeProductionSecurityCheck", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRole399C68A6", - "Arn" - ] - }, - "RunOrder": 5 - }, - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Configuration": { - "CustomData": "#{SafeProductionSecurityCheck.MESSAGE}", - "ExternalEntityLink": "#{SafeProductionSecurityCheck.LINK}" - }, - "Name": "SafeProductionManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelinePreProductionSafeProductionManualApprovalCodePipelineActionRole4F30C0D9", - "Arn" - ] - }, - "RunOrder": 6 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProduction-MyStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-PreProduction/PipelineSecurityStackPreProductionMyStackDCCBB4EA.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "MyStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProduction-MyStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "MyStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "SafeProduction-MySafeStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-SafeProduction/PipelineSecurityStackSafeProductionMySafeStackC0D87904.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SafeProduction-MySafeStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 7 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "SafeProduction-MySafeStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "SafeProduction-MySafeStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 8 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "DisableSecurityCheck-MySafeStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-DisableSecurityCheck/PipelineSecurityStackDisableSecurityCheckMySafeStack7A4F8E95.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "DisableSecurityCheck-MySafeStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 9 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "DisableSecurityCheck-MySafeStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "DisableSecurityCheck-MySafeStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 10 - } - ], - "Name": "PreProduction" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - }, - "EnvironmentVariables": "[{\"name\":\"STAGE_PATH\",\"type\":\"PLAINTEXT\",\"value\":\"PipelineSecurityStack/EnableSecurityCheck\"},{\"name\":\"STAGE_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"NoSecurityCheck\"},{\"name\":\"ACTION_NAME\",\"type\":\"PLAINTEXT\",\"value\":\"EnableSecurityCheckManualApproval\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "EnableSecurityCheckSecurityCheck", - "Namespace": "EnableSecurityCheckSecurityCheck", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRole8D10AA6D", - "Arn" - ] - }, - "RunOrder": 3 - }, - { - "ActionTypeId": { - "Category": "Approval", - "Owner": "AWS", - "Provider": "Manual", - "Version": "1" - }, - "Configuration": { - "CustomData": "#{EnableSecurityCheckSecurityCheck.MESSAGE}", - "ExternalEntityLink": "#{EnableSecurityCheckSecurityCheck.LINK}" - }, - "Name": "EnableSecurityCheckManualApproval", - "RoleArn": { - "Fn::GetAtt": [ - "TestPipelineNoSecurityCheckEnableSecurityCheckManualApprovalCodePipelineActionRole27FC4015", - "Arn" - ] - }, - "RunOrder": 4 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "NoSecurityCheck-MyStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-NoSecurityCheck/PipelineSecurityStackNoSecurityCheckMyStack3484019E.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "MyStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "NoSecurityCheck-MyStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "MyStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "EnableSecurityCheck-MyStack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineSecurityStack-EnableSecurityCheck/PipelineSecurityStackEnableSecurityCheckMyStack0B9FE272.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "EnableSecurityCheck-MyStack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 5 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "EnableSecurityCheck-MyStack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "EnableSecurityCheck-MyStack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 6 - } - ], - "Name": "NoSecurityCheck" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "TestPipelineArtifactsBucket026AF2F9" - }, - "Type": "S3" - }, - "Name": "TestPipeline", - "RestartExecutionOnUpdate": true, - "Tags": [ - { - "Key": "SECURITY_CHECK", - "Value": "ALLOW_APPROVE" - } - ] - }, - "DependsOn": [ - "TestPipelineRoleDefaultPolicyFA69BF2D", - "TestPipelineRole63C35BBD" - ] - }, - "TestPipelineSourceS3CodePipelineActionRoleEF21D3A0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineSourceS3CodePipelineActionRoleDefaultPolicy8B0350FD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineSourceS3CodePipelineActionRoleDefaultPolicy8B0350FD", - "Roles": [ - { - "Ref": "TestPipelineSourceS3CodePipelineActionRoleEF21D3A0" - } - ] - } - }, - "TestPipelineBuildSynthCodePipelineActionRoleF7BF5926": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineBuildSynthCodePipelineActionRoleDefaultPolicy65DF5C76": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineBuildSynthCdkBuildProject755D4B01", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineBuildSynthCodePipelineActionRoleDefaultPolicy65DF5C76", - "Roles": [ - { - "Ref": "TestPipelineBuildSynthCodePipelineActionRoleF7BF5926" - } - ] - } - }, - "TestPipelineBuildSynthCdkBuildProjectRole4C6E5729": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineBuildSynthCdkBuildProjectRoleDefaultPolicy73DC4481": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "TestPipelineBuildSynthCdkBuildProject755D4B01" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "TestPipelineBuildSynthCdkBuildProject755D4B01" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "TestPipelineBuildSynthCdkBuildProject755D4B01" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineBuildSynthCdkBuildProjectRoleDefaultPolicy73DC4481", - "Roles": [ - { - "Ref": "TestPipelineBuildSynthCdkBuildProjectRole4C6E5729" - } - ] - } - }, - "TestPipelineBuildSynthCdkBuildProject755D4B01": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "NPM_CONFIG_UNSAFE_PERM", - "Type": "PLAINTEXT", - "Value": "true" - } - ], - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "TestPipelineBuildSynthCdkBuildProjectRole4C6E5729", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"yarn install --frozen-lockfile\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"yarn build\",\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - }, - "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleFF6E43E2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleDefaultPolicyFC737D71": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleDefaultPolicyFC737D71", - "Roles": [ - { - "Ref": "TestPipelineUnattachedStageSingleStageSecurityCheckCodePipelineActionRoleFF6E43E2" - } - ] - } - }, - "TestPipelineUnattachedStageSingleStageManualApprovalCodePipelineActionRoleF7A614C8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRole4E54C194": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRoleDefaultPolicy10D0864F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRoleDefaultPolicy10D0864F", - "Roles": [ - { - "Ref": "TestPipelinePreProductionPreProductionSecurityCheckCodePipelineActionRole4E54C194" - } - ] - } - }, - "TestPipelinePreProductionPreProductionManualApprovalCodePipelineActionRole81B9C4F9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRole399C68A6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRoleDefaultPolicyB836B566": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRoleDefaultPolicyB836B566", - "Roles": [ - { - "Ref": "TestPipelinePreProductionSafeProductionSecurityCheckCodePipelineActionRole399C68A6" - } - ] - } - }, - "TestPipelinePreProductionSafeProductionManualApprovalCodePipelineActionRole4F30C0D9": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRole8D10AA6D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRoleDefaultPolicyE83A2CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRoleDefaultPolicyE83A2CA1", - "Roles": [ - { - "Ref": "TestPipelineNoSecurityCheckEnableSecurityCheckSecurityCheckCodePipelineActionRole8D10AA6D" - } - ] - } - }, - "TestPipelineNoSecurityCheckEnableSecurityCheckManualApprovalCodePipelineActionRole27FC4015": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole7594919D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicyE47AE90F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codepipeline:GetPipelineState", - "codepipeline:PutApprovalResult" - ], - "Condition": { - "StringEquals": { - "aws:ResourceTag/SECURITY_CHECK": "ALLOW_APPROVE" - } - }, - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicyE47AE90F", - "Roles": [ - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole7594919D" - } - ] - } - }, - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApprove1EE0AA81": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "6c6c8f170c2cc5c6e35d90fe172fbc17cae75777b84707d58332dee79f444404.zip" - }, - "Role": { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole7594919D", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 300 - }, - "DependsOn": [ - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicyE47AE90F", - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole7594919D" - ] - }, - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckRoleA54CF050": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckRoleDefaultPolicyF2137052": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApprove1EE0AA81", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApprove1EE0AA81", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "SecurityChangesTopic9762A9B3" - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckRoleDefaultPolicyF2137052", - "Roles": [ - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckRoleA54CF050" - } - ] - } - }, - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckBEE4547C": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "TestPipelinePipelineApplicationSecurityCheckCDKSecurityCheckRoleA54CF050", - "Arn" - ] - }, - "Source": { - "BuildSpec": { - "Fn::Join": [ - "", - [ - "{\n \"version\": 0.2,\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm install -g aws-cdk\",\n \"export PIPELINE_NAME=\\\"$(node -pe '`${process.env.CODEBUILD_INITIATOR}`.split(\\\"/\\\")[1]')\\\"\",\n \"payload=\\\"$(node -pe 'JSON.stringify({ \\\"PipelineName\\\": process.env.PIPELINE_NAME, \\\"StageName\\\": process.env.STAGE_NAME, \\\"ActionName\\\": process.env.ACTION_NAME })' )\\\"\",\n \"ARN=$CODEBUILD_BUILD_ARN\",\n \"REGION=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[3]')\\\"\",\n \"ACCOUNT_ID=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[4]')\\\"\",\n \"PROJECT_NAME=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[5].split(\\\"/\\\")[1]')\\\"\",\n \"PROJECT_ID=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[6]')\\\"\",\n \"export LINK=\\\"https://$REGION.console.aws.amazon.com/codesuite/codebuild/$ACCOUNT_ID/projects/$PROJECT_NAME/build/$PROJECT_NAME:$PROJECT_ID/?region=$REGION\\\"\",\n \"export PIPELINE_LINK=\\\"https://$REGION.console.aws.amazon.com/codesuite/codepipeline/pipelines/$PIPELINE_NAME/view?region=$REGION\\\"\",\n \"if cdk diff -a . --security-only --fail $STAGE_PATH/\\\\*; then aws lambda invoke --function-name ", - { - "Ref": "TestPipelinePipelineApplicationSecurityCheckCDKPipelinesAutoApprove1EE0AA81" - }, - " --invocation-type Event --payload \\\"$payload\\\" lambda.out; export MESSAGE=\\\"No security-impacting changes detected.\\\"; else [ -z \\\"${NOTIFICATION_ARN}\\\" ] || aws sns publish --topic-arn $NOTIFICATION_ARN --subject \\\"$NOTIFICATION_SUBJECT\\\" --message \\\"An upcoming change would broaden security changes in $PIPELINE_NAME.\\nReview and approve the changes in CodePipeline to proceed with the deployment.\\n\\nReview the changes in CodeBuild:\\n\\n$LINK\\n\\nApprove the changes in CodePipeline (stage $STAGE_NAME, action $ACTION_NAME):\\n\\n$PIPELINE_LINK\\\"; export MESSAGE=\\\"Deployment would make security-impacting changes. Click the link below to inspect them, then click Approve if all changes are expected.\\\"; fi\"\n ]\n }\n },\n \"env\": {\n \"exported-variables\": [\n \"LINK\",\n \"MESSAGE\"\n ]\n }\n}" - ] - ] - }, - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - }, - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole1358574A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicy5AF69BD3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codepipeline:GetPipelineState", - "codepipeline:PutApprovalResult" - ], - "Condition": { - "StringEquals": { - "aws:ResourceTag/SECURITY_CHECK": "ALLOW_APPROVE" - } - }, - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicy5AF69BD3", - "Roles": [ - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole1358574A" - } - ] - } - }, - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApprove249F82F9": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "6c6c8f170c2cc5c6e35d90fe172fbc17cae75777b84707d58332dee79f444404.zip" - }, - "Role": { - "Fn::GetAtt": [ - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole1358574A", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x", - "Timeout": 300 - }, - "DependsOn": [ - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRoleDefaultPolicy5AF69BD3", - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApproveServiceRole1358574A" - ] - }, - "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckRoleD3505CF0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckRoleDefaultPolicy6F6EA2A6": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApprove249F82F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApprove249F82F9", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "sns:Publish", - "Effect": "Allow", - "Resource": { - "Ref": "SecurityChangesTopic9762A9B3" - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucket026AF2F9", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckRoleDefaultPolicy6F6EA2A6", - "Roles": [ - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckRoleD3505CF0" - } - ] - } - }, - "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckADCE795B": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "NO_ARTIFACTS" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:1.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "UnattachedStageStageApplicationSecurityCheckCDKSecurityCheckRoleD3505CF0", - "Arn" - ] - }, - "Source": { - "BuildSpec": { - "Fn::Join": [ - "", - [ - "{\n \"version\": 0.2,\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm install -g aws-cdk\",\n \"export PIPELINE_NAME=\\\"$(node -pe '`${process.env.CODEBUILD_INITIATOR}`.split(\\\"/\\\")[1]')\\\"\",\n \"payload=\\\"$(node -pe 'JSON.stringify({ \\\"PipelineName\\\": process.env.PIPELINE_NAME, \\\"StageName\\\": process.env.STAGE_NAME, \\\"ActionName\\\": process.env.ACTION_NAME })' )\\\"\",\n \"ARN=$CODEBUILD_BUILD_ARN\",\n \"REGION=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[3]')\\\"\",\n \"ACCOUNT_ID=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[4]')\\\"\",\n \"PROJECT_NAME=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[5].split(\\\"/\\\")[1]')\\\"\",\n \"PROJECT_ID=\\\"$(node -pe '`${process.env.ARN}`.split(\\\":\\\")[6]')\\\"\",\n \"export LINK=\\\"https://$REGION.console.aws.amazon.com/codesuite/codebuild/$ACCOUNT_ID/projects/$PROJECT_NAME/build/$PROJECT_NAME:$PROJECT_ID/?region=$REGION\\\"\",\n \"export PIPELINE_LINK=\\\"https://$REGION.console.aws.amazon.com/codesuite/codepipeline/pipelines/$PIPELINE_NAME/view?region=$REGION\\\"\",\n \"if cdk diff -a . --security-only --fail $STAGE_PATH/\\\\*; then aws lambda invoke --function-name ", - { - "Ref": "UnattachedStageStageApplicationSecurityCheckCDKPipelinesAutoApprove249F82F9" - }, - " --invocation-type Event --payload \\\"$payload\\\" lambda.out; export MESSAGE=\\\"No security-impacting changes detected.\\\"; else [ -z \\\"${NOTIFICATION_ARN}\\\" ] || aws sns publish --topic-arn $NOTIFICATION_ARN --subject \\\"$NOTIFICATION_SUBJECT\\\" --message \\\"An upcoming change would broaden security changes in $PIPELINE_NAME.\\nReview and approve the changes in CodePipeline to proceed with the deployment.\\n\\nReview the changes in CodeBuild:\\n\\n$LINK\\n\\nApprove the changes in CodePipeline (stage $STAGE_NAME, action $ACTION_NAME):\\n\\n$PIPELINE_LINK\\\"; export MESSAGE=\\\"Deployment would make security-impacting changes. Click the link below to inspect them, then click Approve if all changes are expected.\\\"; fi\"\n ]\n }\n },\n \"env\": {\n \"exported-variables\": [\n \"LINK\",\n \"MESSAGE\"\n ]\n }\n}" - ] - ] - }, - "Type": "NO_SOURCE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "TestPipelineArtifactsBucketEncryptionKey13258842", - "Arn" - ] - } - } - }, - "SecurityChangesTopic9762A9B3": { - "Type": "AWS::SNS::Topic" - }, - "SecurityChangesTopictestemailcom7C32D452": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "email", - "TopicArn": { - "Ref": "SecurityChangesTopic9762A9B3" - }, - "Endpoint": "test@email.com" - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets-single-upload.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets-single-upload.expected.json deleted file mode 100644 index 57ebcfe3c9483..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets-single-upload.expected.json +++ /dev/null @@ -1,2015 +0,0 @@ -{ - "Resources": { - "SourceBucketDDD2130A": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SourceBucketPolicy703DFBF9": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "SourceBucketDDD2130A" - } - }, - "DependsOn": [ - "SourceBucketPolicy703DFBF9" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "SourceBucketDDD2130A" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "PipelineArtifactsBucketEncryptionKeyF5BF0670": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias94A07392": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelinestackpipelinee95eedaa", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "S3ObjectKey": "key" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"da8c1ee6d645a5802d25355fec94a3f22a961102b74ac3846898d6b14e3a2c30\"}]" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "CloudAsm" - }, - { - "Name": "IntegTests" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SelfMutate", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "UpdatePipeline" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineAssetsFileAsset5D8C5DA6" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "FileAsset", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Assets" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "UseSource", - "RoleArn": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - "RunOrder": 100 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineStack-PreProd/PipelineStackPreProdStack65A0AD1F.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "Stack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Stack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - } - ], - "Name": "PreProd" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourceS3CodePipelineActionRole83895A58": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole83895A58" - } - ] - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "NPM_CONFIG_UNSAFE_PERM", - "Type": "PLAINTEXT", - "Value": "true" - } - ], - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"npm ci\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"secondary-artifacts\": {\n \"CloudAsm\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n },\n \"IntegTests\": {\n \"base-directory\": \"test\",\n \"files\": \"**/*\"\n }\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Name": "MyServicePipeline-synth" - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationDAA41400", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF" - } - ] - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProject2E711EB4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA" - } - ] - } - }, - "PipelinePreProdUseSourceProjectRole69B20A71": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceProjectRole69B20A71" - } - ] - } - }, - "PipelinePreProdUseSourceProject2E711EB4": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProjectRole69B20A71", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"set -eu\",\n \"cat README.md\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineUpdatePipelineSelfMutationRole57E559E8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "image-publishing", - "file-publishing", - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:*:iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/*" - ] - ] - } - }, - { - "Action": [ - "cloudformation:DescribeStacks", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationDAA41400": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationRole57E559E8", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineAssetsFileRole59943A77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - }, - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineAssetsFileRoleDefaultPolicy14DB8755": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileRoleDefaultPolicy14DB8755", - "Roles": [ - { - "Ref": "PipelineAssetsFileRole59943A77" - } - ] - } - }, - "PipelineAssetsFileAsset5D8C5DA6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "Source": { - "BuildSpec": "buildspec-assets-PipelineStack-Pipeline-Assets-FileAsset.yaml", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json deleted file mode 100644 index 32190a9c57562..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json +++ /dev/null @@ -1,2076 +0,0 @@ -{ - "Resources": { - "SourceBucketDDD2130A": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SourceBucketPolicy703DFBF9": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "SourceBucketDDD2130A" - } - }, - "DependsOn": [ - "SourceBucketPolicy703DFBF9" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "SourceBucketDDD2130A" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "PipelineArtifactsBucketEncryptionKeyF5BF0670": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias94A07392": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelinestackpipelinee95eedaa", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "S3ObjectKey": "key" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"da8c1ee6d645a5802d25355fec94a3f22a961102b74ac3846898d6b14e3a2c30\"}]" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "CloudAsm" - }, - { - "Name": "IntegTests" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SelfMutate", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "UpdatePipeline" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineAssetsFileAsset185A67CB4" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "FileAsset1", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineAssetsFileAsset24D2D639B" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "FileAsset2", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Assets" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "UseSource", - "RoleArn": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - "RunOrder": 100 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineStack-PreProd/PipelineStackPreProdStack65A0AD1F.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "Stack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Stack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - } - ], - "Name": "PreProd" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourceS3CodePipelineActionRole83895A58": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole83895A58" - } - ] - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "NPM_CONFIG_UNSAFE_PERM", - "Type": "PLAINTEXT", - "Value": "true" - } - ], - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"npm ci\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"secondary-artifacts\": {\n \"CloudAsm\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n },\n \"IntegTests\": {\n \"base-directory\": \"test\",\n \"files\": \"**/*\"\n }\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Name": "MyServicePipeline-synth" - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationDAA41400", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF" - } - ] - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProject2E711EB4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA" - } - ] - } - }, - "PipelinePreProdUseSourceProjectRole69B20A71": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceProjectRole69B20A71" - } - ] - } - }, - "PipelinePreProdUseSourceProject2E711EB4": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProjectRole69B20A71", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"set -eu\",\n \"cat README.md\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineUpdatePipelineSelfMutationRole57E559E8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "image-publishing", - "file-publishing", - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:*:iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/*" - ] - ] - } - }, - { - "Action": [ - "cloudformation:DescribeStacks", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationDAA41400": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationRole57E559E8", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineAssetsFileRole59943A77": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - }, - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineAssetsFileRoleDefaultPolicy14DB8755": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/*" - ] - ] - } - }, - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineAssetsFileRoleDefaultPolicy14DB8755", - "Roles": [ - { - "Ref": "PipelineAssetsFileRole59943A77" - } - ] - } - }, - "PipelineAssetsFileAsset185A67CB4": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-PreProd/PipelineStackPreProdStack65A0AD1F.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineAssetsFileAsset24D2D639B": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineAssetsFileRole59943A77", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-PreProd/PipelineStackPreProdStack65A0AD1F.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-variables.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-variables.expected.json deleted file mode 100644 index 8ac5312c4acbe..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-variables.expected.json +++ /dev/null @@ -1,1358 +0,0 @@ -{ - "Resources": { - "SourceBucketDDD2130A": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SourceBucketPolicy703DFBF9": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "SourceBucketDDD2130A" - } - }, - "DependsOn": [ - "SourceBucketPolicy703DFBF9" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "SourceBucketDDD2130A" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineMyWaveConsumeCodePipelineActionRole7FAA4EFA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineMyWaveProduceCodePipelineActionRoleE0DCE9D3", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "S3ObjectKey": "key" - }, - "Name": { - "Ref": "SourceBucketDDD2130A" - }, - "OutputArtifacts": [ - { - "Name": "c8afb86a650460a8cc607cf72a0827e7c93d0d6d5c_Source" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - }, - "InputArtifacts": [ - { - "Name": "c8afb86a650460a8cc607cf72a0827e7c93d0d6d5c_Source" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "Synth_Output" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineMyWaveProduce884410D6" - } - }, - "InputArtifacts": [ - { - "Name": "c8afb86a650460a8cc607cf72a0827e7c93d0d6d5c_Source" - } - ], - "Name": "Produce", - "Namespace": "MyWave@Produce", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineMyWaveProduceCodePipelineActionRoleE0DCE9D3", - "Arn" - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineMyWaveConsumeC5D5CCD7" - }, - "EnvironmentVariables": "[{\"name\":\"THE_VAR\",\"type\":\"PLAINTEXT\",\"value\":\"#{MyWave@Produce.MY_VAR}\"}]" - }, - "InputArtifacts": [ - { - "Name": "c8afb86a650460a8cc607cf72a0827e7c93d0d6d5c_Source" - } - ], - "Name": "Consume", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineMyWaveConsumeCodePipelineActionRole7FAA4EFA", - "Arn" - ] - }, - "RunOrder": 2 - } - ], - "Name": "MyWave" - } - ], - "ArtifactStore": { - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourceS3CodePipelineActionRole83895A58": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole83895A58" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"mkdir cdk.out\",\n \"touch cdk.out/dummy\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step VariablePipelineStack/Pipeline/Build/Synth", - "EncryptionKey": "alias/aws/s3" - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineMyWaveProduceRole24E3565D": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineMyWaveProduceRoleDefaultPolicy209239D4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineMyWaveProduce884410D6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineMyWaveProduce884410D6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineMyWaveProduce884410D6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineMyWaveProduceRoleDefaultPolicy209239D4", - "Roles": [ - { - "Ref": "PipelineMyWaveProduceRole24E3565D" - } - ] - } - }, - "PipelineMyWaveProduce884410D6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineMyWaveProduceRole24E3565D", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"env\": {\n \"exported-variables\": [\n \"MY_VAR\"\n ]\n },\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"export MY_VAR=hello\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step VariablePipelineStack/Pipeline/MyWave/Produce", - "EncryptionKey": "alias/aws/s3" - } - }, - "PipelineMyWaveProduceCodePipelineActionRoleE0DCE9D3": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineMyWaveProduceCodePipelineActionRoleDefaultPolicy34DCB79A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineMyWaveProduce884410D6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineMyWaveProduceCodePipelineActionRoleDefaultPolicy34DCB79A", - "Roles": [ - { - "Ref": "PipelineMyWaveProduceCodePipelineActionRoleE0DCE9D3" - } - ] - } - }, - "PipelineMyWaveConsumeRole2A96FF33": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineMyWaveConsumeRoleDefaultPolicyC80F0194": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineMyWaveConsumeC5D5CCD7" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineMyWaveConsumeC5D5CCD7" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineMyWaveConsumeC5D5CCD7" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineMyWaveConsumeRoleDefaultPolicyC80F0194", - "Roles": [ - { - "Ref": "PipelineMyWaveConsumeRole2A96FF33" - } - ] - } - }, - "PipelineMyWaveConsumeC5D5CCD7": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineMyWaveConsumeRole2A96FF33", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"The variable was: $THE_VAR\\\"\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "Description": "Pipeline step VariablePipelineStack/Pipeline/MyWave/Consume", - "EncryptionKey": "alias/aws/s3" - } - }, - "PipelineMyWaveConsumeCodePipelineActionRole7FAA4EFA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineMyWaveConsumeCodePipelineActionRoleDefaultPolicy3666898A": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineMyWaveConsumeC5D5CCD7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineMyWaveConsumeCodePipelineActionRoleDefaultPolicy3666898A", - "Roles": [ - { - "Ref": "PipelineMyWaveConsumeCodePipelineActionRole7FAA4EFA" - } - ] - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json deleted file mode 100644 index 55c602dc91d09..0000000000000 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json +++ /dev/null @@ -1,1777 +0,0 @@ -{ - "Resources": { - "SourceBucketDDD2130A": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "SourceBucketPolicy703DFBF9": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "SourceBucketDDD2130A" - } - }, - "DependsOn": [ - "SourceBucketPolicy703DFBF9" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "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" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "SourceBucketDDD2130A" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "PipelineArtifactsBucketEncryptionKeyF5BF0670": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketEncryptionKeyAlias94A07392": { - "Type": "AWS::KMS::Alias", - "Properties": { - "AliasName": "alias/codepipeline-pipelinestackpipelinee95eedaa", - "TargetKeyId": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "PipelineArtifactsBucketAEA9A052": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "KMSMasterKeyID": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "SSEAlgorithm": "aws:kms" - } - } - ] - }, - "PublicAccessBlockConfiguration": { - "BlockPublicAcls": true, - "BlockPublicPolicy": true, - "IgnorePublicAcls": true, - "RestrictPublicBuckets": true - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "PipelineArtifactsBucketPolicyF53CCC52": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleB27FAA37": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codepipeline.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineRoleDefaultPolicy7BDC1ABB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", - "Roles": [ - { - "Ref": "PipelineRoleB27FAA37" - } - ] - } - }, - "Pipeline9850B417": { - "Type": "AWS::CodePipeline::Pipeline", - "Properties": { - "RoleArn": { - "Fn::GetAtt": [ - "PipelineRoleB27FAA37", - "Arn" - ] - }, - "Stages": [ - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Source", - "Owner": "AWS", - "Provider": "S3", - "Version": "1" - }, - "Configuration": { - "S3Bucket": { - "Ref": "SourceBucketDDD2130A" - }, - "S3ObjectKey": "key" - }, - "Name": "S3", - "OutputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineSourceS3CodePipelineActionRole83895A58", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Source" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"da8c1ee6d645a5802d25355fec94a3f22a961102b74ac3846898d6b14e3a2c30\"}]" - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "Synth", - "OutputArtifacts": [ - { - "Name": "CloudAsm" - }, - { - "Name": "IntegTests" - } - ], - "RoleArn": { - "Fn::GetAtt": [ - "PipelineBuildSynthCodePipelineActionRole4E7A6C97", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "Build" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "EnvironmentVariables": "[{\"name\":\"CDK_CLI_VERSION\",\"type\":\"PLAINTEXT\",\"value\":\"1\"}]" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "SelfMutate", - "RoleArn": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF", - "Arn" - ] - }, - "RunOrder": 1 - } - ], - "Name": "UpdatePipeline" - }, - { - "Actions": [ - { - "ActionTypeId": { - "Category": "Build", - "Owner": "AWS", - "Provider": "CodeBuild", - "Version": "1" - }, - "Configuration": { - "ProjectName": { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - }, - "InputArtifacts": [ - { - "Name": "Artifact_Source_S3" - } - ], - "Name": "UseSource", - "RoleArn": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA", - "Arn" - ] - }, - "RunOrder": 100 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-cfn-exec-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "ActionMode": "CHANGE_SET_REPLACE", - "ChangeSetName": "PipelineChange", - "TemplatePath": "CloudAsm::assembly-PipelineStack-PreProd/PipelineStackPreProdStack65A0AD1F.template.json" - }, - "InputArtifacts": [ - { - "Name": "CloudAsm" - } - ], - "Name": "Stack.Prepare", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 1 - }, - { - "ActionTypeId": { - "Category": "Deploy", - "Owner": "AWS", - "Provider": "CloudFormation", - "Version": "1" - }, - "Configuration": { - "StackName": "PreProd-Stack", - "ActionMode": "CHANGE_SET_EXECUTE", - "ChangeSetName": "PipelineChange" - }, - "Name": "Stack.Deploy", - "RoleArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/cdk-hnb659fds-deploy-role-", - { - "Ref": "AWS::AccountId" - }, - "-", - { - "Ref": "AWS::Region" - } - ] - ] - }, - "RunOrder": 2 - } - ], - "Name": "PreProd" - } - ], - "ArtifactStore": { - "EncryptionKey": { - "Id": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Type": "KMS" - }, - "Location": { - "Ref": "PipelineArtifactsBucketAEA9A052" - }, - "Type": "S3" - }, - "RestartExecutionOnUpdate": true - }, - "DependsOn": [ - "PipelineRoleDefaultPolicy7BDC1ABB", - "PipelineRoleB27FAA37" - ] - }, - "PipelineSourceS3CodePipelineActionRole83895A58": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SourceBucketDDD2130A", - "Arn" - ] - }, - "/key" - ] - ] - } - ] - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineSourceS3CodePipelineActionRoleDefaultPolicyB176A07F", - "Roles": [ - { - "Ref": "PipelineSourceS3CodePipelineActionRole83895A58" - } - ] - } - }, - "PipelineBuildSynthCodePipelineActionRole4E7A6C97": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProject6BEFA8E6", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290", - "Roles": [ - { - "Ref": "PipelineBuildSynthCodePipelineActionRole4E7A6C97" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:Abort*", - "s3:DeleteObject*", - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", - "Roles": [ - { - "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" - } - ] - } - }, - "PipelineBuildSynthCdkBuildProject6BEFA8E6": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "EnvironmentVariables": [ - { - "Name": "NPM_CONFIG_UNSAFE_PERM", - "Type": "PLAINTEXT", - "Value": "true" - } - ], - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineBuildSynthCdkBuildProjectRole231EEA2A", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"npm ci\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"secondary-artifacts\": {\n \"CloudAsm\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n },\n \"IntegTests\": {\n \"base-directory\": \"test\",\n \"files\": \"**/*\"\n }\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - }, - "Name": "MyServicePipeline-synth" - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationDAA41400", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicyE626265B", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutateCodePipelineActionRoleD6D4E5CF" - } - ] - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "codebuild:BatchGetBuilds", - "codebuild:StartBuild", - "codebuild:StopBuild" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProject2E711EB4", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceCodePipelineActionRoleDefaultPolicy9BE325AD", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceCodePipelineActionRoleA2043BDA" - } - ] - } - }, - "PipelinePreProdUseSourceProjectRole69B20A71": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelinePreProdUseSourceProject2E711EB4" - }, - "-*" - ] - ] - } - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelinePreProdUseSourceProjectRoleDefaultPolicy50F68DF3", - "Roles": [ - { - "Ref": "PipelinePreProdUseSourceProjectRole69B20A71" - } - ] - } - }, - "PipelinePreProdUseSourceProject2E711EB4": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelinePreProdUseSourceProjectRole69B20A71", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"set -eu\",\n \"cat README.md\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - }, - "PipelineUpdatePipelineSelfMutationRole57E559E8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "codebuild.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - ":*" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":logs:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":log-group:/aws/codebuild/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - } - ] - ] - } - ] - }, - { - "Action": [ - "codebuild:BatchPutCodeCoverages", - "codebuild:BatchPutTestCases", - "codebuild:CreateReport", - "codebuild:CreateReportGroup", - "codebuild:UpdateReport" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":codebuild:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":report-group/", - { - "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" - }, - "-*" - ] - ] - } - }, - { - "Action": "sts:AssumeRole", - "Condition": { - "ForAnyValue:StringEquals": { - "iam:ResourceTag/aws-cdk:bootstrap-role": [ - "image-publishing", - "file-publishing", - "deploy" - ] - } - }, - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:*:iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/*" - ] - ] - } - }, - { - "Action": [ - "cloudformation:DescribeStacks", - "s3:ListBucket" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "s3:GetBucket*", - "s3:GetObject*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "PipelineArtifactsBucketAEA9A052", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "kms:Decrypt", - "kms:DescribeKey", - "kms:Encrypt", - "kms:GenerateDataKey*", - "kms:ReEncrypt*" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", - "Roles": [ - { - "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" - } - ] - } - }, - "PipelineUpdatePipelineSelfMutationDAA41400": { - "Type": "AWS::CodeBuild::Project", - "Properties": { - "Artifacts": { - "Type": "CODEPIPELINE" - }, - "Environment": { - "ComputeType": "BUILD_GENERAL1_SMALL", - "Image": "aws/codebuild/standard:5.0", - "ImagePullCredentialsType": "CODEBUILD", - "PrivilegedMode": false, - "Type": "LINUX_CONTAINER" - }, - "ServiceRole": { - "Fn::GetAtt": [ - "PipelineUpdatePipelineSelfMutationRole57E559E8", - "Arn" - ] - }, - "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", - "Type": "CODEPIPELINE" - }, - "Cache": { - "Type": "NO_CACHE" - }, - "EncryptionKey": { - "Fn::GetAtt": [ - "PipelineArtifactsBucketEncryptionKeyF5BF0670", - "Arn" - ] - } - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/integ.triggers.expected.json b/packages/@aws-cdk/triggers/test/integ.triggers.expected.json deleted file mode 100644 index 2cc1fbdf44f0f..0000000000000 --- a/packages/@aws-cdk/triggers/test/integ.triggers.expected.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "Resources": { - "Topic198E71B3E": { - "Type": "AWS::SNS::Topic", - "DependsOn": [ - "MyFunctionTriggerDB129D7B" - ] - }, - "Topic269377B75": { - "Type": "AWS::SNS::Topic" - }, - "MyFunctionServiceRole3C357FF2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "MyFunction3BAA72D1": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "exports.handler = function() { console.log(\"hi\"); };" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunctionServiceRole3C357FF2", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "nodejs12.x" - }, - "DependsOn": [ - "MyFunctionServiceRole3C357FF2" - ] - }, - "MyFunctionTriggerDB129D7B": { - "Type": "Custom::Trigger", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91", - "Arn" - ] - }, - "HandlerArn": { - "Ref": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4" - } - }, - "DependsOn": [ - "Topic269377B75" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4": { - "Type": "AWS::Lambda::Version", - "Properties": { - "FunctionName": { - "Ref": "MyFunction3BAA72D1" - } - } - }, - "AWSCDKTriggerCustomResourceProviderCustomResourceProviderRoleE18FAF0A": { - "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": [ - "lambda:InvokeFunction" - ], - "Resource": [ - { - "Ref": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4" - } - ] - } - ] - } - } - ] - } - }, - "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aS3BucketD06FCCA6" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aS3VersionKey096A7311" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aS3VersionKey096A7311" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKTriggerCustomResourceProviderCustomResourceProviderRoleE18FAF0A", - "Arn" - ] - }, - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "AWSCDKTriggerCustomResourceProviderCustomResourceProviderRoleE18FAF0A" - ] - } - }, - "Parameters": { - "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aS3BucketD06FCCA6": { - "Type": "String", - "Description": "S3 bucket for asset \"2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021a\"" - }, - "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aS3VersionKey096A7311": { - "Type": "String", - "Description": "S3 key for asset version \"2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021a\"" - }, - "AssetParameters2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021aArtifactHash5F581B6B": { - "Type": "String", - "Description": "Artifact hash for asset \"2c42061ddceb234b56276636e22d41e1651d112e8086384492e236481b34021a\"" - } - } -} \ No newline at end of file