Skip to content

Commit f28365f

Browse files
author
rahul-infra
committed
fix: changed github.ref to pullrequest.ref since it points the actual branch.
terraform-docs: automated action feat: added route53 arn and region in examples. Removed extra space in my example variabes.tf
1 parent b6f1a14 commit f28365f

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

.github/workflows/terraform-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4
1515
with:
16-
ref: ${{ github.ref }}
16+
ref: ${{ github.event.pull_request.head.ref }}
1717

1818
- name: Render and Push terraform docs for main module
1919
uses: terraform-docs/gh-actions@main

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Terraform module to deploy production-ready applications and services on an exis
1212
| Name | Version |
1313
|------|---------|
1414
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.0 |
15-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
15+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 6.0 |
1616

1717
## Providers
1818

1919
| Name | Version |
2020
|------|---------|
21-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
21+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 6.0 |
2222

2323
## Modules
2424

@@ -51,6 +51,8 @@ Terraform module to deploy production-ready applications and services on an exis
5151
| <a name="input_create_s3_bucket_for_alb_logging"></a> [create\_s3\_bucket\_for\_alb\_logging](#input\_create\_s3\_bucket\_for\_alb\_logging) | (Optional) Creates S3 bucket for storing ALB Access and Connection Logs. | `bool` | `true` | no |
5252
| <a name="input_default_capacity_providers_strategies"></a> [default\_capacity\_providers\_strategies](#input\_default\_capacity\_providers\_strategies) | (Optional) Set of capacity provider strategies to use by default for the cluster. | `any` | `[]` | no |
5353
| <a name="input_load_balancer"></a> [load\_balancer](#input\_load\_balancer) | Configuration for the Application Load Balancer. | <pre>object({<br/> name = optional(string)<br/> internal = optional(bool, false)<br/> subnets_ids = optional(list(string), [])<br/> security_groups_ids = optional(list(string), [])<br/> preserve_host_header = optional(bool)<br/> enable_deletion_protection = optional(bool, false)<br/> access_logs = optional(any, null)<br/> connection_logs = optional(any, null)<br/> target_groups = optional(any, {})<br/> listeners = optional(any, {})<br/> listener_rules = optional(any, {})<br/> tags = optional(map(string), {})<br/> })</pre> | `{}` | no |
54+
| <a name="input_region"></a> [region](#input\_region) | (Optional) AWS region to create resources in. | `string` | `null` | no |
55+
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | (Optional) ARN of the role to assume for Route53 operations. | `string` | `null` | no |
5456
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | (Optional, Default:false) Boolean that indicates all objects (including any locked objects) should be deleted from the bucket when the bucket is destroyed so that the bucket can be destroyed without error. | `bool` | `false` | no |
5557
| <a name="input_s3_bucket_name"></a> [s3\_bucket\_name](#input\_s3\_bucket\_name) | (Optional, Forces new resource) Name of the bucket. | `string` | `null` | no |
5658
| <a name="input_s3_bucket_policy_id_prefix"></a> [s3\_bucket\_policy\_id\_prefix](#input\_s3\_bucket\_policy\_id\_prefix) | (Optional) - Prefix of the ID for the policy document. | `string` | `"ecs-deployment-alb-"` | no |

examples/complete/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ module "ecs_deployment" {
9393
record_zone_id = data.aws_route53_zone.base_domain.zone_id
9494
}
9595
}
96+
region = var.region
97+
# Cross-account role that ACM module will use for Route53 DNS record creation
98+
route53_assume_role_arn = var.route53_assume_role_arn
9699

97100
# Application Load Balancer
98101
load_balancer = {

examples/complete/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,13 @@ variable "domain_name" {
132132
description = "Domain name for ACM"
133133
type = string
134134
}
135+
136+
variable "region" {
137+
description = "AWS region to deploy resources"
138+
type = string
139+
}
140+
141+
variable "route53_assume_role_arn" {
142+
description = "ARN of the cross-account role for Route53 DNS record creation"
143+
type = string
144+
}

modules/acm/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ This sub-module creates the Amazon-issued certificate for a given domain with `v
2424
| Name | Version |
2525
|------|---------|
2626
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.0 |
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 6.0 |
2728

2829
## Providers
2930

3031
| Name | Version |
3132
|------|---------|
32-
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
33+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 6.0 |
34+
| <a name="provider_aws.dns"></a> [aws.dns](#provider\_aws.dns) | ~> 6.0 |
3335

3436
## Modules
3537

@@ -41,7 +43,8 @@ No modules.
4143
|------|------|
4244
| [aws_acm_certificate.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate) | resource |
4345
| [aws_acm_certificate_validation.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation) | resource |
44-
| [aws_route53_record.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
46+
| [aws_route53_record.cross_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
47+
| [aws_route53_record.same_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
4548

4649
## Inputs
4750

@@ -54,6 +57,7 @@ No modules.
5457
| <a name="input_certificate_validation_option"></a> [certificate\_validation\_option](#input\_certificate\_validation\_option) | (Optional) Configuration block used to specify information about the initial validation of each domain name. | <pre>object({<br/> domain_name = string<br/> validation_domain = string<br/> })</pre> | `null` | no |
5558
| <a name="input_record_allow_overwrite"></a> [record\_allow\_overwrite](#input\_record\_allow\_overwrite) | (Optional) Allow creation of this record in Terraform to overwrite an existing record, if any. | `bool` | `true` | no |
5659
| <a name="input_record_zone_id"></a> [record\_zone\_id](#input\_record\_zone\_id) | (Required) Hosted zone ID for a CloudFront distribution, S3 bucket, ELB, or Route 53 hosted zone. | `string` | n/a | yes |
60+
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | (Optional) IAM role ARN to assume for Route53 operations | `string` | `null` | no |
5761
| <a name="input_tags"></a> [tags](#input\_tags) | (Optional) Map of tags to assign to the resource. | `map(string)` | `{}` | no |
5862

5963
## Outputs
@@ -63,5 +67,5 @@ No modules.
6367
| <a name="output_acm_certificate_arn"></a> [acm\_certificate\_arn](#output\_acm\_certificate\_arn) | ARN of the ACM certificate. |
6468
| <a name="output_acm_certificate_id"></a> [acm\_certificate\_id](#output\_acm\_certificate\_id) | ARN of the ACM certificate. |
6569
| <a name="output_acm_certificate_validation_id"></a> [acm\_certificate\_validation\_id](#output\_acm\_certificate\_validation\_id) | Identifier of the ACM certificate validation resource. |
66-
| <a name="output_route53_record_id"></a> [route53\_record\_id](#output\_route53\_record\_id) | Identifier of the Route53 Record for validation of the ACM certificate. |
70+
| <a name="output_route53_record_id"></a> [route53\_record\_id](#output\_route53\_record\_id) | Identifier of the Route53 Record (supports same & cross-account). |
6771
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)