Skip to content

Commit

Permalink
DOPS-101 Add route 53 resource
Browse files Browse the repository at this point in the history
  • Loading branch information
akagr committed Sep 15, 2022
1 parent f5a4ca0 commit 3b2c4ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packer/machines/web-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ssh_username": "centos",
"ami_name": "devops-infra-demo-centos-7-{{timestamp}}",
"ami_description": "DevOps Infrastructure Demo CentOS 7 - CIS hardened",
"ami_users": ["587267277416"] // Share with devops sandbox account
"ami_users": ["587267277416"]
}],
"provisioners": [
{
Expand Down
10 changes: 5 additions & 5 deletions terraform/route53.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
data "aws_route53_zone" "dev" {
name = "${var.domain}."
resource "aws_route53_zone" "dev" {
name = "${var.host}.${var.domain}"
}

resource "aws_route53_record" "main" {
zone_id = "${data.aws_route53_zone.dev.zone_id}"
name = "${var.host}.${var.domain}"
zone_id = "${aws_route53_zone.dev.zone_id}"
name = "${aws_route53_zone.dev.name}"
type = "CNAME"
ttl = "300"

Expand All @@ -14,5 +14,5 @@ resource "aws_route53_record" "main" {
}

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

0 comments on commit 3b2c4ca

Please sign in to comment.