Skip to content

Commit

Permalink
Added optional support for ipv6 dns records (#66)
Browse files Browse the repository at this point in the history
This is related to #64
  • Loading branch information
dmattia authored and aknysh committed Jan 15, 2020
1 parent e132823 commit e59d7b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Available targets:
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list(string) | `<list>` | no |
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | string | `none` | no |
| index_document | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders | string | `` | no |
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool | `false` | no |
| is_ipv6_enabled | State of CloudFront IPv6 | bool | `true` | no |
| lambda_function_association | A config block that triggers a lambda function with specific actions | object | `<list>` | no |
| log_expiration_days | Number of days after which to expunge the objects | string | `90` | no |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list(string) | `<list>` | no |
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | string | `none` | no |
| index_document | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders | string | `` | no |
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool | `false` | no |
| is_ipv6_enabled | State of CloudFront IPv6 | bool | `true` | no |
| lambda_function_association | A config block that triggers a lambda function with specific actions | object | `<list>` | no |
| log_expiration_days | Number of days after which to expunge the objects | string | `90` | no |
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,12 @@ resource "aws_cloudfront_distribution" "default" {
}

module "dns" {
source = "git::https://github.com/cloudposse/terraform-aws-route53-alias.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-aws-route53-alias.git?ref=tags/0.4.0"
enabled = var.enabled && length(var.parent_zone_id) > 0 || length(var.parent_zone_name) > 0 ? true : false
aliases = var.aliases
parent_zone_id = var.parent_zone_id
parent_zone_name = var.parent_zone_name
target_dns_name = aws_cloudfront_distribution.default.domain_name
target_zone_id = aws_cloudfront_distribution.default.hosted_zone_id
ipv6_enabled = var.ipv6_enabled
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,10 @@ variable "routing_rules" {
type = string
default = ""
description = "A json array containing routing rules describing redirect behavior and when redirects are applied"
}

variable "ipv6_enabled" {
type = bool
default = false
description = "Set to true to enable an AAAA DNS record to be set as well as the A record"
}

0 comments on commit e59d7b5

Please sign in to comment.