Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fixed output commente issue #33

Merged
merged 4 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions _example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module "ses" {
emails = []
zone_id = "XXXXXXXX69XB8J3IEP"

enable_verification = true
enable_mx = true
enable_spf_domain = true
enable_mx = true
enable_spf_domain = true
}
6 changes: 3 additions & 3 deletions _example/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.6.1"
required_version = ">= 1.6.5"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.21.0"
version = ">= 5.30.0"
}
}
}
}
23 changes: 0 additions & 23 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,6 @@ resource "aws_ses_email_identity" "default" {
email = var.emails[count.index]
}

###DNS VERIFICATION#######

#Module : DOMAIN IDENTITY VERIFICATION
#Description : Terraform module to verify domain identity using domain
resource "aws_ses_domain_identity_verification" "default" {
count = var.enabled && var.enable_domain && var.enable_verification ? 1 : 0

domain = aws_ses_domain_identity.default[count.index].id
depends_on = [aws_route53_record.ses_verification]
}

#Module : DOMAIN IDENTITY VERIFICATION ROUTE53
#Description : Terraform module to record of Route53 for verify domain identity using domain
resource "aws_route53_record" "ses_verification" {
count = var.enabled && var.zone_id != "" ? 1 : 0

zone_id = var.zone_id
name = var.ses_verification_name
type = var.txt_type
ttl = "600"
records = [aws_ses_domain_identity.default[count.index].verification_token]
}

# Module : DOMAIN DKIM
# Description : Terraform module which creates Domain DKIM resource on AWS
resource "aws_ses_domain_dkim" "default" {
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ output "domain_identity_arn" {
}

output "id" {
value = try(aws_ses_domain_identity_verification.default[0].id, "")
value = try(aws_ses_domain_identity.default[0].id, "")
description = "The domain name of the domain identity."
}

Expand Down
10 changes: 0 additions & 10 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ variable "iam_name" {
description = "IAM username."
}

variable "enable_verification" {
type = bool
default = false
description = "Control whether or not to verify SES DNS records."
}

variable "enable_mail_from" {
type = bool
default = false
Expand Down Expand Up @@ -175,8 +169,4 @@ variable "cname_type" {
variable "spf_domain_name" {
type = string
default = "spf_domain"
}
variable "ses_verification_name" {
type = string
default = "ses_verification"
}
6 changes: 3 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.6.1"
required_version = ">= 1.6.5"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.21.0"
version = ">= 5.30.0"
}
}
}
}