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

Add a missing conditional #11

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add a missing conditional
SNS topic should only be created if both conditions are met
  • Loading branch information
Abdul Wahid committed Apr 28, 2021
commit cbfdf35bd8c0c7ca75a4f8e2288b7c7bf031cda7
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ resource "aws_backup_selection" "main" {
# SNS Backup Notifications
#######
resource "aws_sns_topic" "main" {
count = var.create_sns_topic ? 1 : 0
count = var.create_sns_topic && var.enable_sns_notifications ? 1 : 0

name = var.vault_name != null ? "${aws_backup_vault.main[0].name}-events" : "backup-vault-events"
kms_master_key_id = var.vault_sns_kms_key_arn
Expand Down