Describe the bug
The generated IAM policy does not take into account if the service has a - in it's name for the IAM Policy Action
Expected Behavior
The generated IAM policy has the correct permissions
Current Behavior
The generated IAM policy does not has the correct permissions
Reproduction Steps
Given the following integ test
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as cdk from 'aws-cdk-lib';
const app = new cdk.App();
const stack = new cdk.Stack();
const test = new integ.IntegTest(app, 'integ', {
testCases: [stack],
});
const describeUsageLimit = test.assertions.awsApiCall('RedshiftServerless', 'getUsageLimit', {
UsageLimitId: 'foo',
});
describeUsageLimit.expect(
integ.ExpectedResult.objectLike({
amount: 100,
breachAction: 'deactivate',
period: 'monthly',
}),
);
app.synth();
An IAM Role with the following policy is generated with an incorrect action
"Policies": [
{
"PolicyName": "Inline",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"redshiftserverless:GetUsageLimit"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
The action needs to be redshift-serverless:GetUsageLimit instead of redshiftserverless:GetUsageLimit
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.89.0-alpha.0
Framework Version
No response
Node.js Version
v20.5.0
OS
Osx Ventura
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
The generated IAM policy does not take into account if the service has a
-in it's name for the IAM Policy ActionExpected Behavior
The generated IAM policy has the correct permissions
Current Behavior
The generated IAM policy does not has the correct permissions
Reproduction Steps
Given the following integ test
An IAM Role with the following policy is generated with an incorrect action
The action needs to be
redshift-serverless:GetUsageLimitinstead ofredshiftserverless:GetUsageLimitPossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.89.0-alpha.0
Framework Version
No response
Node.js Version
v20.5.0
OS
Osx Ventura
Language
Typescript
Language Version
No response
Other information
No response