Skip to content

nitinda/terraform-module-aws-route53-record

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module : terraform-module-aws-route53-record

Terraform Module for AWS Route53 Record


Code : Stable

This is a stable example. It should successfully build out of the box

This examples does is built on Construct Libraries marked "Stable" and does not have any infrastructure prerequisites to build.


General

This module may be used to create Route53 Record resources in AWS cloud provider......


Prerequisites

This module needs Terraform 0.12.19 or newer. You can download the latest Terraform version from here.

This module deploys aws services details are in respective feature branches.


Features Branches

Below we are able to check the resources that are being created as part of this module call:

  • Route53 Record

Usage

Using this repo

To use this module, add the following call to your code:

Example for Route53 Record - Simple routing policy

module "route53_record" {
  source = "git::https://github.com/nitinda/terraform-module-aws-route53-record.git?ref=master"

  providers = {
    aws = aws.services
  }
  
  zone_id = var.zone_id
  name    = var.name
  type    = var.type
  ttl     = var.ttl
  records = [var.records]
}

Example for Route53 Record - Weighted routing policy

module "route53_record" {
  source = "git::https://github.com/nitinda/terraform-module-aws-route53-record.git?ref=master"

  providers = {
    aws = aws.services
  }
  
  zone_id = var.zone_id
  name    = var.name
  type    = var.type
  ttl     = var.ttl
  records = [var.records]

  weighted_routing_policy = {
    weight = 10
  }
}

Example for Route53 Record - Alias record

module "route53_record" {
  source = "git::https://github.com/nitinda/terraform-module-aws-route53-record.git?ref=master"

  providers = {
    aws = aws.services
  }
  
  zone_id = aws_route53_zone.primary.zone_id
  name    = "example.com"
  type    = "A"

  alias = {
    name                   = aws_elb.main.dns_name
    zone_id                = aws_elb.main.zone_id
    evaluate_target_health = true
  }
}

Inputs

The variables required in order for the module to be successfully called from the deployment repository are the following:

Variable Description Type Argument Status Default Value
zone_id The ID of the hosted zone to contain this record string Required
name The name of the record string Required
type The record type. Valid values are A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT string Required
ttl The TTL of the record number Required
records A string list of records string Required
set_identifier Unique identifier to differentiate records with routing policies from one another. Required if using failover, geolocation, latency, or weighted._ string Optional null
health_check_id The health check the record should be associated with string Optional null
alias An alias block. Conflicts with ttl & records string Optional {}
failover_routing_policy A block indicating the routing behavior any Optional {}
geolocation_routing_policy A block indicating the routing behavior any Optional {}
latency_routing_policy A block indicating the routing behavior any Optional {}
weighted_routing_policy A block indicating the routing behavior any Optional {}
multivalue_answer_routing_policy Set to true to indicate a multivalue answer routing policy. Conflicts with any other routing policy boolean Optional false
allow_overwrite This does not affect the ability to update the record in Terraform and does not prevent other resources within Terraform or manual Route 53 changes outside Terraform from overwriting this record. false by default. This configuration is not recommended for most environments. boolean Optional false

Outputs

General

This module has the following outputs:

  • name
  • fqdn

Usage

In order for the variables to be accessed on module level please use the syntax below:

module.<module_name>.<output_variable_name>

The output variable is able to be accessed through terraform state file using the syntax below:

data.terraform_remote_state.<module_name>.<output_variable_name>

Authors

Module maintained by Module maintained by the - Nitin Das

Releases

No releases published

Packages

No packages published

Languages