diff --git a/ahoskingit/terraform/.gitignore b/ahoskingit/terraform/.gitignore new file mode 100644 index 0000000..8cc10f9 --- /dev/null +++ b/ahoskingit/terraform/.gitignore @@ -0,0 +1,2 @@ +vault.password +.terraform diff --git a/ahoskingit/terraform/dns_ahoskingit.tf b/ahoskingit/terraform/dns_ahoskingit.tf index e8d691f..0e1783b 100644 --- a/ahoskingit/terraform/dns_ahoskingit.tf +++ b/ahoskingit/terraform/dns_ahoskingit.tf @@ -132,6 +132,14 @@ resource "aws_route53_record" "gitlab_ahoskingit" { 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 #resource "aws_route53_record" "www_ahoskingit" { # zone_id = "${aws_route53_zone.ahoskingit.zone_id}" diff --git a/ahoskingit/terraform/terraform.tfstate b/ahoskingit/terraform/terraform.tfstate index d0edfe6..f888c88 100644 --- a/ahoskingit/terraform/terraform.tfstate +++ b/ahoskingit/terraform/terraform.tfstate @@ -1,6 +1,10 @@ { "version": 3, +<<<<<<< HEAD "terraform_version": "0.11.7", +======= + "terraform_version": "0.11.2", +>>>>>>> b0f3f75444d590813ae2069af2ec3316548c1a7b "serial": 23, "lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5", "modules": [ @@ -818,6 +822,37 @@ }, "deposed": [], "provider": "provider.aws" +<<<<<<< HEAD +======= + }, + "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" +>>>>>>> b0f3f75444d590813ae2069af2ec3316548c1a7b }, "aws_route53_record.mx_automatedbytes": { "type": "aws_route53_record", diff --git a/ahoskingit/terraform/terrarist.py b/ahoskingit/terraform/terrarist.py index dde44c4..49b584a 100755 --- a/ahoskingit/terraform/terrarist.py +++ b/ahoskingit/terraform/terrarist.py @@ -7,7 +7,7 @@ from ansible_vault import Vault if __name__ == "__main__": 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-password-file', dest='vault_password', required=True, help='Ansible Vault Password File') parser.add_argument('--environment', dest='environment', required=True, help='Production, Staging, etc...')