Skip to content

Commit

Permalink
Drop sqs:GetQueueAttributes from cloudformation policy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Nov 29, 2023
1 parent 7c3a7aa commit 127d7d1
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 11 deletions.
8 changes: 3 additions & 5 deletions pkg/fake/sqsapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ const (
// SQSBehavior must be reset between tests otherwise tests will
// pollute each other.
type SQSBehavior struct {
GetQueueURLBehavior MockedFunction[sqs.GetQueueUrlInput, sqs.GetQueueUrlOutput]
GetQueueAttributesBehavior MockedFunction[sqs.GetQueueAttributesInput, sqs.GetQueueAttributesOutput]
ReceiveMessageBehavior MockedFunction[sqs.ReceiveMessageInput, sqs.ReceiveMessageOutput]
DeleteMessageBehavior MockedFunction[sqs.DeleteMessageInput, sqs.DeleteMessageOutput]
GetQueueURLBehavior MockedFunction[sqs.GetQueueUrlInput, sqs.GetQueueUrlOutput]
ReceiveMessageBehavior MockedFunction[sqs.ReceiveMessageInput, sqs.ReceiveMessageOutput]
DeleteMessageBehavior MockedFunction[sqs.DeleteMessageInput, sqs.DeleteMessageOutput]
}

type SQSAPI struct {
Expand All @@ -45,7 +44,6 @@ type SQSAPI struct {
// each other.
func (s *SQSAPI) Reset() {
s.GetQueueURLBehavior.Reset()
s.GetQueueAttributesBehavior.Reset()
s.ReceiveMessageBehavior.Reset()
s.DeleteMessageBehavior.Reset()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ Resources:
"Resource": "${KarpenterInterruptionQueue.Arn}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ Resources:
"Resource": "${KarpenterInterruptionQueue.Arn}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ Resources:
"Resource": "${KarpenterInterruptionQueue.Arn}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}",
"Action": [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ReceiveMessage"
]
Expand Down

0 comments on commit 127d7d1

Please sign in to comment.