Skip to content

Commit f25b585

Browse files
github-actions[bot]rahul-infra
authored andcommitted
terraform-docs: automated action
reverted badck terraform version.
1 parent ec50153 commit f25b585

File tree

4 files changed

+23
-129
lines changed

4 files changed

+23
-129
lines changed

.github/workflows/terraform-checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Terraform
1616
uses: hashicorp/setup-terraform@v3
1717
with:
18-
terraform_version: "1.14.0"
18+
terraform_version: "1.13.1"
1919

2020
- name: Initialize Terraform
2121
id: init

examples/complete/README.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
<!-- BEGIN_TF_DOCS -->
2-
# Complete Example
3-
4-
This example demonstrates a **production-ready Kong deployment** with all configurable options, including RDS settings, ECS task configuration, monitoring, and cross-account Route53 support.
5-
6-
## Use Case
7-
8-
Use this example when you need:
9-
- Full control over RDS database configuration (instance class, storage, backup retention, multi-AZ, etc.)
10-
- Custom ECS task settings (CPU, memory, logging)
11-
- Performance insights and monitoring
12-
- Production-grade setup with deletion protection and backups
13-
- Flexible Route53 DNS configuration (same-account or cross-account)
14-
15-
## Key Features
16-
17-
- Comprehensive RDS PostgreSQL configuration with performance insights
18-
- Multi-AZ deployment support for high availability
19-
- Customizable ECS task resources and logging
20-
- SSL/TLS configuration with custom SSL policies
21-
- Cross-account Route53 support via assume role
22-
- Production backup and maintenance windows
23-
24-
## Usage
25-
262
### Example Variable Values
273

284
Here is an example of how to define the variable values in your `terraform.tfvars` file:
@@ -65,6 +41,10 @@ cpu_for_kong_task = 512
6541
memory_for_kong_task = 1024
6642
desired_count_for_kong_service = 2
6743
force_new_deployment = true
44+
postgres_engine_version = 16.3
45+
postgres_major_engine_version = 16
46+
route53_assume_role_arn = arn:aws:iam::aws-account-id:role/role-name
47+
region = us-east-1
6848
```
6949

7050
Place this `terraform.tfvars` file in the same directory as your Terraform configuration to automatically load these values. Adjust the values as needed to fit your specific environment and requirements.
@@ -74,6 +54,7 @@ Place this `terraform.tfvars` file in the same directory as your Terraform confi
7454
| Name | Version |
7555
|------|---------|
7656
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.13.0 |
57+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
7758

7859
## Providers
7960

@@ -118,6 +99,8 @@ No resources.
11899
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
119100
| <a name="input_rds_db_tags"></a> [rds\_db\_tags](#input\_rds\_db\_tags) | List of tags | `map(string)` | n/a | yes |
120101
| <a name="input_rds_instance_class"></a> [rds\_instance\_class](#input\_rds\_instance\_class) | The instance class to use | `string` | n/a | yes |
102+
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
103+
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | IAM role ARN for cross-account Route53 access. | `string` | n/a | yes |
121104
| <a name="input_ssl_policy"></a> [ssl\_policy](#input\_ssl\_policy) | (Optional) Name of the SSL Policy for the listener. | `string` | n/a | yes |
122105
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
123106

examples/cross-accout/README.md

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,4 @@
11
<!-- BEGIN_TF_DOCS -->
2-
# Cross-Account Example
3-
4-
This example demonstrates Kong deployment with **Route53 hosted zone in a different AWS account** using cross-account IAM role assumption.
5-
6-
## Use Case
7-
8-
Use this example when:
9-
- Your Route53 hosted zone is managed in a separate AWS account (common in enterprise setups)
10-
- You have a centralized DNS management account
11-
- You need to manage DNS records across AWS accounts
12-
- You follow security best practices with separate accounts for different concerns
13-
14-
## Key Features
15-
16-
- Cross-account Route53 DNS record management
17-
- IAM role assumption for secure cross-account access
18-
- Separate provider configuration for DNS operations
19-
- Minimal configuration with module defaults for other resources
20-
- Secure cross-account permissions model
21-
22-
## Provider Configuration
23-
24-
This example uses two providers:
25-
1. **Default provider** - For Kong infrastructure (VPC, ECS, RDS, ALB)
26-
2. **Cross-account provider** - For Route53 DNS records in a different account
27-
28-
```hcl
29-
provider "aws" {
30-
alias = "cross_account_provider"
31-
region = var.region
32-
assume_role {
33-
role_arn = var.route53_assume_role_arn # IAM role in DNS account
34-
}
35-
}
36-
```
37-
38-
## Prerequisites
39-
40-
1. An IAM role must exist in the Route53 account that allows the Kong account to assume it
41-
2. The role should have permissions to manage Route53 records
42-
3. Example trust policy for the IAM role in the DNS account:
43-
44-
```json
45-
{
46-
"Version": "2012-10-17",
47-
"Statement": [
48-
{
49-
"Effect": "Allow",
50-
"Principal": {
51-
"AWS": "arn:aws:iam::KONG_ACCOUNT_ID:root"
52-
},
53-
"Action": "sts:AssumeRole"
54-
}
55-
]
56-
}
57-
```
58-
59-
## Usage
60-
612
### Example Variable Values
623

634
Here is an example of how to define the variable values in your `terraform.tfvars` file:
@@ -68,12 +9,8 @@ public_subnet_ids = ["subnet-abcdef01", "subnet-abcdef02"]
689
private_subnet_ids = ["subnet-abcdef03", "subnet-abcdef04"]
6910
kong_public_domain_name = "api.example.com"
7011
kong_admin_domain_name = "admin-api.example.com"
71-
72-
# Cross-account Route53 IAM role (in the DNS account)
73-
route53_assume_role_arn = "arn:aws:iam::DNS_ACCOUNT_ID:role/route53-cross-account-role"
74-
75-
region = "ap-south-1"
76-
cluster_name = "default"
12+
region = "us-east-1"
13+
route53_assume_role_arn = "arn:aws:iam::account-id:role/role-id"
7714
```
7815

7916
Place this `terraform.tfvars` file in the same directory as your Terraform configuration to automatically load these values. Adjust the values as needed to fit your specific environment and requirements.
@@ -83,6 +20,7 @@ Place this `terraform.tfvars` file in the same directory as your Terraform confi
8320
| Name | Version |
8421
|------|---------|
8522
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.13.0 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
8624

8725
## Providers
8826

@@ -102,10 +40,15 @@ No resources.
10240

10341
| Name | Description | Type | Default | Required |
10442
|------|-------------|------|---------|:--------:|
43+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the cluster | `string` | n/a | yes |
10544
| <a name="input_kong_admin_domain_name"></a> [kong\_admin\_domain\_name](#input\_kong\_admin\_domain\_name) | The admin domain name for Kong | `string` | n/a | yes |
10645
| <a name="input_kong_public_domain_name"></a> [kong\_public\_domain\_name](#input\_kong\_public\_domain\_name) | The public domain name for Kong | `string` | n/a | yes |
46+
| <a name="input_postgres_engine_version"></a> [postgres\_engine\_version](#input\_postgres\_engine\_version) | The version of the Postgres engine | `number` | n/a | yes |
47+
| <a name="input_postgres_major_engine_version"></a> [postgres\_major\_engine\_version](#input\_postgres\_major\_engine\_version) | The major version of the Postgres engine | `number` | n/a | yes |
10748
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of private subnet IDs | `list(string)` | n/a | yes |
10849
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
50+
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
51+
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | The ARN of the DNS role | `string` | `null` | no |
10952
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
11053

11154
## Outputs

examples/same-account/README.md

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,4 @@
11
<!-- BEGIN_TF_DOCS -->
2-
# Same Account Example
3-
4-
This example demonstrates a **minimal Kong deployment** where all AWS resources, including the Route53 hosted zone, are in the **same AWS account**.
5-
6-
## Use Case
7-
8-
Use this example when:
9-
- Your Route53 hosted zone is in the same AWS account as your Kong infrastructure
10-
- You want a simple deployment without cross-account complexity
11-
- You're setting up development, staging, or testing environments
12-
- You need minimal configuration with sensible defaults
13-
14-
## Key Features
15-
16-
- Single AWS account setup (no cross-account assume role required)
17-
- Minimal required variables (VPC, subnets, domain names)
18-
- Uses module defaults for RDS and ECS configuration
19-
- Simplified provider configuration
20-
- Quick setup for non-production environments
21-
22-
## Provider Configuration
23-
24-
Note that `cross_account_provider` points to the same default AWS provider:
25-
26-
```hcl
27-
providers = {
28-
aws = aws
29-
aws.cross_account_provider = aws # Same account
30-
}
31-
```
32-
33-
## Usage
34-
352
### Example Variable Values
363

374
Here is an example of how to define the variable values in your `terraform.tfvars` file:
@@ -42,12 +9,7 @@ public_subnet_ids = ["subnet-abcdef01", "subnet-abcdef02"]
429
private_subnet_ids = ["subnet-abcdef03", "subnet-abcdef04"]
4310
kong_public_domain_name = "api.example.com"
4411
kong_admin_domain_name = "admin-api.example.com"
45-
46-
# Same-account setup - no cross-account role needed
47-
route53_assume_role_arn = null
48-
49-
region = "ap-south-1"
50-
cluster_name = "default"
12+
region = "us-east-1"
5113
```
5214

5315
Place this `terraform.tfvars` file in the same directory as your Terraform configuration to automatically load these values. Adjust the values as needed to fit your specific environment and requirements.
@@ -57,6 +19,7 @@ Place this `terraform.tfvars` file in the same directory as your Terraform confi
5719
| Name | Version |
5820
|------|---------|
5921
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.13.0 |
22+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
6023

6124
## Providers
6225

@@ -76,10 +39,15 @@ No resources.
7639

7740
| Name | Description | Type | Default | Required |
7841
|------|-------------|------|---------|:--------:|
42+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the cluster | `string` | n/a | yes |
7943
| <a name="input_kong_admin_domain_name"></a> [kong\_admin\_domain\_name](#input\_kong\_admin\_domain\_name) | The admin domain name for Kong | `string` | n/a | yes |
8044
| <a name="input_kong_public_domain_name"></a> [kong\_public\_domain\_name](#input\_kong\_public\_domain\_name) | The public domain name for Kong | `string` | n/a | yes |
45+
| <a name="input_postgres_engine_version"></a> [postgres\_engine\_version](#input\_postgres\_engine\_version) | The version of the Postgres engine | `number` | n/a | yes |
46+
| <a name="input_postgres_major_engine_version"></a> [postgres\_major\_engine\_version](#input\_postgres\_major\_engine\_version) | The major version of the Postgres engine | `number` | n/a | yes |
8147
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of private subnet IDs | `list(string)` | n/a | yes |
8248
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
49+
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
50+
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | The ARN of the DNS role | `string` | `null` | no |
8351
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
8452

8553
## Outputs

0 commit comments

Comments
 (0)