Skip to content

Instantly share code, notes, and snippets.

@100daysofdevops
Created November 20, 2019 04:14
Show Gist options
  • Save 100daysofdevops/5998b64228e1259c0127c949dbb48c4b to your computer and use it in GitHub Desktop.
Save 100daysofdevops/5998b64228e1259c0127c949dbb48c4b to your computer and use it in GitHub Desktop.
resource "aws_route53_record" "sdlc-scm-route53-record" {
count = "${length(var.hostname)}"
name = "${element(var.hostname,count.index )}"
type = "A"
zone_id = "${var.zone_id}"
records = ["${element(var.arecord, count.index)}"]
ttl = "300"
}
variable "hostname" {
type = "list"
}
variable "arecord" {
type = "list"
}
variable "zone_id" {}
hostname = ["git1-1.ghe-usw2-aws", "git1-2.ghe-usw2-aws", "git2-1.ghe-usw2-aws", "git2-2.ghe-usw2-aws", "collab1-1.sdlcscm-usw2-aws", "collab1-2.sdlcscm-usw2-aws", "tools1-1.sdlcscm-usw2-aws", "tools1-2.sdlcscm-usw2-aws"]
arecord = ["10.123.2.148", "10.123.1.206", "10.123.2.240", "10.123.1.135", "172.16.1.100", "172.16.2.150", "172.16.1.152", "172.16.2.190"]
zone_id = "Z1L55V7CWKP9GE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment