From c853ee769eee8599a71b4dc5e816e74d6ee1580f Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Wed, 12 Jun 2019 23:44:11 -0400 Subject: [PATCH] Adds new routes now that proxying works on the cloudflare side. Yay strict HTTPS --- ahoskingit/terraform/dns_ahoskingit.tf | 16 +++ ahoskingit/terraform/terraform.tfstate | 35 +++++- ahoskingit/terraform/terraform.tfstate.backup | 100 +++++++++++++----- 3 files changed, 121 insertions(+), 30 deletions(-) diff --git a/ahoskingit/terraform/dns_ahoskingit.tf b/ahoskingit/terraform/dns_ahoskingit.tf index eb10dab..19fadfd 100644 --- a/ahoskingit/terraform/dns_ahoskingit.tf +++ b/ahoskingit/terraform/dns_ahoskingit.tf @@ -22,6 +22,22 @@ resource "cloudflare_record" "ahoskingit_www" { proxied = "true" } +resource "cloudflare_record" "ahoskingit_influx" { + domain = "ahoskingit.com" + name = "influx" + type = "CNAME" + value = "home.ahoskingit.com" + proxied = "true" +} + +#resource "cloudflare_record" "ahoskingit_wildcard" { +# domain = "ahoskingit.com" +# name = "*" +# type = "A" +# value = "${var.home_ip}" +# proxied = "true" #A records cannot be proxied if wildcard +#} + resource "aws_route53_record" "home_ahoskingit" { zone_id = "${aws_route53_zone.ahoskingit.zone_id}" name = "home.ahoskingit.com" diff --git a/ahoskingit/terraform/terraform.tfstate b/ahoskingit/terraform/terraform.tfstate index db2e304..b15fbf1 100644 --- a/ahoskingit/terraform/terraform.tfstate +++ b/ahoskingit/terraform/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 3, "terraform_version": "0.11.11", - "serial": 39, + "serial": 41, "lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5", "modules": [ { @@ -1322,6 +1322,39 @@ "deposed": [], "provider": "provider.cloudflare" }, + "cloudflare_record.ahoskingit_influx": { + "type": "cloudflare_record", + "depends_on": [], + "primary": { + "id": "50773f8f1e857dd812f0ace681f71991", + "attributes": { + "created_on": "2019-06-13T03:37:00.65986Z", + "data.%": "0", + "domain": "ahoskingit.com", + "hostname": "influx.ahoskingit.com", + "id": "50773f8f1e857dd812f0ace681f71991", + "metadata.%": "3", + "metadata.auto_added": "false", + "metadata.managed_by_apps": "false", + "metadata.managed_by_argo_tunnel": "false", + "modified_on": "2019-06-13T03:37:00.65986Z", + "name": "influx", + "priority": "0", + "proxiable": "true", + "proxied": "true", + "ttl": "1", + "type": "CNAME", + "value": "home.ahoskingit.com", + "zone_id": "6b3fe5493c79efccf633719ab48ef00f" + }, + "meta": { + "schema_version": "1" + }, + "tainted": false + }, + "deposed": [], + "provider": "provider.cloudflare" + }, "cloudflare_record.ahoskingit_www": { "type": "cloudflare_record", "depends_on": [ diff --git a/ahoskingit/terraform/terraform.tfstate.backup b/ahoskingit/terraform/terraform.tfstate.backup index 97ce64e..e528ef4 100755 --- a/ahoskingit/terraform/terraform.tfstate.backup +++ b/ahoskingit/terraform/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 3, "terraform_version": "0.11.11", - "serial": 39, + "serial": 41, "lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5", "modules": [ { @@ -294,34 +294,6 @@ "deposed": [], "provider": "provider.aws" }, - "aws_route53_record.ahoskingit_www": { - "type": "aws_route53_record", - "depends_on": [ - "aws_route53_record.ahoskingit", - "aws_route53_zone.ahoskingit" - ], - "primary": { - "id": "Z2HTSYFXB5HXD9_www.ahoskingit.com_CNAME", - "attributes": { - "fqdn": "www.ahoskingit.com", - "health_check_id": "", - "id": "Z2HTSYFXB5HXD9_www.ahoskingit.com_CNAME", - "name": "www.ahoskingit.com", - "records.#": "1", - "records.60493534": "ahoskingit.com", - "set_identifier": "", - "ttl": "5", - "type": "CNAME", - "zone_id": "Z2HTSYFXB5HXD9" - }, - "meta": { - "schema_version": "2" - }, - "tainted": false - }, - "deposed": [], - "provider": "provider.aws" - }, "aws_route53_record.automatedbytes": { "type": "aws_route53_record", "depends_on": [ @@ -1350,6 +1322,76 @@ "deposed": [], "provider": "provider.cloudflare" }, + "cloudflare_record.ahoskingit_influx": { + "type": "cloudflare_record", + "depends_on": [ + "cloudflare_record.ahoskingit" + ], + "primary": { + "id": "50773f8f1e857dd812f0ace681f71991", + "attributes": { + "created_on": "2019-06-13T02:41:50.905625Z", + "data.%": "0", + "domain": "ahoskingit.com", + "hostname": "influx.ahoskingit.com", + "id": "50773f8f1e857dd812f0ace681f71991", + "metadata.%": "3", + "metadata.auto_added": "false", + "metadata.managed_by_apps": "false", + "metadata.managed_by_argo_tunnel": "false", + "modified_on": "2019-06-13T02:41:50.905625Z", + "name": "influx", + "priority": "0", + "proxiable": "true", + "proxied": "true", + "ttl": "1", + "type": "CNAME", + "value": "ahoskingit.com", + "zone_id": "6b3fe5493c79efccf633719ab48ef00f" + }, + "meta": { + "schema_version": "1" + }, + "tainted": false + }, + "deposed": [], + "provider": "provider.cloudflare" + }, + "cloudflare_record.ahoskingit_www": { + "type": "cloudflare_record", + "depends_on": [ + "cloudflare_record.ahoskingit" + ], + "primary": { + "id": "551ee2110b9d935a1e50147d72159085", + "attributes": { + "created_on": "2019-06-10T05:53:26.229572Z", + "data.%": "0", + "domain": "ahoskingit.com", + "hostname": "www.ahoskingit.com", + "id": "551ee2110b9d935a1e50147d72159085", + "metadata.%": "3", + "metadata.auto_added": "false", + "metadata.managed_by_apps": "false", + "metadata.managed_by_argo_tunnel": "false", + "modified_on": "2019-06-10T05:53:26.229572Z", + "name": "www", + "priority": "0", + "proxiable": "true", + "proxied": "true", + "ttl": "1", + "type": "CNAME", + "value": "ahoskingit.com", + "zone_id": "6b3fe5493c79efccf633719ab48ef00f" + }, + "meta": { + "schema_version": "1" + }, + "tainted": false + }, + "deposed": [], + "provider": "provider.cloudflare" + }, "cloudflare_record.studi-o_ca_mx": { "type": "cloudflare_record", "depends_on": [],