Terraform module to create Route53 resource on AWS for zone and record set.
DevSecOps and Cloud Engineering standardizing architecture while ensuring the architecture is security complaint.
This module consist of terraform code to create aws Route53 records Terraform open source and examples. It also helps to create and improve your infrastructure with minimalistic code instead of repeating and maintaining the whole infrastructure code.
This module has a few dependencies:
- Terraform 0.13
- Go
- github.com/stretchr/testify/assert
- github.com/gruntwork-io/terratest/modules/terraform
This module creates DNS records in Route53 zone.
Name | Version |
---|---|
terraform | >= 0.12.6 |
aws | >= 2.49 |
Name | Version |
---|---|
aws | >= 2.49 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
records | List of maps of DNS records | any |
[] |
no |
hosted_zone | Name of DNS zone | string |
null |
no |
Name | Description |
---|---|
this_route53_record_fqdn | FQDN built using the zone domain and name |
this_route53_record_name | The name of the record |
Module maintained by Nashwan Mustafa.
- this example will create an A record with Alias pointing to a resource name for example alb, s3, cloudfront, etc.
module "service_dns_a_record" {
source = "nashvan/route53-module/aws"
version = "1.2.0"
hosted_zone = local.account_config["hosted_zone"]
records = [
{
name = "${var.environment_name}.${local.app_name}"
type = "A"
alias = {
name = "abc-1830827336.xyz.elb.amazonaws.com"
zone_id = "Z35SXDOTRQ7X7K"
}
}
]
}
- this example will create an A record pointing to the IP address
module "service_dns" {
source = "nashvan/route53-module/aws"
version = "1.2.0"
hosted_zone = local.account_config["hosted_zone"]
records = [
{
name = "abc"
type = "A"
ttl = 3600
records = ["10.10.10.10",]
}
]
}
- this example will create a CNAME record (poiting an fqdn to another fqdn for example)
module "service_dns_cname" {
source = "nashvan/route53-module/aws"
version = "1.2.0"
hosted_zone = local.account_config["hosted_zone"]
records = [
{
name = "xyz"
type = "CNAME"
ttl = "5"
records = ["develop.abc.test.info.",]
}
]
}
// Will create the following record for you // xyz.cmcloudlab912.info CNAME Simple - No develop.abc.cmcloudlab912.info. 5
module "service_dns_cname" {
source = "nashvan/route53-module/aws"
version = "1.2.0"
hosted_zone = local.account_config["hosted_zone"]
records = [
{
name = "test"
type = "CNAME"
ttl = "5"
records = ["develop.abc.test.info.",]
weighted_routing_policy = {
weight = 90
}
set_identifier = "develop"
}
]
}
// Will create the following record for you // test.test.info CNAME Weighted 90 No develop.abc.test.info.
test.cmcloudlab912.info CNAME Simple - No develop.abc.cmcloudlab912.info. 5
Experience in Security, DevOps, Cloud Archetecture, and infrastructure automation.
Kurdish by blood and values!
We ❤️ DevSecOps and Cloud Engineering