From cc3fc46732c9c0333301bd182d9903edbca73457 Mon Sep 17 00:00:00 2001 From: Kostya Date: Tue, 3 Dec 2019 17:26:09 +0800 Subject: [PATCH] Add provider setting --- main.tf | 15 ++++++++++++--- variables.tf | 6 ++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index 41b6c50..d7b42f4 100644 --- a/main.tf +++ b/main.tf @@ -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" { @@ -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" { diff --git a/variables.tf b/variables.tf index 940a900..430888a 100644 --- a/variables.tf +++ b/variables.tf @@ -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"