Skip to content

Commit

Permalink
Remove indent from readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Jun 13, 2024
1 parent a21584f commit a376d43
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
70 changes: 35 additions & 35 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,47 +217,47 @@ If you need to use Role-Based Access Control (RBAC), you will need to configure
1. **Provider Role**
This role provides the necessary permissions for `aws-cost-cli`. It requires the above permissions policy and the following trust policy.
**Trust Policy**
Replace `arn:aws:iam::YOUR_ACCOUNT_ID:role/YourConsumerRole` with the ARN of the consumer role.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::YOUR_ACCOUNT_ID:role/YourConsumerRole"
},
"Action": "sts:AssumeRole"
}
]
}
```
This role provides the necessary permissions for `aws-cost-cli`. It requires the above permissions policy and the following trust policy.
**Trust Policy**
Replace `arn:aws:iam::YOUR_ACCOUNT_ID:role/YourConsumerRole` with the ARN of the consumer role.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::YOUR_ACCOUNT_ID:role/YourConsumerRole"
},
"Action": "sts:AssumeRole"
}
]
}
```
2. **Consumer Role**
This role is used by the user or service (such as GitHub Actions) that needs to assume the provider role to access cost information. It requires the following permissions policy.
This role is used by the user or service (such as GitHub Actions) that needs to assume the provider role to access cost information. It requires the following permissions policy.
**Permissions Policy**
**Permissions Policy**
Replace `arn:aws:iam::YOUR_ACCOUNT_ID:role/YourProviderRole` with the ARN of the provider role.
Replace `arn:aws:iam::YOUR_ACCOUNT_ID:role/YourProviderRole` with the ARN of the provider role.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::YOUR_ACCOUNT_ID:role/YourProviderRole"
}
]
}
```
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::YOUR_ACCOUNT_ID:role/YourProviderRole"
}
]
}
```
Please also note that this tool uses AWS Cost Explorer under the hood which [costs $0.01 per request](https://aws.amazon.com/aws-cost-management/aws-cost-explorer/pricing/).
Expand Down
4 changes: 2 additions & 2 deletions src/printers/slack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ AWSMock.mock('CostExplorer', 'getCostAndUsage', (params, callback) => {
});

describe('formatServiceBreakdown', () => {
it('should return service breakdown of "yesterday" by default', async () => {
it('should return service breakdown of "yesterday"', async () => {
const totalCosts = await getTotalCosts(awsConfig);
const result = formatServiceBreakdown(totalCosts);
const result = formatServiceBreakdown(totalCosts, 'yesterday');

// cost value is defined in generateMockedCostByService
expect(result).toEqual('> service2: `$110.00`\n' + '> service1: `$1.10`');
Expand Down

0 comments on commit a376d43

Please sign in to comment.