Skip to content

Commit

Permalink
Merge pull request #2 from VEBERArnaudAWS/feat/implement-bypass
Browse files Browse the repository at this point in the history
feat(module): implement bypass
  • Loading branch information
VEBERArnaud authored Jan 18, 2019
2 parents 554ba82 + b646958 commit 4c445d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions route53_records.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource "aws_route53_record" "stg_ns" {
count = "${var.bypass == "true" ? 0 : 1}"

zone_id = "${aws_route53_zone.prd.zone_id}"

name = "${lookup(var.env_names, "stg")}"
Expand Down
4 changes: 4 additions & 0 deletions route53_zones.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource "aws_route53_zone" "prd" {
count = "${var.bypass == "true" ? 0 : 1}"

name = "${lookup(var.env_dns_zones_prefix, "prd")}${var.domain}"

tags {
Expand All @@ -9,6 +11,8 @@ resource "aws_route53_zone" "prd" {
}

resource "aws_route53_zone" "stg" {
count = "${var.bypass == "true" ? 0 : 1}"

name = "${lookup(var.env_dns_zones_prefix, "stg")}${var.domain}"

tags {
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
variable "bypass" {
type = "string"
}

variable "domain" {
type = "string"
}
Expand Down

0 comments on commit 4c445d3

Please sign in to comment.