Skip to content

Set 'zone_id' for existing route 53 zones

Latest
Compare
Choose a tag to compare
@stavxyz stavxyz released this 08 Jul 23:33
db88355

v2.1.0

You can now (and must, if you are using an existing Route53 zone) set the zone_id terraform variable for this module.

Another option is to import your Route53 Zone into this module, but that is probably not the
"route" you want to go. (see what I did there?) But if you do:

$ terraform import module.mailer.aws_route53_zone.this[0] <your_route53_zone_id>

(The [0] is needed because it is a "conditional resource" and you must refer to the count
index when importing, which is always 0)

where the 'mailer' portion is the name you choose:

module "mailer" {
  source = "github.com/samstav/terraform-mailgun-aws"
}

In either case, you can refer to your zone id like this:

  "${module.mailer.zone_id}"

Since zone_id is also an output variable from the terraform-mailgun-aws module.