Skip to content

Commit d8a5274

Browse files
update links
1 parent 82a417d commit d8a5274

File tree

3 files changed

+19
-29
lines changed

3 files changed

+19
-29
lines changed

README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module "dns" {
4848

4949
| Name | Version |
5050
|------|---------|
51-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1 |
51+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1 |
5252

5353
## Providers
5454

@@ -64,39 +64,26 @@ No modules.
6464

6565
| Name | Type |
6666
|------|------|
67-
| [aws_cloudfront_distribution.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) | resource |
68-
| [aws_cloudfront_origin_access_identity.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_access_identity) | resource |
69-
| [aws_cloudfront_response_headers_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/cloudfront_response_headers_policy) | data source |
67+
| [aws_route53_record.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
68+
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
7069

7170
## Inputs
7271

7372
| Name | Description | Type | Default | Required |
7473
|------|-------------|------|---------|:--------:|
75-
| <a name="input_aliases"></a> [aliases](#input\_aliases) | Extra CNAMEs (alternate domain names), if any, for this distribution. | `list(string)` | `null` | no |
76-
| <a name="input_comment"></a> [comment](#input\_comment) | Any comments you want to include about the distribution. | `string` | `"Managed by Terraform"` | no |
77-
| <a name="input_default_cache_behavior"></a> [default\_cache\_behavior](#input\_default\_cache\_behavior) | Default Cache Behviors to be used in dynamic block. | `any` | <pre>{<br> "allowed_methods": [<br> "GET",<br> "HEAD",<br> "OPTIONS"<br> ],<br> "default_ttl": 3600,<br> "max_ttl": 86400,<br> "min_ttl": 0<br>}</pre> | no |
78-
| <a name="input_default_root_object"></a> [default\_root\_object](#input\_default\_root\_object) | The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL. | `string` | `null` | no |
79-
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources. | `bool` | `"true"` | no |
80-
| <a name="input_geo_restrictions"></a> [geo\_restrictions](#input\_geo\_restrictions) | The method that you want to use to restrict distribution of your content by country. | <pre>list(object({<br> locations = list(string)<br> restriction_type = string<br> }))</pre> | <pre>[<br> {<br> "locations": [],<br> "restriction_type": "none"<br> }<br>]</pre> | no |
81-
| <a name="input_is_ipv6_enabled"></a> [is\_ipv6\_enabled](#input\_is\_ipv6\_enabled) | State of CloudFront IPv6 | `bool` | `"false"` | no |
82-
| <a name="input_price_class"></a> [price\_class](#input\_price\_class) | The price class for this distribution. Values: `PriceClass_All`, `PriceClass_200`, `PriceClass_100`. | `string` | `"PriceClass_100"` | no |
83-
| <a name="input_s3_origin_config"></a> [s3\_origin\_config](#input\_s3\_origin\_config) | Configuration for the s3 origin config to be used in dynamic block. | `list(map(string))` | `[]` | no |
84-
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the object. | `map(any)` | `{}` | no |
85-
| <a name="input_viewer_certificate"></a> [viewer\_certificate](#input\_viewer\_certificate) | The SSL configuration for this distribution | `any` | <pre>{<br> "cloudfront_default_certificate": true,<br> "minimum_protocol_version": "TLSv1"<br>}</pre> | no |
74+
| <a name="input_parent_dns_zone_id"></a> [parent\_dns\_zone\_id](#input\_parent\_dns\_zone\_id) | The ID of the hosted zone to contain this record. | `string` | n/a | yes |
75+
| <a name="input_parent_dns_zone_name"></a> [parent\_dns\_zone\_name](#input\_parent\_dns\_zone\_name) | The name of the hosted zone | `string` | n/a | yes |
76+
| <a name="input_subdomain"></a> [subdomain](#input\_subdomain) | Subdomain zone | `string` | n/a | yes |
77+
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the zone. | `map(string)` | `{}` | no |
78+
| <a name="input_ttl"></a> [ttl](#input\_ttl) | The TTL of the recod | `string` | `"30"` | no |
79+
| <a name="input_type"></a> [type](#input\_type) | The record type. Valid values are A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT. | `string` | `"NS"` | no |
8680

8781
## Outputs
8882

8983
| Name | Description |
9084
|------|-------------|
91-
| <a name="output_ai_iam_arn"></a> [ai\_iam\_arn](#output\_ai\_iam\_arn) | Access identity pre-generated ARN for use in S3 bucket policies |
92-
| <a name="output_ai_id"></a> [ai\_id](#output\_ai\_id) | Access identity identifier for the distribution. For example: EDFDVBD632BHDS5 |
93-
| <a name="output_ai_path"></a> [ai\_path](#output\_ai\_path) | Access identity shortcut to the full path for the origin access identity to use in CloudFron |
94-
| <a name="output_cf_arn"></a> [cf\_arn](#output\_cf\_arn) | ARN of AWS CloudFront distribution |
95-
| <a name="output_cf_domain_name"></a> [cf\_domain\_name](#output\_cf\_domain\_name) | Domain name corresponding to the distribution |
96-
| <a name="output_cf_etag"></a> [cf\_etag](#output\_cf\_etag) | Current version of the distribution's information |
97-
| <a name="output_cf_hosted_zone_id"></a> [cf\_hosted\_zone\_id](#output\_cf\_hosted\_zone\_id) | CloudFront Route 53 zone ID |
98-
| <a name="output_cf_id"></a> [cf\_id](#output\_cf\_id) | ID of AWS CloudFront distribution |
99-
| <a name="output_cf_status"></a> [cf\_status](#output\_cf\_status) | Current status of the distribution |
85+
| <a name="output_zone_id"></a> [zone\_id](#output\_zone\_id) | Zone ID for a dns distribution |
86+
| <a name="output_zone_name"></a> [zone\_name](#output\_zone\_name) | The name of the zone record. |
10087
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10188

10289
## Commands

main.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
terraform {
2-
# The modules used in this example have been updated with 0.12 syntax, which means the example is no longer
3-
# compatible with any versions below 0.12.
4-
required_version = ">= 0.12"
2+
required_version = "~> 1"
53
}
64

75
# ========= #
86
# RESOURCES #
97
# ========= #
108

11-
resource aws_route53_zone this {
9+
resource "aws_route53_zone" "this" {
1210
name = format("%s.%s", var.subdomain, var.parent_dns_zone_name)
1311
comment = "${var.subdomain} DNS hosted zone"
1412
tags = var.tags
1513
}
1614

17-
resource aws_route53_record this {
15+
resource "aws_route53_record" "this" {
1816
zone_id = var.parent_dns_zone_id
1917
name = format("%s.%s", var.subdomain, var.parent_dns_zone_name)
2018
type = var.type

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,26 @@
33
# ========= #
44
variable "subdomain" {
55
description = "Subdomain zone"
6+
type = string
67
}
78
variable "parent_dns_zone_name" {
89
description = "The name of the hosted zone"
10+
type = string
911
}
1012
variable "parent_dns_zone_id" {
1113
description = "The ID of the hosted zone to contain this record."
14+
type = string
1215
}
1316
variable "type" {
1417
default = "NS"
1518
description = "The record type. Valid values are A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT."
19+
type = string
1620
}
1721

1822
variable "ttl" {
1923
default = "30"
2024
description = "The TTL of the recod"
25+
type = string
2126
}
2227

2328
variable "tags" {

0 commit comments

Comments
 (0)