Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure SQS queues are optional #69

Merged
merged 5 commits into from
Apr 25, 2022
Merged

Ensure SQS queues are optional #69

merged 5 commits into from
Apr 25, 2022

Conversation

morsecodist
Copy link
Contributor

Fixes: #64 and #66

Effect : "Allow",
Action : [
"sqs:SendMessage",
],
Resource : var.sfn_notification_queue_arns
}
} : {},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing balks at this empty {} rule?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good point...

}

data "aws_iam_policy_document" "sfn_notifications_topic_policy_document" {
count = length(var.sqs_queues) > 0 ? 1 : 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making a local var like sqs_queues_enabled = length(var.sqs_queues) > 0 instead of checking length(var.sqs_queue) all over the place will make this a bit easier to refactor.

@morsecodist morsecodist merged commit 01cc882 into main Apr 25, 2022
@morsecodist morsecodist deleted the tmorse-optional-sqs branch April 25, 2022 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while running terraform apply in SWIPE root
2 participants