Skip to content

Commit c4d8f29

Browse files
Push pre-commit changes
1 parent fe71391 commit c4d8f29

File tree

19 files changed

+128
-98
lines changed

19 files changed

+128
-98
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Terraform will display a plan showing the changes it intends to make. Review the
148148
| <a name="module_acm"></a> [acm](#module\_acm) | git::https://github.com/cloudposse/terraform-aws-acm-request-certificate | 0.17.0 |
149149
| <a name="module_alb"></a> [alb](#module\_alb) | ./modules/alb | n/a |
150150
| <a name="module_alb_sg"></a> [alb\_sg](#module\_alb\_sg) | git::https://github.com/cloudposse/terraform-aws-security-group | 2.0.0 |
151-
| <a name="module_ecs"></a> [ecs](#module\_ecs) | git::https://github.com/terraform-aws-modules/terraform-aws-ecs | v5.11.1 |
151+
| <a name="module_ecs"></a> [ecs](#module\_ecs) | ./modules/ecs | n/a |
152152
| <a name="module_health_check"></a> [health\_check](#module\_health\_check) | ./modules/health-check | n/a |
153153

154154
## Resources

example/alb/.terraform.lock.hcl

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/alb/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ module "alb" {
1515
vpc_id = "vpc-123445"
1616

1717
alb = {
18-
name = "arc-poc-alb"
18+
name = "arc-poc-alb"
1919
internal = false
20-
subnets = ["subnet-1123", "subnet-1113"]
20+
subnets = ["subnet-1123", "subnet-1113"]
2121
}
2222

2323
alb_target_group = [{
24-
name = "arc-poc-alb-tg"
25-
port = 80
24+
name = "arc-poc-alb-tg"
25+
port = 80
2626
protocol = "HTTP"
27-
vpc_id = "vpc-123445"
27+
vpc_id = "vpc-123445"
2828
health_check = {
2929
enabled = true
30-
path = "/"
30+
path = "/"
3131
}
3232
}]
3333

3434
listener_rules = []
35-
}
35+
}

example/ecs-cluster/README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,22 @@ Example demonstrating how to use terraform-aws-refarch-ecs.
1111
| Name | Version |
1212
|------|---------|
1313
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.5 |
14-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
14+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
1515

1616
## Providers
1717

18-
| Name | Version |
19-
|------|---------|
20-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.67.0 |
18+
No providers.
2119

2220
## Modules
2321

2422
| Name | Source | Version |
2523
|------|--------|---------|
26-
| <a name="module_ecs"></a> [ecs](#module\_ecs) | sourcefuse/arc-ecs/aws | n/a |
24+
| <a name="module_ecs"></a> [ecs](#module\_ecs) | ../modules/ecs | n/a |
2725
| <a name="module_tags"></a> [tags](#module\_tags) | sourcefuse/arc-tags/aws | 1.2.3 |
2826

2927
## Resources
3028

31-
| Name | Type |
32-
|------|------|
33-
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
34-
| [aws_subnets.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
35-
| [aws_subnets.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
36-
| [aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
29+
No resources.
3730

3831
## Inputs
3932

@@ -50,10 +43,5 @@ Example demonstrating how to use terraform-aws-refarch-ecs.
5043

5144
## Outputs
5245

53-
| Name | Description |
54-
|------|-------------|
55-
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | ECS Cluster ARN |
56-
| <a name="output_cluster_id"></a> [cluster\_id](#output\_cluster\_id) | ECS Cluster ID |
57-
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | Name of the ECS Cluster |
58-
| <a name="output_health_check_fqdn"></a> [health\_check\_fqdn](#output\_health\_check\_fqdn) | Health check FQDN record created in Route 53. |
46+
No outputs.
5947
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

example/ecs-cluster/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ module "ecs" {
4141
cluster_service_connect_defaults = []
4242
create_cloudwatch_log_group = true
4343
cluster_service_connect_defaults = {}
44-
cluster_settings = []
44+
cluster_settings = []
4545
cluster_configuration = {
46-
execute_command_configuration = {
47-
logging = "OVERRIDE"
48-
log_configuration = {
49-
cloud_watch_log_group_name = "arc-poc-cluster-log-group"
50-
}
46+
execute_command_configuration = {
47+
logging = "OVERRIDE"
48+
log_configuration = {
49+
cloud_watch_log_group_name = "arc-poc-cluster-log-group"
5150
}
51+
}
5252
}
5353

5454
}
@@ -63,7 +63,7 @@ module "ecs" {
6363
autoscaling_capacity_providers = {}
6464
fargate_capacity_providers = {
6565
fargate_cp = {
66-
name = "FARGATE"
66+
name = "FARGATE"
6767
tags = {
6868
Environment = "poc"
6969
}

main.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,36 @@ terraform {
1616
## cluster
1717
################################################################################
1818
module "ecs" {
19-
source = "./modules/ecs"
19+
source = "./modules/ecs"
2020

2121
create = true
2222

2323
ecs_cluster = {
24-
cluster_name = "my-ecs-cluster"
24+
cluster_name = "my-ecs-cluster"
2525
cluster_service_connect_defaults = []
26-
create_cloudwatch_log_group = false
27-
26+
create_cloudwatch_log_group = false
27+
2828
}
2929

3030
cloudwatch = {
31-
log_group_name = "my-cloudwatch-log-group"
31+
log_group_name = "my-cloudwatch-log-group"
3232
log_group_retention_in_days = 7
33-
log_group_kms_key_id = null
34-
log_group_tags = { Environment = "production" }
33+
log_group_kms_key_id = null
34+
log_group_tags = { Environment = "production" }
3535
}
3636

3737
capacity_provider = {
3838
autoscaling_capacity_providers = {
3939
my-provider = {
40-
name = "my-autoscaling-provider"
41-
auto_scaling_group_arn = "arn:aws:autoscaling:region:account-id:autoScalingGroup:autoScalingGroupName/my-asg"
42-
managed_scaling = { instance_warmup_period = 300, maximum_scaling_step_size = 10, minimum_scaling_step_size = 1, status = "ENABLED", target_capacity = 100 }
40+
name = "my-autoscaling-provider"
41+
auto_scaling_group_arn = "arn:aws:autoscaling:region:account-id:autoScalingGroup:autoScalingGroupName/my-asg"
42+
managed_scaling = { instance_warmup_period = 300, maximum_scaling_step_size = 10, minimum_scaling_step_size = 1, status = "ENABLED", target_capacity = 100 }
4343
managed_termination_protection = "ENABLED"
44-
managed_draining = "ENABLED"
45-
tags = { Environment = "production" }
44+
managed_draining = "ENABLED"
45+
tags = { Environment = "production" }
4646
}
4747
}
48-
fargate_capacity_providers = {}
48+
fargate_capacity_providers = {}
4949
default_capacity_provider_use_fargate = false
5050
}
5151

modules/alb/.terraform.lock.hcl

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/alb/README.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,48 @@ AWS Terraform ALB Module
99

1010
| Name | Version |
1111
|------|---------|
12-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
13-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.30 |
12+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.5 |
13+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
1414

1515
## Providers
1616

17-
No providers.
17+
| Name | Version |
18+
|------|---------|
19+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.80.0 |
1820

1921
## Modules
2022

21-
| Name | Source | Version |
22-
|------|--------|---------|
23-
| <a name="module_alb"></a> [alb](#module\_alb) | git::https://github.com/cloudposse/terraform-aws-alb | 1.5.0 |
23+
No modules.
2424

2525
## Resources
2626

27-
No resources.
27+
| Name | Type |
28+
|------|------|
29+
| [aws_lb.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) | resource |
30+
| [aws_lb_listener.http](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener) | resource |
31+
| [aws_lb_listener_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule) | resource |
32+
| [aws_lb_target_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |
33+
| [aws_security_group.lb_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
34+
| [aws_subnets.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
2835

2936
## Inputs
3037

3138
| Name | Description | Type | Default | Required |
3239
|------|-------------|------|---------|:--------:|
33-
| <a name="input_access_logs_enabled"></a> [access\_logs\_enabled](#input\_access\_logs\_enabled) | A boolean flag to enable/disable access\_logs | `bool` | `true` | no |
34-
| <a name="input_alb_access_logs_s3_bucket_force_destroy"></a> [alb\_access\_logs\_s3\_bucket\_force\_destroy](#input\_alb\_access\_logs\_s3\_bucket\_force\_destroy) | A boolean that indicates all objects should be deleted from the ALB access logs S3 bucket so that the bucket can be destroyed without error | `bool` | `false` | no |
35-
| <a name="input_alb_access_logs_s3_bucket_force_destroy_enabled"></a> [alb\_access\_logs\_s3\_bucket\_force\_destroy\_enabled](#input\_alb\_access\_logs\_s3\_bucket\_force\_destroy\_enabled) | When `true`, permits `force_destroy` to be set to `true`.<br>This is an extra safety precaution to reduce the chance that Terraform will destroy and recreate<br>your S3 bucket, causing COMPLETE LOSS OF ALL DATA even if it was stored in Glacier.<br>WARNING: Upgrading this module from a version prior to 0.27.0 to this version<br> will cause Terraform to delete your existing S3 bucket CAUSING COMPLETE DATA LOSS<br> unless you follow the upgrade instructions on the Wiki [here](https://github.com/cloudposse/terraform-aws-s3-log-storage/wiki/Upgrading-to-v0.27.0-(POTENTIAL-DATA-LOSS)).<br> See additional instructions for upgrading from v0.27.0 to v0.28.0 [here](https://github.com/cloudposse/terraform-aws-s3-log-storage/wiki/Upgrading-to-v0.28.0-and-AWS-provider-v4-(POTENTIAL-DATA-LOSS)). | `bool` | `false` | no |
36-
| <a name="input_cross_zone_load_balancing_enabled"></a> [cross\_zone\_load\_balancing\_enabled](#input\_cross\_zone\_load\_balancing\_enabled) | A boolean flag to enable/disable cross zone load balancing | `bool` | `true` | no |
37-
| <a name="input_deletion_protection_enabled"></a> [deletion\_protection\_enabled](#input\_deletion\_protection\_enabled) | A boolean flag to enable/disable deletion protection for ALB | `bool` | `false` | no |
38-
| <a name="input_deregistration_delay"></a> [deregistration\_delay](#input\_deregistration\_delay) | The amount of time to wait in seconds before changing the state of a deregistering target to unused | `number` | `15` | no |
39-
| <a name="input_http_ingress_cidr_blocks"></a> [http\_ingress\_cidr\_blocks](#input\_http\_ingress\_cidr\_blocks) | List of CIDR blocks to allow in HTTP security group | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
40-
| <a name="input_https_ingress_cidr_blocks"></a> [https\_ingress\_cidr\_blocks](#input\_https\_ingress\_cidr\_blocks) | List of CIDR blocks to allow in HTTPS security group | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
41-
| <a name="input_idle_timeout"></a> [idle\_timeout](#input\_idle\_timeout) | The time in seconds that the connection is allowed to be idle | `number` | `60` | no |
42-
| <a name="input_internal"></a> [internal](#input\_internal) | Internal or external facing ALB. | `bool` | `false` | no |
43-
| <a name="input_ip_address_type"></a> [ip\_address\_type](#input\_ip\_address\_type) | The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. | `string` | `"ipv4"` | no |
44-
| <a name="input_name"></a> [name](#input\_name) | Name to assign the resource | `string` | `""` | no |
45-
| <a name="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids) | Security group Ids for access | `list(string)` | n/a | yes |
46-
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | Subnet Ids assigned to the LB | `list(string)` | n/a | yes |
47-
| <a name="input_tags"></a> [tags](#input\_tags) | Tags to assign the resources | `map(string)` | `{}` | no |
48-
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | Id of the VPC where the resources will live | `string` | n/a | yes |
40+
| <a name="input_alb"></a> [alb](#input\_alb) | n/a | <pre>object({<br> name = optional(string, null)<br> port = optional(number)<br> protocol = optional(string, "HTTP")<br> internal = optional(bool, false)<br> load_balancer_type = optional(string, "application")<br> idle_timeout = optional(number, 60)<br> enable_deletion_protection = optional(bool, false)<br> enable_http2 = optional(bool, true)<br> certificate_arn = optional(string, null)<br> subnets = list(string)<br><br> access_logs = optional(object({<br> bucket = string<br> enabled = optional(bool, false)<br> prefix = optional(string, "")<br> }))<br><br> tags = optional(map(string), {})<br> })</pre> | n/a | yes |
41+
| <a name="input_alb_target_group"></a> [alb\_target\_group](#input\_alb\_target\_group) | List of target groups to create | <pre>list(object({<br> name = optional(string, "target-group")<br> port = number<br> protocol = optional(string, null)<br> protocol_version = optional(string, "HTTP1")<br> vpc_id = optional(string, "")<br> target_type = optional(string, "instance")<br> ip_address_type = optional(string, "ipv4")<br> load_balancing_algorithm_type = optional(string, "round_robin")<br> load_balancing_cross_zone_enabled = optional(string, "use_load_balancer_configuration")<br> deregistration_delay = optional(number, 300)<br> slow_start = optional(number, 0)<br> tags = optional(map(string), {})<br><br> health_check = optional(object({<br> enabled = optional(bool, true)<br> protocol = optional(string, "HTTP") # Allowed values: "HTTP", "HTTPS", "TCP", etc.<br> path = optional(string, "/")<br> port = optional(string, "traffic-port")<br> timeout = optional(number, 6)<br> healthy_threshold = optional(number, 3)<br> unhealthy_threshold = optional(number, 3)<br> interval = optional(number, 30)<br> matcher = optional(string, "200") # Default HTTP matcher. Range 200 to 499<br> }))<br><br> stickiness = optional(object({<br> enabled = optional(bool, true)<br> type = string<br> cookie_duration = optional(number, 86400)<br> })<br> )<br><br> }))</pre> | n/a | yes |
42+
| <a name="input_create_alb"></a> [create\_alb](#input\_create\_alb) | A flag that decides whether to create alb | `bool` | `false` | no |
43+
| <a name="input_create_listener_rule"></a> [create\_listener\_rule](#input\_create\_listener\_rule) | n/a | `bool` | `false` | no |
44+
| <a name="input_listener_rules"></a> [listener\_rules](#input\_listener\_rules) | List of listener rules to create | <pre>list(object({<br> # listener_arn = string<br> priority = number<br><br> conditions = list(object({<br> field = string<br> values = list(string)<br> }))<br><br> actions = list(object({<br> type = string<br> target_group_arn = optional(string)<br> order = optional(number)<br> redirect = optional(object({<br> protocol = string<br> port = string<br> host = optional(string)<br> path = optional(string)<br> query = optional(string)<br> status_code = string<br> }), null)<br><br> fixed_response = optional(object({<br> content_type = string<br> message_body = optional(string)<br> status_code = optional(string)<br> }), null)<br><br> }))<br><br> }))</pre> | n/a | yes |
45+
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `"us-east-1"` | no |
46+
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | VPC in which security group for ALB has to be created | `string` | n/a | yes |
4947

5048
## Outputs
5149

5250
| Name | Description |
5351
|------|-------------|
54-
| <a name="output_alb_arn"></a> [alb\_arn](#output\_alb\_arn) | ARN to the ALB |
55-
| <a name="output_alb_dns_name"></a> [alb\_dns\_name](#output\_alb\_dns\_name) | External DNS name to the ALB |
56-
| <a name="output_alb_name"></a> [alb\_name](#output\_alb\_name) | Name of the ALB |
57-
| <a name="output_alb_zone_id"></a> [alb\_zone\_id](#output\_alb\_zone\_id) | Zone ID of the ALB |
52+
| <a name="output_alb_subnets_debug"></a> [alb\_subnets\_debug](#output\_alb\_subnets\_debug) | n/a |
53+
| <a name="output_public_subnet_ids"></a> [public\_subnet\_ids](#output\_public\_subnet\_ids) | List of IDs of the public subnets in the specified VPC |
5854
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5955

6056
## Development

modules/alb/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ resource "aws_lb_listener" "http" {
150150
target_group_arn = aws_lb_target_group.this[var.alb_target_group[0].name].arn
151151
}
152152

153-
# Dynamic "default_action" for variable-driven actions
153+
# Dynamic "default_action" for variable-driven actions
154154
dynamic "default_action" {
155155
for_each = var.listener_rules
156156

modules/alb/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ output "alb_zone_id" {
2323

2424

2525
output "public_subnet_ids" {
26-
value = data.aws_subnets.public
26+
value = data.aws_subnets.public
2727
description = "List of IDs of the public subnets in the specified VPC"
2828
}
2929

0 commit comments

Comments
 (0)