Skip to content

Commit 803d37c

Browse files
feat: fixed output commente issue (#33)
* feat: fixed output commente issue * feat: fixed redundant verification resources issue * feat: fixed redundant verification resources issue * feat: fixed redundant verification resources issue --------- Co-authored-by: anmolnagpal <[email protected]>
1 parent ea68390 commit 803d37c

File tree

6 files changed

+9
-43
lines changed

6 files changed

+9
-43
lines changed

_example/example.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module "ses" {
2020
emails = []
2121
zone_id = "XXXXXXXX69XB8J3IEP"
2222

23-
enable_verification = true
24-
enable_mx = true
25-
enable_spf_domain = true
23+
enable_mx = true
24+
enable_spf_domain = true
2625
}

_example/versions.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Terraform version
22
terraform {
3-
required_version = ">= 1.6.1"
3+
required_version = ">= 1.6.5"
44

55
required_providers {
66
aws = {
77
source = "hashicorp/aws"
8-
version = ">= 5.21.0"
8+
version = ">= 5.30.0"
99
}
1010
}
11-
}
11+
}

main.tf

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,6 @@ resource "aws_ses_email_identity" "default" {
3333
email = var.emails[count.index]
3434
}
3535

36-
###DNS VERIFICATION#######
37-
38-
#Module : DOMAIN IDENTITY VERIFICATION
39-
#Description : Terraform module to verify domain identity using domain
40-
resource "aws_ses_domain_identity_verification" "default" {
41-
count = var.enabled && var.enable_domain && var.enable_verification ? 1 : 0
42-
43-
domain = aws_ses_domain_identity.default[count.index].id
44-
depends_on = [aws_route53_record.ses_verification]
45-
}
46-
47-
#Module : DOMAIN IDENTITY VERIFICATION ROUTE53
48-
#Description : Terraform module to record of Route53 for verify domain identity using domain
49-
resource "aws_route53_record" "ses_verification" {
50-
count = var.enabled && var.zone_id != "" ? 1 : 0
51-
52-
zone_id = var.zone_id
53-
name = var.ses_verification_name
54-
type = var.txt_type
55-
ttl = "600"
56-
records = [aws_ses_domain_identity.default[count.index].verification_token]
57-
}
58-
5936
# Module : DOMAIN DKIM
6037
# Description : Terraform module which creates Domain DKIM resource on AWS
6138
resource "aws_ses_domain_dkim" "default" {

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output "domain_identity_arn" {
66
}
77

88
output "id" {
9-
value = try(aws_ses_domain_identity_verification.default[0].id, "")
9+
value = try(aws_ses_domain_identity.default[0].id, "")
1010
description = "The domain name of the domain identity."
1111
}
1212

variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ variable "iam_name" {
5252
description = "IAM username."
5353
}
5454

55-
variable "enable_verification" {
56-
type = bool
57-
default = false
58-
description = "Control whether or not to verify SES DNS records."
59-
}
60-
6155
variable "enable_mail_from" {
6256
type = bool
6357
default = false
@@ -175,8 +169,4 @@ variable "cname_type" {
175169
variable "spf_domain_name" {
176170
type = string
177171
default = "spf_domain"
178-
}
179-
variable "ses_verification_name" {
180-
type = string
181-
default = "ses_verification"
182172
}

versions.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Terraform version
22
terraform {
3-
required_version = ">= 1.6.1"
3+
required_version = ">= 1.6.5"
44

55
required_providers {
66
aws = {
77
source = "hashicorp/aws"
8-
version = ">= 5.21.0"
8+
version = ">= 5.30.0"
99
}
1010
}
11-
}
11+
}

0 commit comments

Comments
 (0)