cloud-platform-terraform-sns-topic
![Releases](https://camo.githubusercontent.com/54ddaec3a1160afda4baf7ce5c448338787a8e16544fcc4ded18aa7cc5eec186/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d696e69737472796f666a7573746963652f636c6f75642d706c6174666f726d2d7465727261666f726d2d736e732d746f7069632e737667)
Terraform module that will create an SNS Topic in AWS, along with an IAM User to access it.
module "example_sns_topic" {
source = "github.com/ministryofjustice/cloud-platform-terraform-sns?ref=version"
team_name = "example-team"
topic_display_name = "example-topic-display-name"
providers = {
aws = aws.london
}
}
For an SQS queue defined in the same namespace's /resources, a subscription can be added with a syntax like
resource "aws_sns_topic_subscription" "example-queue-subscription" {
provider = "aws.london"
topic_arn = "${module.example_sns_topic.topic_arn}"
protocol = "sqs"
endpoint = "${module.example_sqs.sqs_arn}"
filter_policy = "{\"field_name\": [\"string_pattern\", \"string_pattern\", \"...\"]}"
}
No modules.
Name |
Description |
Type |
Default |
Required |
application |
Application name |
string |
n/a |
yes |
business_unit |
Area of the MOJ responsible for the service |
string |
n/a |
yes |
encrypt_sns_kms |
If set to true, this will create aws_kms_key and aws_kms_alias resources and add kms_master_key_id in aws_sns_topic resource |
bool |
false |
no |
environment_name |
Environment name |
string |
n/a |
yes |
infrastructure_support |
The team responsible for managing the infrastructure. Should be of the form () |
string |
n/a |
yes |
is_production |
Whether the environment is production or not |
string |
"false" |
no |
namespace |
Namespace name |
string |
n/a |
yes |
team_name |
Team name |
string |
n/a |
yes |
topic_display_name |
The display name of your SNS Topic. MUST BE UNDER 10 CHARS |
string |
n/a |
yes |