Skip to content

Commit

Permalink
Fixed Integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stm29 committed Oct 20, 2024
1 parent f07668a commit a832873
Show file tree
Hide file tree
Showing 8 changed files with 623 additions and 13 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"PolicyNames.2",
"PolicyNames.3"
],
"salt": "1729444223897"
"salt": "1729447009370"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -73,6 +73,15 @@
"Resource": [
"*"
]
},
{
"Action": [
"iam:ListAttachedRolePolicies"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
Expand All @@ -96,7 +105,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.zip"
"S3Key": "e77649078c9dea5bbb707b7fe68014cfa5d919a38d31b467f6a205b51ea63a83.zip"
},
"Timeout": 120,
"Handler": "index.handler",
Expand All @@ -107,6 +116,43 @@
]
}
}
},
"AwsApiCallIAMlistAttachedRolePolicies7b6e565f3b40bc5c7faa65c17a68f5be": {
"Type": "Custom::DeployAssert@SdkCallIAMlistAttachedRolePolicies",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "IAM",
"api": "listAttachedRolePolicies",
"expected": "{\"$StringLike\":\"^MyCustomManagedPolicy[0-9]$\"}",
"actualPath": "AttachedPolicies.1.PolicyName",
"parameters": {
"RoleName": {
"Fn::Join": [
"",
[
"\"",
{
"Fn::ImportValue": "integ-iam-imported-role-3:ExportsOutputRefroleToBeImportedCAC1213CDE38D2C6"
},
"\""
]
]
}
},
"flattenResponse": "true",
"outputPaths": [
"AttachedPolicies.0.PolicyName",
"AttachedPolicies.1.PolicyName"
],
"salt": "1729447009371"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
Expand All @@ -117,6 +163,14 @@
"assertion"
]
}
},
"AssertionResultsAwsApiCallIAMlistAttachedRolePolicies7b6e565f3b40bc5c7faa65c17a68f5be": {
"Value": {
"Fn::GetAtt": [
"AwsApiCallIAMlistAttachedRolePolicies7b6e565f3b40bc5c7faa65c17a68f5be",
"assertion"
]
}
}
},
"Mappings": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"Resources": {
"roleToBeImportedCAC1213C": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "sqs.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"RoleName": "mutableRoleToBeImported"
}
},
"ManagedPolicy7BAB786E": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"Description": "",
"ManagedPolicyName": "MyCustomManagedPolicy2",
"Path": "/",
"PolicyDocument": {
"Statement": [
{
"Action": "s3:ListBucket",
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-bucket"
}
],
"Version": "2012-10-17"
},
"Roles": [
{
"Fn::Select": [
1,
{
"Fn::Split": [
"/",
{
"Fn::Select": [
5,
{
"Fn::Split": [
":",
{
"Fn::GetAtt": [
"roleToBeImportedCAC1213C",
"Arn"
]
}
]
}
]
}
]
}
]
}
]
}
},
"ManagedPolicy135BDEF37": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"Description": "",
"ManagedPolicyName": "MyCustomManagedPolicy1",
"Path": "/",
"PolicyDocument": {
"Statement": [
{
"Action": "s3:ListBucket",
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-bucket"
}
],
"Version": "2012-10-17"
},
"Roles": [
{
"Fn::Select": [
1,
{
"Fn::Split": [
"/",
{
"Fn::Select": [
5,
{
"Fn::Split": [
":",
{
"Fn::GetAtt": [
"roleToBeImportedCAC1213C",
"Arn"
]
}
]
}
]
}
]
}
]
}
]
}
}
},
"Outputs": {
"ExportsOutputRefroleToBeImportedCAC1213CDE38D2C6": {
"Value": {
"Ref": "roleToBeImportedCAC1213C"
},
"Export": {
"Name": "integ-iam-imported-role-3:ExportsOutputRefroleToBeImportedCAC1213CDE38D2C6"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"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."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a832873

Please sign in to comment.