Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
Add provider setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyaplis committed Dec 3, 2019
1 parent 5eff40d commit cc3fc46
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
15 changes: 12 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
provider "aws" {
region = "us-east-1"
profile = var.aws_profile
alias = "us-east-1"
}

# SES domian verification
resource "aws_ses_domain_identity" "this" {
domain = var.domain_name
provider = aws.us-east-1
domain = var.domain_name
}

resource "aws_ses_domain_identity_verification" "this" {
depends_on = [aws_route53_record.ses_verification]
domain = aws_ses_domain_identity.this.id
provider = aws.us-east-1
domain = aws_ses_domain_identity.this.id
}

resource "aws_route53_record" "ses_verification" {
Expand All @@ -19,7 +27,8 @@ resource "aws_route53_record" "ses_verification" {
# SES DKIM verification

resource "aws_ses_domain_dkim" "this" {
domain = aws_ses_domain_identity.this.domain
provider = aws.us-east-1
domain = aws_ses_domain_identity.this.domain
}

resource "aws_route53_record" "dkim" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "aws_profile" {
type = string
default = "default"
description = "AWS profile name"
}

variable "domain_name" {
type = string
description = "The domain name for the SES account"
Expand Down

0 comments on commit cc3fc46

Please sign in to comment.