Skip to content

Commit

Permalink
update integ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
5d committed Dec 13, 2024
1 parent 06e8851 commit 4331a07
Show file tree
Hide file tree
Showing 37 changed files with 20,826 additions and 54,589 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ export class DatabaseQuery<HandlerProps> extends Construct implements iam.IGrant
private getProviderRole(handler: lambda.SingletonFunction): iam.IRole {
const id = handler.constructName + 'ProviderRole';
const existing = cdk.Stack.of(this).node.tryFindChild(id);

return existing != null
? existing as iam.Role
: new iam.Role(this, id, {
: new iam.Role(cdk.Stack.of(this), id, {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaBasicExecutionRole')],
});
Expand Down
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-redshift-alpha/lib/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ abstract class UserBase extends Construct implements IUser {
...this.databaseProps,
user: this,
});

this.privileges.node.addDependency(table);
}

this.privileges.addPrivileges(table, ...actions);
Expand Down
Binary file not shown.

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 @@ -604,83 +604,6 @@
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRole71E75E1A": {
"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"
},
"TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicyBBFA0AEC": {
"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": "TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicyBBFA0AEC",
"Roles": [
{
"Ref": "TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRole71E75E1A"
}
]
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"TableProviderframeworkonEvent97F3951A": {
"Type": "AWS::Lambda::Function",
"Properties": {
Expand All @@ -704,7 +627,7 @@
"Handler": "framework.onEvent",
"Role": {
"Fn::GetAtt": [
"TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRole71E75E1A",
"QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleB78E4FFA",
"Arn"
]
},
Expand All @@ -720,8 +643,8 @@
"Timeout": 900
},
"DependsOn": [
"TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicyBBFA0AEC",
"TableQueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRole71E75E1A"
"QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicy8C45E853",
"QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleB78E4FFA"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -865,6 +788,83 @@
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleB78E4FFA": {
"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"
},
"QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicy8C45E853": {
"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": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleDefaultPolicy8C45E853",
"Roles": [
{
"Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fProviderRoleB78E4FFA"
}
]
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Mappings": {
Expand Down

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

Loading

0 comments on commit 4331a07

Please sign in to comment.