-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from AndrewFarley/allow-existing-sns
Feature: Allow existing SNS via a variable flag
- Loading branch information
Showing
5 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ | |
|
||
# .tfvars files | ||
*.tfvars | ||
|
||
# Build harness | ||
.build-harness | ||
build-harness/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### For connecting and provisioning | ||
variable "region" { | ||
default = "us-west-2" | ||
} | ||
|
||
provider "aws" { | ||
region = var.region | ||
|
||
# Make it faster by skipping something | ||
skip_get_ec2_platforms = true | ||
skip_metadata_api_check = true | ||
skip_region_validation = true | ||
skip_credentials_validation = true | ||
skip_requesting_account_id = true | ||
} | ||
|
||
# Create an existing SNS topic (aka, do not create in module) | ||
resource "aws_sns_topic" "this" { | ||
name = "using-existing-sns-topic-test" | ||
} | ||
|
||
module "es_alarms" { | ||
source = "../../" | ||
domain_name = "example" | ||
# To use an existing SNS topic, your sns_topic MUST be a full ARN | ||
sns_topic = var.aws_sns_topic.arn | ||
# And you must set this to false | ||
create_sns_topic = false | ||
} | ||
|
||
output "es_alarms_sns_topic_arn" { | ||
value = module.es_alarms.sns_topic_arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters