Add monitors dns

This commit is contained in:
Alexander Hosking 2018-02-12 05:58:22 -05:00
parent d2851d0715
commit b0f3f75444
7 changed files with 126 additions and 60 deletions

2
ahoskingit/terraform/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
vault.password
.terraform

View File

@ -132,6 +132,14 @@ resource "aws_route53_record" "gitlab_ahoskingit" {
records = ["${aws_route53_record.home_ahoskingit.name}"] records = ["${aws_route53_record.home_ahoskingit.name}"]
} }
resource "aws_route53_record" "monitors_ahoskingit" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "monitors.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
#Route53 DNS entry #Route53 DNS entry
#resource "aws_route53_record" "www_ahoskingit" { #resource "aws_route53_record" "www_ahoskingit" {
# zone_id = "${aws_route53_zone.ahoskingit.zone_id}" # zone_id = "${aws_route53_zone.ahoskingit.zone_id}"

View File

@ -4,8 +4,8 @@ provider "aws" {
region = "${var.aws_region}" region = "${var.aws_region}"
} }
provider "google" { #provider "google" {
credentials = "" # credentials = ""
# project = "${var.gcp_project}" ## project = "${var.gcp_project}"
region = "${var.gcp_region}" # region = "${var.gcp_region}"
} #}

View File

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"terraform_version": "0.10.7", "terraform_version": "0.11.2",
"serial": 22, "serial": 23,
"lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5", "lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5",
"modules": [ "modules": [
{ {
@ -35,7 +35,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahosking_mx": { "aws_route53_record.ahosking_mx": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -66,7 +66,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahosking_wildcard": { "aws_route53_record.ahosking_wildcard": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -93,7 +93,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahosking_www": { "aws_route53_record.ahosking_www": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -121,7 +121,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit": { "aws_route53_record.ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -148,7 +148,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_ca": { "aws_route53_record.ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -175,7 +175,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_ca_mx": { "aws_route53_record.ahoskingit_ca_mx": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -206,7 +206,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_ca_txt": { "aws_route53_record.ahoskingit_ca_txt": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -233,7 +233,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_ca_www": { "aws_route53_record.ahoskingit_ca_www": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -261,7 +261,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_mx": { "aws_route53_record.ahoskingit_mx": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -292,7 +292,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_txt": { "aws_route53_record.ahoskingit_txt": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -319,7 +319,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ahoskingit_www": { "aws_route53_record.ahoskingit_www": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -347,7 +347,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.automatedbytes": { "aws_route53_record.automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -374,7 +374,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.baby_ahoskingit": { "aws_route53_record.baby_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -401,7 +401,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.cloud_ahoskingit": { "aws_route53_record.cloud_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -429,7 +429,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.cloud_ahoskingit_ca": { "aws_route53_record.cloud_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -457,7 +457,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.docs_ahoskingit": { "aws_route53_record.docs_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -485,7 +485,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.docs_ahoskingit_ca": { "aws_route53_record.docs_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -513,7 +513,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.git_ahoskingit": { "aws_route53_record.git_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -541,7 +541,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.git_ahoskingit_ca": { "aws_route53_record.git_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -569,7 +569,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.gitlab_ahoskingit": { "aws_route53_record.gitlab_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -597,7 +597,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.gitlab_ahoskingit_ca": { "aws_route53_record.gitlab_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -625,7 +625,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.home_ahoskingit": { "aws_route53_record.home_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -652,7 +652,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.home_ahoskingit_ca": { "aws_route53_record.home_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -679,7 +679,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.inventory_ahoskingit": { "aws_route53_record.inventory_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -707,7 +707,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.inventory_ahoskingit_ca": { "aws_route53_record.inventory_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -735,7 +735,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.kfa_ahoskingit": { "aws_route53_record.kfa_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -762,7 +762,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.kfa_support_automatedbytes": { "aws_route53_record.kfa_support_automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -789,7 +789,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.lab_ahoskingit": { "aws_route53_record.lab_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -817,7 +817,35 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
},
"aws_route53_record.monitors_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.home_ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
"id": "Z2HTSYFXB5HXD9_monitors.ahoskingit.com_CNAME",
"attributes": {
"fqdn": "monitors.ahoskingit.com",
"health_check_id": "",
"id": "Z2HTSYFXB5HXD9_monitors.ahoskingit.com_CNAME",
"name": "monitors.ahoskingit.com",
"records.#": "1",
"records.1011144593": "home.ahoskingit.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z2HTSYFXB5HXD9"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": "provider.aws"
}, },
"aws_route53_record.mx_automatedbytes": { "aws_route53_record.mx_automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -848,7 +876,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ns1_ahoskingit": { "aws_route53_record.ns1_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -876,7 +904,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.ns1_ahoskingit_ca": { "aws_route53_record.ns1_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -904,7 +932,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.office_ahoskingit": { "aws_route53_record.office_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -932,7 +960,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.plex_ahoskingit": { "aws_route53_record.plex_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -960,7 +988,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.plex_ahoskingit_ca": { "aws_route53_record.plex_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -988,7 +1016,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.requests_plex_ahoskingit": { "aws_route53_record.requests_plex_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1016,7 +1044,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.support_ahoskingit": { "aws_route53_record.support_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1044,7 +1072,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.support_ahoskingit_ca": { "aws_route53_record.support_ahoskingit_ca": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1072,7 +1100,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.support_automatedbytes": { "aws_route53_record.support_automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1099,7 +1127,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.wildcard_automatedbytes": { "aws_route53_record.wildcard_automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1127,7 +1155,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_record.www_automatedbytes": { "aws_route53_record.www_automatedbytes": {
"type": "aws_route53_record", "type": "aws_route53_record",
@ -1155,7 +1183,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_zone.ahosking": { "aws_route53_zone.ahosking": {
"type": "aws_route53_zone", "type": "aws_route53_zone",
@ -1179,7 +1207,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_zone.ahoskingit": { "aws_route53_zone.ahoskingit": {
"type": "aws_route53_zone", "type": "aws_route53_zone",
@ -1203,7 +1231,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_zone.ahoskingit_ca": { "aws_route53_zone.ahoskingit_ca": {
"type": "aws_route53_zone", "type": "aws_route53_zone",
@ -1227,7 +1255,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
}, },
"aws_route53_zone.automatedbytes": { "aws_route53_zone.automatedbytes": {
"type": "aws_route53_zone", "type": "aws_route53_zone",
@ -1251,7 +1279,7 @@
"tainted": false "tainted": false
}, },
"deposed": [], "deposed": [],
"provider": "" "provider": "provider.aws"
} }
}, },
"depends_on": [] "depends_on": []

View File

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"terraform_version": "0.10.5", "terraform_version": "0.10.7",
"serial": 22, "serial": 23,
"lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5", "lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5",
"modules": [ "modules": [
{ {
@ -990,6 +990,34 @@
"deposed": [], "deposed": [],
"provider": "" "provider": ""
}, },
"aws_route53_record.requests_plex_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.home_ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
"id": "Z2HTSYFXB5HXD9_requests.plex.ahoskingit.com_CNAME",
"attributes": {
"fqdn": "requests.plex.ahoskingit.com",
"health_check_id": "",
"id": "Z2HTSYFXB5HXD9_requests.plex.ahoskingit.com_CNAME",
"name": "requests.plex.ahoskingit.com",
"records.#": "1",
"records.1011144593": "home.ahoskingit.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z2HTSYFXB5HXD9"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.support_ahoskingit": { "aws_route53_record.support_ahoskingit": {
"type": "aws_route53_record", "type": "aws_route53_record",
"depends_on": [ "depends_on": [

View File

@ -7,7 +7,7 @@ from ansible_vault import Vault
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Securely wrap terraform like a terrarist!') parser = argparse.ArgumentParser(description='Securely wrap terraform like a terrarist!')
parser.add_argument('action', choices=['plan', 'apply', 'import'], help='Terraform action to execute') parser.add_argument('action', choices=['plan', 'apply', 'import', 'init'], help='Terraform action to execute')
parser.add_argument('--vault', '--ansible-vault', dest='vault_file', required=True, help='Ansible Vault File') parser.add_argument('--vault', '--ansible-vault', dest='vault_file', required=True, help='Ansible Vault File')
parser.add_argument('--vault-password-file', dest='vault_password', required=True, help='Ansible Vault Password File') parser.add_argument('--vault-password-file', dest='vault_password', required=True, help='Ansible Vault Password File')
parser.add_argument('--environment', dest='environment', required=True, help='Production, Staging, etc...') parser.add_argument('--environment', dest='environment', required=True, help='Production, Staging, etc...')

View File

@ -8,11 +8,11 @@ variable "aws_region" {
} }
## GCP Credentias requirements ## GCP Credentias requirements
variable "gcp_private_key_id" {} #variable "gcp_private_key_id" {}
variable "GOOGLE_CLOUD_KEYFILE_JSON" {} #variable "GOOGLE_CLOUD_KEYFILE_JSON" {}
variable "gcp_region" { #variable "gcp_region" {
default = "us-east1" # default = "us-east1"
} #}
variable "gcp_project" { variable "gcp_project" {
default = "ahoskingit" default = "ahoskingit"
} }