Skip to content

Commit 3b2c4ca

Browse files
committed
DOPS-101 Add route 53 resource
1 parent f5a4ca0 commit 3b2c4ca

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packer/machines/web-server.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"ssh_username": "centos",
2020
"ami_name": "devops-infra-demo-centos-7-{{timestamp}}",
2121
"ami_description": "DevOps Infrastructure Demo CentOS 7 - CIS hardened",
22-
"ami_users": ["587267277416"] // Share with devops sandbox account
22+
"ami_users": ["587267277416"]
2323
}],
2424
"provisioners": [
2525
{

terraform/route53.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
data "aws_route53_zone" "dev" {
2-
name = "${var.domain}."
1+
resource "aws_route53_zone" "dev" {
2+
name = "${var.host}.${var.domain}"
33
}
44

55
resource "aws_route53_record" "main" {
6-
zone_id = "${data.aws_route53_zone.dev.zone_id}"
7-
name = "${var.host}.${var.domain}"
6+
zone_id = "${aws_route53_zone.dev.zone_id}"
7+
name = "${aws_route53_zone.dev.name}"
88
type = "CNAME"
99
ttl = "300"
1010

@@ -14,5 +14,5 @@ resource "aws_route53_record" "main" {
1414
}
1515

1616
output "route53-dns" {
17-
value = "${var.host}.${var.domain}"
17+
value = "${aws_route53_zone.dev.name}"
1818
}

0 commit comments

Comments
 (0)