Skip to content

Commit efa334e

Browse files
authored
feat: Add ability to use Fargate Ephemeral Storage (#229)
1 parent 15efc01 commit efa334e

File tree

10 files changed

+36
-10
lines changed

10 files changed

+36
-10
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ allow_github_webhooks = true
226226
| Name | Version |
227227
|------|---------|
228228
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
229-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.68 |
229+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.45 |
230230
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
231231

232232
## Providers
233233

234234
| Name | Version |
235235
|------|---------|
236-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.68 |
236+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.45 |
237237
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
238238

239239
## Modules
@@ -344,7 +344,9 @@ allow_github_webhooks = true
344344
| <a name="input_ecs_task_cpu"></a> [ecs\_task\_cpu](#input\_ecs\_task\_cpu) | The number of cpu units used by the task | `number` | `256` | no |
345345
| <a name="input_ecs_task_memory"></a> [ecs\_task\_memory](#input\_ecs\_task\_memory) | The amount (in MiB) of memory used by the task | `number` | `512` | no |
346346
| <a name="input_enable_ecs_managed_tags"></a> [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 |
347+
| <a name="input_enable_ephemeral_storage"></a> [enable\_ephemeral\_storage](#input\_enable\_ephemeral\_storage) | Enable to use Fargate Ephermal Storage | `bool` | `false` | no |
347348
| <a name="input_entrypoint"></a> [entrypoint](#input\_entrypoint) | The entry point that is passed to the container | `list(string)` | `null` | no |
349+
| <a name="input_ephemeral_storage_size"></a> [ephemeral\_storage\_size](#input\_ephemeral\_storage\_size) | Size of Ephemeral Storage in GiB | `number` | `21` | no |
348350
| <a name="input_essential"></a> [essential](#input\_essential) | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value | `bool` | `true` | no |
349351
| <a name="input_external_task_definition_updates"></a> [external\_task\_definition\_updates](#input\_external\_task\_definition\_updates) | Enable to allow the task definition to be updated outside of this Terraform module. This should be enabled when using a deployment tool such as ecs-deploy which updates the task definition and will then keep the ECS service using the latest version of the task definition. | `bool` | `false` | no |
350352
| <a name="input_extra_container_definitions"></a> [extra\_container\_definitions](#input\_extra\_container\_definitions) | A list of valid container definitions provided as a single valid JSON document. These will be provided as supplimentary to the main Atlantis container definition | `list(any)` | `[]` | no |

examples/github-complete/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Go to https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/settin
3030
| Name | Version |
3131
|------|---------|
3232
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
33-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.68 |
33+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.45 |
3434
| <a name="requirement_github"></a> [github](#requirement\_github) | >= 4.8 |
3535

3636
## Providers
3737

3838
| Name | Version |
3939
|------|---------|
40-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.68 |
40+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.45 |
4141

4242
## Modules
4343

examples/github-complete/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.68"
7+
version = ">= 3.45"
88
}
99

1010
github = {

examples/github-repository-webhook/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Note that this example may create resources which cost money. Run `terraform des
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.68 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.45 |
2626
| <a name="requirement_github"></a> [github](#requirement\_github) | >= 4.8 |
2727

2828
## Providers

examples/github-repository-webhook/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.68"
7+
version = ">= 3.45"
88
}
99

1010
github = {

examples/gitlab-repository-webhook/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.68 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.45 |
2424
| <a name="requirement_gitlab"></a> [gitlab](#requirement\_gitlab) | >= 3.0 |
2525

2626
## Providers

examples/gitlab-repository-webhook/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.68"
7+
version = ">= 3.45"
88
}
99

1010
gitlab = {

main.tf

+7
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,13 @@ resource "aws_ecs_task_definition" "atlantis" {
609609

610610
container_definitions = local.container_definitions
611611

612+
dynamic "ephemeral_storage" {
613+
for_each = var.enable_ephemeral_storage ? [1] : []
614+
content {
615+
size_in_gib = var.ephemeral_storage_size
616+
}
617+
}
618+
612619
tags = local.tags
613620
}
614621

variables.tf

+17
Original file line numberDiff line numberDiff line change
@@ -631,3 +631,20 @@ variable "ecs_service_enable_execute_command" {
631631
type = bool
632632
default = true
633633
}
634+
635+
variable "enable_ephemeral_storage" {
636+
description = "Enable to use Fargate Ephermal Storage"
637+
type = bool
638+
default = false
639+
}
640+
641+
variable "ephemeral_storage_size" {
642+
description = "Size of Ephemeral Storage in GiB"
643+
type = number
644+
default = 21
645+
646+
validation {
647+
condition = var.ephemeral_storage_size >= 21 && var.ephemeral_storage_size <= 200
648+
error_message = "The minimum supported value is 21 GiB and the maximum supported value is 200 GiB."
649+
}
650+
}

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.68"
7+
version = ">= 3.45"
88
}
99

1010
random = {

0 commit comments

Comments
 (0)