Skip to content

Commit

Permalink
add permission for compute-optimizer (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: Yingxin Li <[email protected]>
  • Loading branch information
yingxinl authored Dec 5, 2024
1 parent fb67991 commit 436a15a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,13 @@ The audit policy is comprised of the following permissions:
| | cognito-idp:GetCSVHeader | |
| | cognito-idp:GetUserPoolMfaConfig | |
| | cognito-idp:GetUICustomization | |
| COMPUTEOPTIMIZER | compute-optimizer:DescribeRecommendationExportJobs | * |
| | compute-optimizer:GetAutoScalingGroupRecommendations | |
| | compute-optimizer:GetEffectiveRecommendationPreferences | |
| | compute-optimizer:GetEBSVolumeRecommendations | |
| | compute-optimizer:GetEC2InstanceRecommendations | |
| | compute-optimizer:GetEnrollmentStatus | |
| | compute-optimizer:GetEnrollmentStatusesForOrganization | |
| | compute-optimizer:GetLambdaFunctionRecommendations | |
| | compute-optimizer:GetRecommendationPreferences | |
| | compute-optimizer:GetRecommendationSummaries | |
17 changes: 17 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,23 @@ data "aws_iam_policy_document" "lacework_audit_policy" {
]
resources = ["*"]
}

statement {
sid = "COMPUTEOPTIMIZER"
actions = [
"compute-optimizer:DescribeRecommendationExportJobs",
"compute-optimizer:GetAutoScalingGroupRecommendations",
"compute-optimizer:GetEffectiveRecommendationPreferences",
"compute-optimizer:GetEBSVolumeRecommendations",
"compute-optimizer:GetEC2InstanceRecommendations",
"compute-optimizer:GetEnrollmentStatus",
"compute-optimizer:GetEnrollmentStatusesForOrganization",
"compute-optimizer:GetLambdaFunctionRecommendations",
"compute-optimizer:GetRecommendationPreferences",
"compute-optimizer:GetRecommendationSummaries"
]
resources = ["*"]
}
}

resource "aws_iam_policy" "lacework_audit_policy" {
Expand Down

0 comments on commit 436a15a

Please sign in to comment.