Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full for volume configuration #20

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v3.2.0
hooks:
- id: check-added-large-files
args: ['--maxkb=500']
Expand All @@ -18,7 +18,7 @@ repos:
args: ['--allow-missing-credentials']
- id: trailing-whitespace
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.30.0
rev: v1.31.0
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ All notable changes to this project will be documented in this file.



<a name="3.0.2"></a>
## [3.0.2] - 2020-07-30

- Add task definition and execution role outputs ([#19](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/19))


<a name="3.0.1"></a>
## [3.0.1] - 2020-06-23

- Update variables.tf


<a name="3.0.0"></a>
## [3.0.0] - 2020-05-22

- Lock minimum version of provider and add force_new_deployment ([#18](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/18))
- update changelog and versions


<a name="2.0.0"></a>
## [2.0.0] - 2020-05-20

Expand Down Expand Up @@ -110,7 +129,10 @@ All notable changes to this project will be documented in this file.
- Initial commit


[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/2.0.0...HEAD
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/3.0.2...HEAD
[3.0.2]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/2.0.0...3.0.0
[2.0.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/1.4.0...2.0.0
[1.4.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/1.3.0...1.4.0
[1.3.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/1.2.0...1.3.0
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Terraform module to create AWS ECS FARGATE services. Module support both FARGATE

## Terraform versions

Terraform 0.12. Pin module version to `~> v3.0`. Submit pull-requests to `master` branch.
Terraform 0.12. Pin module version to `~> v4.0`. Submit pull-requests to `master` branch.

## Usage

Expand All @@ -28,7 +28,7 @@ resource "aws_ecs_cluster" "cluster" {

module "ecs-farage" {
source = "umotif-public/ecs-fargate/aws"
version = "~> 3.0.0"
version = "~> 4.0.0"

name_prefix = "ecs-fargate-example"
vpc_id = "vpc-abasdasd132"
Expand Down Expand Up @@ -75,13 +75,13 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http

| Name | Version |
|------|---------|
| aws | ~> 2.63 |
| aws | ~> 2.68 |

## Providers

| Name | Version |
|------|---------|
| aws | ~> 2.63 |
| aws | ~> 2.68 |
| null | n/a |

## Inputs
Expand Down Expand Up @@ -139,12 +139,16 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http

| Name | Description |
|------|-------------|
| execution\_role\_arn | The Amazon Resource Name (ARN) specifying the ECS execution role. |
| execution\_role\_name | The name of the ECS execution role. |
| log\_group\_name | The name of the Cloudwatch log group for the task. |
| service\_arn | The Amazon Resource Name (ARN) that identifies the ECS service. |
| service\_name | The name of the service. |
| service\_sg\_id | The Amazon Resource Name (ARN) that identifies the service security group. |
| target\_group\_arn | The ARN of the Target Group used by Load Balancer. |
| target\_group\_name | The Name of the Target Group used by Load Balancer. |
| task\_definition\_arn | The Amazon Resource Name (ARN) of the task definition created |
| task\_definition\_name | The name of the task definition created |
| task\_role\_arn | The Amazon Resource Name (ARN) specifying the ECS service role. |
| task\_role\_name | The name of the Fargate task service role. |

Expand Down
14 changes: 12 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,18 @@ EOF
dynamic "efs_volume_configuration" {
for_each = lookup(volume.value, "efs_volume_configuration", [])
content {
file_system_id = lookup(efs_volume_configuration.value, "file_system_id", null)
root_directory = lookup(efs_volume_configuration.value, "root_directory", null)
file_system_id = lookup(efs_volume_configuration.value, "file_system_id", null)
root_directory = lookup(efs_volume_configuration.value, "root_directory", null)
transit_encryption = lookup(efs_volume_configuration.value, "transit_encryption", null)
transit_encryption_port = lookup(efs_volume_configuration.value, "transit_encryption_port", null)

dynamic "authorization_config" {
for_each = length(lookup(efs_volume_configuration.value, "authorization_config")) == 0 ? [] : [lookup(efs_volume_configuration.value, "authorization_config", {})]
content {
access_point_id = lookup(authorization_config.value, "access_point_id", null)
iam = lookup(authorization_config.value, "iam", null)
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ output "execution_role_name" {

output "task_definition_arn" {
description = "The Amazon Resource Name (ARN) of the task definition created"
value = aws_ecs_task_definition.task.arn
value = aws_ecs_task_definition.task.arn
}

output "task_definition_name" {
description = "The name of the task definition created"
value = aws_ecs_task_definition.task.arn
value = aws_ecs_task_definition.task.arn
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_providers {
aws = "~> 2.63"
aws = "~> 2.68"
}
}