From 231e08778563ffd849a8172f00305553f3876157 Mon Sep 17 00:00:00 2001 From: Oscar Jara Date: Mon, 8 Aug 2022 13:13:53 -0300 Subject: [PATCH 1/3] assign efs volumes configuration to efs_volume variable in ecs_alb_service_task module --- main.tf | 1 + variables.tf | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 7ed9ad51..00fd0909 100644 --- a/main.tf +++ b/main.tf @@ -163,6 +163,7 @@ module "ecs_alb_service_task" { container_port = var.container_port nlb_container_port = var.nlb_container_port docker_volumes = var.volumes + efs_volumes = var.efs_volumes ecs_load_balancers = local.load_balancers deployment_controller_type = var.deployment_controller_type force_new_deployment = var.force_new_deployment diff --git a/variables.tf b/variables.tf index 0abe9554..311e505c 100644 --- a/variables.tf +++ b/variables.tf @@ -228,6 +228,15 @@ variable "volumes" { labels = map(string) scope = string })) + })) + description = "Task volume definitions as list of configuration objects" + default = [] +} + +variable "efs_volumes" { + type = list(object({ + host_path = string + name = string efs_volume_configuration = list(object({ file_system_id = string root_directory = string @@ -239,7 +248,7 @@ variable "volumes" { })) })) })) - description = "Task volume definitions as list of configuration objects" + description = "Task volume definitions as list of configuration objects. EFS volumes only." default = [] } From 8b305e94cc6ebb636c77a0ad0266f7c2950d2f40 Mon Sep 17 00:00:00 2001 From: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> Date: Mon, 8 Aug 2022 17:27:10 +0000 Subject: [PATCH 2/3] Auto Format --- .github/auto-release.yml | 1 - README.md | 3 ++- docs/terraform.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/auto-release.yml b/.github/auto-release.yml index b45efb7a..17cd39c8 100644 --- a/.github/auto-release.yml +++ b/.github/auto-release.yml @@ -17,7 +17,6 @@ version-resolver: - 'bugfix' - 'bug' - 'hotfix' - - 'no-release' default: 'minor' categories: diff --git a/README.md b/README.md index 6d48b633..a70537dd 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,7 @@ Available targets: | [ecs\_cluster\_name](#input\_ecs\_cluster\_name) | The ECS Cluster Name to use in ECS Code Pipeline Deployment step | `string` | `null` | no | | [ecs\_private\_subnet\_ids](#input\_ecs\_private\_subnet\_ids) | List of Private Subnet IDs to provision ECS Service onto if `var.network_mode = "awsvpc"` | `list(string)` | n/a | yes | | [ecs\_security\_group\_ids](#input\_ecs\_security\_group\_ids) | Additional Security Group IDs to allow into ECS Service if `var.network_mode = "awsvpc"` | `list(string)` | `[]` | no | +| [efs\_volumes](#input\_efs\_volumes) | Task volume definitions as list of configuration objects. EFS volumes only. |
list(object({
host_path = string
name = string
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
transit_encryption = string
transit_encryption_port = string
authorization_config = list(object({
access_point_id = string
iam = string
}))
}))
}))
| `[]` | no | | [enable\_all\_egress\_rule](#input\_enable\_all\_egress\_rule) | A flag to enable/disable adding the all ports egress rule to the ECS security group | `bool` | `true` | no | | [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags) | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no | | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | @@ -369,7 +370,7 @@ Available targets: | [use\_alb\_security\_group](#input\_use\_alb\_security\_group) | A boolean to enable adding an ALB security group rule for the service task | `bool` | `false` | no | | [use\_ecr\_image](#input\_use\_ecr\_image) | If true, use ECR repo URL for image, otherwise use value in container\_image | `bool` | `false` | no | | [use\_nlb\_cidr\_blocks](#input\_use\_nlb\_cidr\_blocks) | A flag to enable/disable adding the NLB ingress rule to the security group | `bool` | `false` | no | -| [volumes](#input\_volumes) | Task volume definitions as list of configuration objects |
list(object({
host_path = string
name = string
docker_volume_configuration = list(object({
autoprovision = bool
driver = string
driver_opts = map(string)
labels = map(string)
scope = string
}))
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
transit_encryption = string
transit_encryption_port = string
authorization_config = list(object({
access_point_id = string
iam = string
}))
}))
}))
| `[]` | no | +| [volumes](#input\_volumes) | Task volume definitions as list of configuration objects |
list(object({
host_path = string
name = string
docker_volume_configuration = list(object({
autoprovision = bool
driver = string
driver_opts = map(string)
labels = map(string)
scope = string
}))
}))
| `[]` | no | | [vpc\_id](#input\_vpc\_id) | The VPC ID where resources are created | `string` | n/a | yes | | [webhook\_authentication](#input\_webhook\_authentication) | The type of authentication to use. One of IP, GITHUB\_HMAC, or UNAUTHENTICATED | `string` | `"GITHUB_HMAC"` | no | | [webhook\_enabled](#input\_webhook\_enabled) | Set to false to prevent the module from creating any webhook resources | `bool` | `true` | no | diff --git a/docs/terraform.md b/docs/terraform.md index 67022f6c..08500f03 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -158,6 +158,7 @@ | [ecs\_cluster\_name](#input\_ecs\_cluster\_name) | The ECS Cluster Name to use in ECS Code Pipeline Deployment step | `string` | `null` | no | | [ecs\_private\_subnet\_ids](#input\_ecs\_private\_subnet\_ids) | List of Private Subnet IDs to provision ECS Service onto if `var.network_mode = "awsvpc"` | `list(string)` | n/a | yes | | [ecs\_security\_group\_ids](#input\_ecs\_security\_group\_ids) | Additional Security Group IDs to allow into ECS Service if `var.network_mode = "awsvpc"` | `list(string)` | `[]` | no | +| [efs\_volumes](#input\_efs\_volumes) | Task volume definitions as list of configuration objects. EFS volumes only. |
list(object({
host_path = string
name = string
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
transit_encryption = string
transit_encryption_port = string
authorization_config = list(object({
access_point_id = string
iam = string
}))
}))
}))
| `[]` | no | | [enable\_all\_egress\_rule](#input\_enable\_all\_egress\_rule) | A flag to enable/disable adding the all ports egress rule to the ECS security group | `bool` | `true` | no | | [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags) | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no | | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | @@ -214,7 +215,7 @@ | [use\_alb\_security\_group](#input\_use\_alb\_security\_group) | A boolean to enable adding an ALB security group rule for the service task | `bool` | `false` | no | | [use\_ecr\_image](#input\_use\_ecr\_image) | If true, use ECR repo URL for image, otherwise use value in container\_image | `bool` | `false` | no | | [use\_nlb\_cidr\_blocks](#input\_use\_nlb\_cidr\_blocks) | A flag to enable/disable adding the NLB ingress rule to the security group | `bool` | `false` | no | -| [volumes](#input\_volumes) | Task volume definitions as list of configuration objects |
list(object({
host_path = string
name = string
docker_volume_configuration = list(object({
autoprovision = bool
driver = string
driver_opts = map(string)
labels = map(string)
scope = string
}))
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
transit_encryption = string
transit_encryption_port = string
authorization_config = list(object({
access_point_id = string
iam = string
}))
}))
}))
| `[]` | no | +| [volumes](#input\_volumes) | Task volume definitions as list of configuration objects |
list(object({
host_path = string
name = string
docker_volume_configuration = list(object({
autoprovision = bool
driver = string
driver_opts = map(string)
labels = map(string)
scope = string
}))
}))
| `[]` | no | | [vpc\_id](#input\_vpc\_id) | The VPC ID where resources are created | `string` | n/a | yes | | [webhook\_authentication](#input\_webhook\_authentication) | The type of authentication to use. One of IP, GITHUB\_HMAC, or UNAUTHENTICATED | `string` | `"GITHUB_HMAC"` | no | | [webhook\_enabled](#input\_webhook\_enabled) | Set to false to prevent the module from creating any webhook resources | `bool` | `true` | no | From d22b093ee04a4934739a972757d018aa8932ce75 Mon Sep 17 00:00:00 2001 From: Oscar Jara Date: Tue, 30 Aug 2022 11:19:18 -0300 Subject: [PATCH 3/3] run make readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a70537dd..12f361cd 100644 --- a/README.md +++ b/README.md @@ -618,7 +618,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply [![README Footer][readme_footer_img]][readme_footer_link] [![Beacon][beacon]][website] - + [logo]: https://cloudposse.com/logo-300x69.svg [docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ecs-web-app&utm_content=docs [website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-ecs-web-app&utm_content=website @@ -649,3 +649,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply [share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-ecs-web-app [share_email]: mailto:?subject=terraform-aws-ecs-web-app&body=https://github.com/cloudposse/terraform-aws-ecs-web-app [beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-ecs-web-app?pixel&cs=github&cm=readme&an=terraform-aws-ecs-web-app +