Skip to content

Commit

Permalink
clean out terraform inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
martinklepsch committed Dec 12, 2018
1 parent 10da633 commit 1b74a68
Showing 1 changed file with 2 additions and 37 deletions.
39 changes: 2 additions & 37 deletions ops/infrastructure/cljdoc.tf
Expand Up @@ -32,23 +32,8 @@ module "main_server" {
image_id = "${file("../image/nomad-image-id")}"
org_zone = "${aws_route53_zone.cljdoc_org_zone.zone_id}"
xyz_zone = "${aws_route53_zone.cljdoc_xyz_zone.zone_id}"
org_domain = "test2.cljdoc.org"
xyz_domain = "test2.cljdoc.xyz"
}

# DigitalOcean Server ------------------------------------------------

resource "digitalocean_droplet" "cljdoc_api" {
image = "${file("../image/image-id")}"
name = "cljdoc-2"
region = "ams3"
size = "s-1vcpu-2gb"
monitoring = true

# supplying a key here seems to be the only way to
# not get a root password via email, despite having
# added SSH keys to the snapshot/image before
ssh_keys = ["18144068"]
org_domain = "cljdoc.org"
xyz_domain = "cljdoc.xyz"
}

# Route53 ------------------------------------------------------------
Expand All @@ -58,27 +43,7 @@ resource "aws_route53_zone" "cljdoc_xyz_zone" {
name = "${var.xyz_domain}"
}

resource "aws_route53_record" "main" {
provider = "aws.prod"
zone_id = "${aws_route53_zone.cljdoc_xyz_zone.zone_id}"
name = "${var.xyz_domain}"
type = "A"
ttl = "300"
records = ["${digitalocean_droplet.cljdoc_api.ipv4_address}"]
}

# Org zone and records

resource "aws_route53_zone" "cljdoc_org_zone" {
provider = "aws.prod"
name = "${var.org_domain}"
}

resource "aws_route53_record" "cljdoc_org_main" {
provider = "aws.prod"
zone_id = "${aws_route53_zone.cljdoc_org_zone.zone_id}"
name = "${var.org_domain}"
type = "A"
ttl = "300"
records = ["${digitalocean_droplet.cljdoc_api.ipv4_address}"]
}

0 comments on commit 1b74a68

Please sign in to comment.