Skip to content

Commit

Permalink
v1.8.4: use data resource to get alias
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 1, 2021
1 parent 6e6559b commit 8cc8f39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@
- ldap-ou-create
- new, used to setup the OU for creation of LDAP roles for SAML

* v1.8.4 -- 20210401
- ses-domain
- use data resource to get alias


2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.8.3"
_module_version = "1.8.4"
}
1 change: 1 addition & 0 deletions ses-domain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ No modules.
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_iam_policy_document.ses_event](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_kms_alias.sns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_alias) | data source |
| [aws_kms_alias.sns_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_alias) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [external_external.ses_dns_txt](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external) | data source |

Expand Down
6 changes: 5 additions & 1 deletion ses-domain/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,14 @@ resource "null_resource" "to_production" {
}
}

data "aws_kms_alias" "sns_key" {
name = "alias/aws/sns"
}

resource "aws_sns_topic" "ses_event" {
count = local.enable_sns_events ? 1 : 0
name = local.ses_sns_topic
kms_master_key_id = "alias/aws/sns"
kms_master_key_id = data.aws_kms_alias.sns_key.id
}

resource "aws_sns_topic_policy" "ses_event" {
Expand Down

0 comments on commit 8cc8f39

Please sign in to comment.