Skip to content

Commit 0c9c470

Browse files
authored
Merge pull request #2 from clouddrove/CD-147
fix labels managedby variables
2 parents 1e3c35b + 44d2838 commit 0c9c470

File tree

7 files changed

+59
-51
lines changed

7 files changed

+59
-51
lines changed

README.md

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Terraform AWS Route53
88
</h1>
99

10-
<p align="center" style="font-size: 1.2rem;">
10+
<p align="center" style="font-size: 1.2rem;">
1111
Terraform module to create Route53 resource on AWS for zone and record set.
1212
</p>
1313

@@ -38,7 +38,7 @@
3838
<hr>
3939

4040

41-
We eat, drink, sleep and most importantly love **DevOps**. We are working towards stratergies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
41+
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
4242

4343
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
4444

@@ -49,7 +49,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
4949

5050
## Prerequisites
5151

52-
This module has a few dependencies:
52+
This module has a few dependencies:
5353

5454
- [Terraform 0.12](https://learn.hashicorp.com/terraform/getting-started/install.html)
5555
- [Go](https://golang.org/doc/install)
@@ -72,7 +72,7 @@ Here are some examples of how you can use this module in your inventory structur
7272
### Public Hostedzone
7373
```hcl
7474
module "route53" {
75-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
75+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
7676
name = "route53"
7777
application = "clouddrove"
7878
environment = "test"
@@ -104,7 +104,7 @@ Here are some examples of how you can use this module in your inventory structur
104104
### Private Hostedzone
105105
```hcl
106106
module "route53" {
107-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
107+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
108108
name = "route53"
109109
application = "clouddrove"
110110
environment = "test"
@@ -134,7 +134,7 @@ Here are some examples of how you can use this module in your inventory structur
134134
### Vpc Association
135135
```hcl
136136
module "route53" {
137-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
137+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
138138
name = "route53"
139139
application = "clouddrove"
140140
environment = "test"
@@ -157,56 +157,57 @@ Here are some examples of how you can use this module in your inventory structur
157157

158158
| Name | Description | Type | Default | Required |
159159
|------|-------------|:----:|:-----:|:-----:|
160-
| alias | An alias block. Conflicts with ttl & records. Alias record documented below. | list | `<list>` | no |
161-
| allow_overwrites | Allow creation of this record in Terraform to overwrite an existing record, if any. 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. | list | `<list>` | no |
162-
| application | Application (e.g. `cd` or `clouddrove`). | string | `` | no |
163-
| attributes | Additional attributes (e.g. `1`). | list | `<list>` | no |
164-
| comment | A comment for the hosted zone. Defaults to 'Managed by Terraform'. | string | `` | no |
165-
| delegation_set_id | The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with vpc as delegation sets can only be used for public zones. | string | `` | no |
166-
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string | `-` | no |
167-
| domain_name | This is the name of the resource. | string | - | yes |
168-
| enabled | Whether to create Route53 vpc association. | bool | `false` | no |
169-
| environment | Environment (e.g. `prod`, `dev`, `staging`). | string | `` | no |
170-
| failover_enabled | Whether to create Route53 record set. | bool | `false` | no |
171-
| failover_routing_policies | A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. | string | `` | no |
172-
| force_destroy | Whether to destroy all records (possibly managed outside of Terraform) in the zone when destroying the zone. | bool | `true` | no |
173-
| geolocation_enabled | Whether to create Route53 record set. | bool | `false` | no |
174-
| geolocation_routing_policies | A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. | string | `` | no |
175-
| health_check_ids | The health check the record should be associated with. | list | `<list>` | no |
176-
| label_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
177-
| latency_enabled | Whether to create Route53 record set. | bool | `false` | no |
178-
| latency_routing_policies | A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. | string | `` | no |
179-
| multivalue_answer_routing_policies | Set to true to indicate a multivalue answer routing policy. Conflicts with any other routing policy. | list | `<list>` | no |
180-
| name | Name (e.g. `app` or `cluster`). | string | `` | no |
160+
| alias | An alias block. Conflicts with ttl & records. Alias record documented below. | map | `<map>` | no |
161+
| allow\_overwrites | Allow creation of this record in Terraform to overwrite an existing record, if any. 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. | list | `<list>` | no |
162+
| application | Application \(e.g. `cd` or `clouddrove`\). | string | `""` | no |
163+
| attributes | Additional attributes \(e.g. `1`\). | list | `<list>` | no |
164+
| comment | A comment for the hosted zone. Defaults to 'Managed by Terraform'. | string | `""` | no |
165+
| delegation\_set\_id | The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with vpc as delegation sets can only be used for public zones. | string | `""` | no |
166+
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string | `"-"` | no |
167+
| domain\_name | This is the name of the resource. | string | n/a | yes |
168+
| enabled | Whether to create Route53 vpc association. | bool | `"false"` | no |
169+
| environment | Environment \(e.g. `prod`, `dev`, `staging`\). | string | `""` | no |
170+
| failover\_enabled | Whether to create Route53 record set. | bool | `"false"` | no |
171+
| failover\_routing\_policies | A block indicating the routing behavior when associated health check fails. Conflicts with any other routing policy. Documented below. | string | `""` | no |
172+
| force\_destroy | Whether to destroy all records \(possibly managed outside of Terraform\) in the zone when destroying the zone. | bool | `"true"` | no |
173+
| geolocation\_enabled | Whether to create Route53 record set. | bool | `"false"` | no |
174+
| geolocation\_routing\_policies | A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. | string | `""` | no |
175+
| health\_check\_ids | The health check the record should be associated with. | list | `<list>` | no |
176+
| label\_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
177+
| latency\_enabled | Whether to create Route53 record set. | bool | `"false"` | no |
178+
| latency\_routing\_policies | A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. | string | `""` | no |
179+
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | string | `"anmol@clouddrove.com"` | no |
180+
| multivalue\_answer\_routing\_policies | Set to true to indicate a multivalue answer routing policy. Conflicts with any other routing policy. | list | `<list>` | no |
181+
| name | Name \(e.g. `app` or `cluster`\). | string | `""` | no |
181182
| names | The name of the record. | list | `<list>` | no |
182-
| private_enabled | Whether to create private Route53 zone. | bool | `false` | no |
183-
| public_enabled | Whether to create public Route53 zone. | bool | `false` | no |
184-
| record_enabled | Whether to create Route53 record set. | bool | `false` | no |
185-
| record_set_enabled | Whether to create seperate Route53 record set. | bool | `false` | no |
186-
| secondary_vpc_id | The VPC to associate with the private hosted zone. | string | `` | no |
187-
| secondary_vpc_region | The VPC's region. Defaults to the region of the AWS provider. | string | `` | no |
188-
| set_identifiers | Unique identifier to differentiate records with routing policies from one another. Required if using failover, geolocation, latency, or weighted routing policies documented below. | list | `<list>` | no |
189-
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | map | `<map>` | no |
190-
| ttls | (Required for non-alias records) The TTL of the record. | list | `<list>` | no |
183+
| private\_enabled | Whether to create private Route53 zone. | bool | `"false"` | no |
184+
| public\_enabled | Whether to create public Route53 zone. | bool | `"false"` | no |
185+
| record\_enabled | Whether to create Route53 record set. | bool | `"false"` | no |
186+
| record\_set\_enabled | Whether to create seperate Route53 record set. | bool | `"false"` | no |
187+
| secondary\_vpc\_id | The VPC to associate with the private hosted zone. | string | `""` | no |
188+
| secondary\_vpc\_region | The VPC's region. Defaults to the region of the AWS provider. | string | `""` | no |
189+
| set\_identifiers | Unique identifier to differentiate records with routing policies from one another. Required if using failover, geolocation, latency, or weighted routing policies documented below. | list | `<list>` | no |
190+
| tags | Additional tags \(e.g. map\(`BusinessUnit`,`XYZ`\). | map | `<map>` | no |
191+
| ttls | \(Required for non-alias records\) The TTL of the record. | list | `<list>` | no |
191192
| types | The record type. Valid values are A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT. | list | `<list>` | no |
192-
| values | (Required for non-alias records) A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add "" inside the Terraform configuration string (e.g. "first255characters""morecharacters"). | list | `<list>` | no |
193-
| vpc_id | VPC ID. | string | `` | no |
194-
| weighted_enabled | Whether to create Route53 record set. | bool | `false` | no |
195-
| weighted_routing_policies | A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. | string | `` | no |
196-
| zone_id | Zone ID. | string | `` | no |
193+
| values | \(Required for non-alias records\) A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add "" inside the Terraform configuration string \(e.g. "first255characters""morecharacters"\). | list | `<list>` | no |
194+
| vpc\_id | VPC ID. | string | `""` | no |
195+
| weighted\_enabled | Whether to create Route53 record set. | bool | `"false"` | no |
196+
| weighted\_routing\_policies | A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. | string | `""` | no |
197+
| zone\_id | Zone ID. | string | `""` | no |
197198

198199
## Outputs
199200

200201
| Name | Description |
201202
|------|-------------|
202203
| tags | A mapping of tags to assign to the resource. |
203-
| zone_id | The Hosted Zone ID. This can be referenced by zone records. |
204+
| zone\_id | The Hosted Zone ID. This can be referenced by zone records. |
204205

205206

206207

207208

208209
## Testing
209-
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
210+
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
210211

211212
You need to run the following command in the testing folder:
212213
```hcl
@@ -215,7 +216,7 @@ You need to run the following command in the testing folder:
215216

216217

217218

218-
## Feedback
219+
## Feedback
219220
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-route53/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).
220221

221222
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-route53)!
@@ -233,4 +234,4 @@ At [CloudDrove][website], we offer expert guidance, implementation support and s
233234
[linkedin]: https://cpco.io/linkedin
234235
[twitter]: https://twitter.com/clouddrove/
235236
[email]: https://clouddrove.com/contact-us.html
236-
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=
237+
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=

README.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ usage : |-
3737
### Public Hostedzone
3838
```hcl
3939
module "route53" {
40-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
40+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
4141
name = "route53"
4242
application = "clouddrove"
4343
environment = "test"
@@ -69,7 +69,7 @@ usage : |-
6969
### Private Hostedzone
7070
```hcl
7171
module "route53" {
72-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
72+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
7373
name = "route53"
7474
application = "clouddrove"
7575
environment = "test"
@@ -99,7 +99,7 @@ usage : |-
9999
### Vpc Association
100100
```hcl
101101
module "route53" {
102-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
102+
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.1"
103103
name = "route53"
104104
application = "clouddrove"
105105
environment = "test"

_example/private-hostedzone/example.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "route53" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
6+
source = "../../"
77

88
name = "route53"
99
application = "clouddrove"

_example/public-hostedzone/example.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "route53" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
6+
source = "../../"
77

88
name = "route53"
99
application = "clouddrove"

_example/vpc-association/example.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "route53" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-route53.git?ref=tags/0.12.0"
6+
source = "../../"
77

88
name = "route53"
99
application = "clouddrove"

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module "labels" {
1111
name = var.name
1212
application = var.application
1313
environment = var.environment
14+
managedby = var.managedby
1415
label_order = var.label_order
1516
}
1617

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ variable "attributes" {
3030
description = "Additional attributes (e.g. `1`)."
3131
}
3232

33+
variable "managedby" {
34+
type = string
35+
default = "anmol@clouddrove.com"
36+
description = "ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'."
37+
}
38+
3339
variable "delimiter" {
3440
type = string
3541
default = "-"

0 commit comments

Comments
 (0)