drop dns.tf file, move to other files

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-07-25 13:14:50 -04:00
parent cf4d933702
commit e8136e233a
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 40 additions and 39 deletions

39
dns.tf
View File

@ -1,39 +0,0 @@
/* Gandi DNS ------------------------------------*/
resource "gandi_zone" "dap_ps_zone" {
name = "${var.public_domain} zone"
}
resource "gandi_domainattachment" "dap_ps" {
domain = "${var.public_domain}"
zone = "${gandi_zone.dap_ps_zone.id}"
}
/* SES EMail Fowarding --------------------------*/
resource "gandi_zonerecord" "dap_ps_mx" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "@"
type = "MX"
ttl = 3600
values = ["10 inbound-smtp.us-east-1.amazonaws.com."]
}
/* MAIN SITE ------------------------------------*/
/**
* This is the main site hosted on GitHub:
* https://github.com/dap-ps/discover
**/
resource "gandi_zonerecord" "dap_ps_site" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "@"
type = "A"
ttl = 3600
values = [
"185.199.108.153",
"185.199.109.153",
"185.199.110.153",
"185.199.111.153",
]
}

30
main.tf
View File

@ -42,6 +42,17 @@ resource "aws_s3_bucket" "tf-state" {
}
}
/* Gandi DNS ------------------------------------*/
resource "gandi_zone" "dap_ps_zone" {
name = "${var.public_domain} zone"
}
resource "gandi_domainattachment" "dap_ps" {
domain = "${var.public_domain}"
zone = "${gandi_zone.dap_ps_zone.id}"
}
/* ENVIRONMENTS ---------------------------------*/
module "dev" {
@ -51,3 +62,22 @@ module "dev" {
dns_domain = "dap.ps"
dns_entry = "dev"
}
/* MAIN SITE ------------------------------------*/
/**
* This is the main site hosted on GitHub:
* https://github.com/dap-ps/discover
**/
resource "gandi_zonerecord" "dap_ps_site" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "@"
type = "A"
ttl = 3600
values = [
"185.199.108.153",
"185.199.109.153",
"185.199.110.153",
"185.199.111.153",
]
}

10
ses.tf
View File

@ -46,6 +46,16 @@ resource "gandi_zonerecord" "dap_ps_dkim" {
values = ["${element(aws_ses_domain_dkim.dap_ps.dkim_tokens, count.index)}.dkim.amazonses.com."]
}
/* SES EMail Fowarding --------------------------*/
resource "gandi_zonerecord" "dap_ps_mx" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "@"
type = "MX"
ttl = 3600
values = ["10 inbound-smtp.us-east-1.amazonaws.com."]
}
/* Validated Emails -----------------------------*/
resource "aws_ses_email_identity" "jakub" {