-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from mineiros-io/soerenmartius/terraform-1.x-s…
…upport Add support for Terraform v1.x
- Loading branch information
Showing
25 changed files
with
84 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ A [Terraform](https://www.terraform.io) module to create a scalable and highly a | |
[Amazon Route53](https://aws.amazon.com/route53/) Domain Name System (DNS) on | ||
[Amazon Web Services (AWS)](https://aws.amazon.com/). | ||
|
||
***This module supports Terraform v0.15, v0.14, v0.13 as well as v0.12.20 and above | ||
***This module supports Terraform v1.x, v0.15, v0.14, v0.13 as well as v0.12.20 and above | ||
and is compatible with the terraform AWS provider v3 as well as v2.45 and above.*** | ||
|
||
- [Module Features](#module-features) | ||
|
@@ -68,7 +68,7 @@ a record for `www` pointing to localhost. | |
```hcl | ||
module "route53" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
version = "~> 0.6.0" | ||
name = "mineiros.io" | ||
|
@@ -308,7 +308,7 @@ Copyright © 2020 [Mineiros GmbH][homepage] | |
[badge-build]: https://mineiros.semaphoreci.com/badges/terraform-aws-route53/branches/master.svg?style=shields | ||
[badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-aws-route53.svg?label=latest&sort=semver | ||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.15,%200.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
|
||
[badge-tf-aws]: https://img.shields.io/badge/AWS-3%20and%202.45+-F8991D.svg?logo=terraform | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
[homepage]: https://mineiros.io/?ref=terraform-aws-route53 | ||
|
||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
[badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-aws-route53.svg?label=latest&sort=semver | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,47 +12,6 @@ The code in [main.tf] creates a Route53 Zone and Records for the main domain and | |
|
||
The `www.` subdomains are implement through CNAMES and point on the A-Records. | ||
|
||
```hcl | ||
module "route53" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
name = "a-dev-mineiros.io" | ||
records = [ | ||
{ | ||
# We don't explicitly need to set names for records that match the zone | ||
type = "A" | ||
alias = { | ||
name = aws_s3_bucket.website.website_endpoint | ||
zone_id = aws_s3_bucket.website.hosted_zone_id | ||
evaluate_target_health = true | ||
} | ||
}, | ||
{ | ||
type = "CNAME" | ||
name = "www" | ||
records = [ | ||
"mineiros.io" | ||
] | ||
}, | ||
{ | ||
name = "dev" | ||
type = "A" | ||
ttl = 1800 | ||
records = ["203.0.113.200"] | ||
}, | ||
{ | ||
type = "CNAME" | ||
name = "www.dev.mineiros.io" | ||
records = [ | ||
"dev.mineiros.io" | ||
] | ||
}, | ||
] | ||
} | ||
``` | ||
|
||
## Running the example | ||
|
||
### Cloning the repository | ||
|
@@ -81,13 +40,10 @@ Run `terraform destroy` to destroy all resources again. | |
|
||
<!-- References --> | ||
|
||
<!-- markdown-link-check-disable --> | ||
[main.tf]: https://github.com/mineiros-io/terraform-aws-route53/blob/master/examples/basic-routing/main.tf | ||
<!-- markdown-link-check-enable --> | ||
|
||
[homepage]: https://mineiros.io/?ref=terraform-aws-route53 | ||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
[releases-terraform]: https://github.com/hashicorp/terraform/releases | ||
[apache20]: https://opensource.org/licenses/Apache-2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ Run `terraform destroy` to destroy all resources again. | |
[main.tf]: https://github.com/mineiros-io/terraform-aws-route53/blob/master/examples/delegation-set/main.tf | ||
[homepage]: https://mineiros.io/?ref=terraform-aws-route53 | ||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
[releases-terraform]: https://github.com/hashicorp/terraform/releases | ||
[apache20]: https://opensource.org/licenses/Apache-2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,52 +10,6 @@ The code in [main.tf] configures two Route53 Records with associated healthcheck | |
Route53 will route the traffic to the secondary record if the healthcheck of the | ||
primary record reports an unhealthy status. | ||
|
||
```hcl | ||
resource "aws_route53_health_check" "primary" { | ||
fqdn = "mineiros.io" | ||
port = 80 | ||
type = "HTTP" | ||
resource_path = "/" | ||
failure_threshold = 5 | ||
request_interval = 30 | ||
tags = { | ||
Name = "mineiros-io-primary-healthcheck" | ||
} | ||
} | ||
module "route53" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
name = "mineiros.io" | ||
skip_delegation_set_creation = true | ||
records = [ | ||
{ | ||
type = "A" | ||
set_identifier = "primary" | ||
failover = "PRIMARY" | ||
# Non-alias primary records must have an associated health check | ||
health_check_id = aws_route53_health_check.primary.id | ||
records = [ | ||
"203.0.113.200" | ||
] | ||
}, | ||
{ | ||
type = "A" | ||
set_identifier = "failover" | ||
failover = "SECONDARY" | ||
health_check_id = null | ||
records = [ | ||
"203.0.113.201", | ||
"203.0.113.202" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Running the example | ||
|
||
### Cloning the repository | ||
|
@@ -87,7 +41,7 @@ Run `terraform destroy` to destroy all resources again. | |
[main.tf]: https://github.com/mineiros-io/terraform-aws-route53/blob/master/examples/failover-routing/main.tf | ||
[homepage]: https://mineiros.io/?ref=terraform-aws-route53 | ||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
[releases-terraform]: https://github.com/hashicorp/terraform/releases | ||
[apache20]: https://opensource.org/licenses/Apache-2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,58 +10,6 @@ The code in [main.tf] creates two zones and different records using the | |
convenient `name = []` shortcut. | ||
All created zones will share the same delegation set. | ||
|
||
```hcl | ||
# Create multiple zones with a single module | ||
module "zones" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
name = [ | ||
"mineiros.io", | ||
"mineiros.com" | ||
] | ||
} | ||
# Create the records for zone a | ||
module "zone_a_records" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
# Wrap the reference to the zone inside a try statement to prevent ugly exceptions if we run terraform destroy | ||
# without running a successful terraform apply before. | ||
zone_id = try(module.zones.zone["mineiros.io"].zone_id, null) | ||
records = [ | ||
{ | ||
type = "TXT" | ||
ttl = 300 | ||
records = [ | ||
"Lorem ipsum" | ||
] | ||
} | ||
] | ||
} | ||
# Create the records for zone b | ||
module "zone_b_records" { | ||
source = "mineiros-io/route53/aws" | ||
version = "~> 0.5.0" | ||
zone_id = try(module.zones.zone["mineiros.com"].zone_id, null) | ||
records = [ | ||
{ | ||
type = "TXT" | ||
ttl = 600 | ||
records = [ | ||
"Lorem ipsum", | ||
"Lorem ipsum dolor sit amet" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Running the example | ||
|
||
### Cloning the repository | ||
|
@@ -93,7 +41,7 @@ Run `terraform destroy` to destroy all resources again. | |
[main.tf]: https://github.com/mineiros-io/terraform-aws-route53/blob/master/examples/multiple-domains-different-records/main.tf | ||
[homepage]: https://mineiros.io/?ref=terraform-aws-route53 | ||
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg | ||
[badge-terraform]: https://img.shields.io/badge/terraform-0.14,%200.13,%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-terraform]: https://img.shields.io/badge/terraform-1.x%20|%200.15%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform | ||
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack | ||
[releases-terraform]: https://github.com/hashicorp/terraform/releases | ||
[apache20]: https://opensource.org/licenses/Apache-2.0 | ||
|
Oops, something went wrong.