Skip to content

Commit 10195a5

Browse files
124 - terraform docs: ecr, dns-entry (#128)
* docs for ecr and dns-entry * terraform-docs: automated updates to Terraform modules README.md --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ad9b8ae commit 10195a5

9 files changed

Lines changed: 41 additions & 80 deletions

File tree

terraform/modules/container/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ No modules.
3535
|------|-------------|------|---------|:--------:|
3636
| <a name="input_additional_host_urls"></a> [additional\_host\_urls](#input\_additional\_host\_urls) | n/a | `list(string)` | `[]` | no |
3737
| <a name="input_application_type"></a> [application\_type](#input\_application\_type) | defines what type of application is running, fullstack, client, backend, etc. will be used for cloudwatch logs | `string` | n/a | yes |
38-
| <a name="input_container_cpu"></a> [container\_cpu](#input\_container\_cpu) | n/a | `number` | `512` | no |
38+
| <a name="input_container_cpu"></a> [container\_cpu](#input\_container\_cpu) | n/a | `number` | `256` | no |
3939
| <a name="input_container_environment"></a> [container\_environment](#input\_container\_environment) | n/a | <pre>list(object({<br/> name = string<br/> value = string<br/> }))</pre> | n/a | yes |
4040
| <a name="input_container_environment_secrets"></a> [container\_environment\_secrets](#input\_container\_environment\_secrets) | n/a | <pre>list(object({<br/> name = string<br/> valueFrom = string<br/> }))</pre> | `[]` | no |
4141
| <a name="input_container_image"></a> [container\_image](#input\_container\_image) | n/a | `string` | n/a | yes |
@@ -44,6 +44,7 @@ No modules.
4444
| <a name="input_environment"></a> [environment](#input\_environment) | n/a | `string` | n/a | yes |
4545
| <a name="input_health_check_path"></a> [health\_check\_path](#input\_health\_check\_path) | n/a | `string` | `"/"` | no |
4646
| <a name="input_hostname"></a> [hostname](#input\_hostname) | n/a | `string` | n/a | yes |
47+
| <a name="input_launch_type"></a> [launch\_type](#input\_launch\_type) | n/a | `string` | `"fargate"` | no |
4748
| <a name="input_listener_priority"></a> [listener\_priority](#input\_listener\_priority) | n/a | `number` | n/a | yes |
4849
| <a name="input_path"></a> [path](#input\_path) | n/a | `string` | `null` | no |
4950
| <a name="input_project_name"></a> [project\_name](#input\_project\_name) | The overall name of the project using this infrastructure; used to group related resources by | `any` | n/a | yes |

terraform/modules/dns-entry/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<!-- BEGIN_TF_DOCS -->
2+
# dns-entry
3+
4+
This is used to create a root DNS entry in Route 53, for example "qa.vrms.io" or "staging.homeunite.us".
5+
The Route 53 DNS entry points to incubator's main ingress (cloudfront or ALB). All services that require
6+
web access (frontends or API backends) should use this.
7+
28
## Requirements
39

410
No requirements.
@@ -18,19 +24,17 @@ No modules.
1824
| Name | Type |
1925
|------|------|
2026
| [aws_route53_record.www](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
21-
| [aws_lb.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lb) | data source |
22-
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
2327

2428
## Inputs
2529

2630
| Name | Description | Type | Default | Required |
2731
|------|-------------|------|---------|:--------:|
28-
| <a name="input_subdomain"></a> [subdomain](#input\_subdomain) | n/a | `string` | n/a | yes |
29-
| <a name="input_zone_id"></a> [zone\_id](#input\_zone\_id) | n/a | `string` | n/a | yes |
32+
| <a name="input_subdomain"></a> [subdomain](#input\_subdomain) | DNS entry - for example, in `qa.vrms.io` the subdomain is `qa` | `string` | n/a | yes |
33+
| <a name="input_zone_id"></a> [zone\_id](#input\_zone\_id) | the Route 53 hosted zone id to create the entry | `string` | n/a | yes |
3034

3135
## Outputs
3236

3337
| Name | Description |
3438
|------|-------------|
35-
| <a name="output_full_dns_name"></a> [full\_dns\_name](#output\_full\_dns\_name) | n/a |
39+
| <a name="output_full_dns_name"></a> [full\_dns\_name](#output\_full\_dns\_name) | full dns name, i.e. `qa.vrms.io` |
3640
<!-- END_TF_DOCS -->

terraform/modules/dns-entry/main.tf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1+
/**
2+
* # dns-entry
3+
*
4+
* This is used to create a root DNS entry in Route 53, for example "qa.vrms.io" or "staging.homeunite.us".
5+
* The Route 53 DNS entry points to incubator's main ingress (cloudfront or ALB). All services that require
6+
* web access (frontends or API backends) should use this.
7+
*
8+
*/
19

10+
// terraform-docs-ignore
211
data "aws_route53_zone" "this" {
312
zone_id = var.zone_id
413
}
514

6-
15+
// terraform-docs-ignore
716
data "aws_lb" "this" {
817
arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36"
918
}
1019

11-
12-
1320
resource "aws_route53_record" "www" {
1421
zone_id = var.zone_id
1522
name = var.subdomain
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
output "full_dns_name" {
22
value = "${var.subdomain}.${data.aws_route53_zone.this.name}"
3+
description = "full dns name, i.e. `qa.vrms.io`"
34
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
variable "zone_id" {
22
type = string
3+
description = "the Route 53 hosted zone id to create the entry"
34
}
45

56

67
variable "subdomain" {
78
type = string
9+
description = "DNS entry - for example, in `qa.vrms.io` the subdomain is `qa`"
810
}

terraform/modules/ecr/.terraform.docs.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

terraform/modules/ecr/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<!-- BEGIN_TF_DOCS -->
2+
# ecr
3+
4+
This creates a standard Elastic Container Registry docker registry.
5+
26
## Requirements
37

48
No requirements.
@@ -23,12 +27,12 @@ No modules.
2327

2428
| Name | Description | Type | Default | Required |
2529
|------|-------------|------|---------|:--------:|
26-
| <a name="input_project_name"></a> [project\_name](#input\_project\_name) | The overall name of the project using this infrastructure; used to group related resources by | `string` | n/a | yes |
30+
| <a name="input_project_name"></a> [project\_name](#input\_project\_name) | HfLA project name (vrms, home-unite-us, etc) | `string` | n/a | yes |
2731

2832
## Outputs
2933

3034
| Name | Description |
3135
|------|-------------|
32-
| <a name="output_arn"></a> [arn](#output\_arn) | n/a |
33-
| <a name="output_repository_url"></a> [repository\_url](#output\_repository\_url) | n/a |
36+
| <a name="output_arn"></a> [arn](#output\_arn) | ARN of the created ECR repository |
37+
| <a name="output_repository_url"></a> [repository\_url](#output\_repository\_url) | URL of the docker repository repo |
3438
<!-- END_TF_DOCS -->

terraform/modules/ecr/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// XXX Decommision - not enough here to merit separate module
2-
// --------------------------
3-
// General Variables
4-
// --------------------------
1+
/**
2+
* # ecr
3+
*
4+
* This creates a standard Elastic Container Registry docker registry.
5+
*
6+
*/
7+
58

69
variable "project_name" {
710
type = string
8-
description = "The overall name of the project using this infrastructure; used to group related resources by"
11+
description = "HfLA project name (vrms, home-unite-us, etc)"
912
}
1013

11-
// --------------------------
12-
// Elastic Container Repository
13-
// --------------------------
1414
resource "aws_ecr_repository" "this" {
1515
name = var.project_name
1616
image_tag_mutability = "MUTABLE"

terraform/modules/ecr/outputs.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
output "arn" {
22
value = aws_ecr_repository.this.arn
3+
description = "ARN of the created ECR repository"
34
}
45

56
output "repository_url" {
67
value = aws_ecr_repository.this.repository_url
8+
description = "URL of the docker repository repo"
79
}

0 commit comments

Comments
 (0)