Skip to content

Commit

Permalink
Updates SNS_Topic Name (#37)
Browse files Browse the repository at this point in the history
* update name of sns_topic

* Auto Format

* minor update to count

* remove count

Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
  • Loading branch information
Benbentwo and cloudpossebot committed Jul 28, 2021
1 parent 895a981 commit 6275e3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Here's a complete [example](examples/complete/main.tf) of using this `terraform-

| Name | Source | Version |
|------|--------|---------|
| <a name="module_aws_sns_topic_label"></a> [aws\_sns\_topic\_label](#module\_aws\_sns\_topic\_label) | cloudposse/label/null | 0.24.1 |
| <a name="module_sns_kms_key"></a> [sns\_kms\_key](#module\_sns\_kms\_key) | cloudposse/kms-key/aws | 0.10.0 |
| <a name="module_sns_kms_key_label"></a> [sns\_kms\_key\_label](#module\_sns\_kms\_key\_label) | cloudposse/label/null | 0.24.1 |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.24.1 |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module_aws_sns_topic_label"></a> [aws\_sns\_topic\_label](#module\_aws\_sns\_topic\_label) | cloudposse/label/null | 0.24.1 |
| <a name="module_sns_kms_key"></a> [sns\_kms\_key](#module\_sns\_kms\_key) | cloudposse/kms-key/aws | 0.10.0 |
| <a name="module_sns_kms_key_label"></a> [sns\_kms\_key\_label](#module\_sns\_kms\_key\_label) | cloudposse/label/null | 0.24.1 |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.24.1 |
Expand Down
10 changes: 9 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,17 @@ data "aws_iam_policy_document" "sns_kms_key_policy" {
}
}

module "aws_sns_topic_label" {
source = "cloudposse/label/null"
version = "0.24.1"

attributes = ["cloudtrail-breach"]
context = module.this.context
}

resource "aws_sns_topic" "default" {
count = local.enabled ? 1 : 0
name = join(module.this.delimiter, [local.alert_for, "threshold", "alerts"])
name = module.aws_sns_topic_label.id
tags = module.this.tags
kms_master_key_id = local.create_kms_key ? module.sns_kms_key[0].key_id : var.kms_master_key_id
}
Expand Down

0 comments on commit 6275e3f

Please sign in to comment.