Skip to content

Commit

Permalink
Add exec outputs (#27)
Browse files Browse the repository at this point in the history
* feat: new output for the task exec role

* fix: example integration

* fix: terraform lint

* docs: update output descriptions

Co-Authored-By: Andriy Knysh <[email protected]>
  • Loading branch information
2 people authored and osterman committed Jun 13, 2019
1 parent d8b29c7 commit 6ee23cb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,15 @@ Available targets:

| Name | Description |
|------|-------------|
| ecs_exec_role_policy_id | The role policy ID, in the form of role_name:role_policy_name. |
| ecs_exec_role_policy_name | The name of the policy. |
| service_name | ECS Service name |
| service_role_arn | ECS Service role ARN |
| service_security_group_id | Security Group ID of the ECS task |
| task_definition_family | ECS task definition family |
| task_definition_revision | ECS task definition revision |
| task_exec_role_arn | ECS Task exec role arn |
| task_exec_role_name | ECS Task exec role name |
| task_role_arn | ECS Task role ARN |
| task_role_name | ECS Task role name |

Expand Down
4 changes: 4 additions & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@

| Name | Description |
|------|-------------|
| ecs_exec_role_policy_id | The role policy ID, in the form of role_name:role_policy_name. |
| ecs_exec_role_policy_name | The name of the policy. |
| service_name | ECS Service name |
| service_role_arn | ECS Service role ARN |
| service_security_group_id | Security Group ID of the ECS task |
| task_definition_family | ECS task definition family |
| task_definition_revision | ECS task definition revision |
| task_exec_role_arn | ECS Task exec role arn |
| task_exec_role_name | ECS Task exec role name |
| task_role_arn | ECS Task role ARN |
| task_role_name | ECS Task role name |

2 changes: 1 addition & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ module "alb_service_task" {
launch_type = "FARGATE"
vpc_id = "xxxxxxx"
security_group_ids = ["xxxxx", "yyyyy"]
private_subnet_ids = ["xxxxx", "yyyyy", "zzzzz"]
subnet_ids = ["xxxxx", "yyyyy", "zzzzz"]
}
20 changes: 20 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
output "ecs_exec_role_policy_id" {
description = "The ECS service role policy ID, in the form of role_name:role_policy_name"
value = "${aws_iam_role_policy.ecs_exec.id}"
}

output "ecs_exec_role_policy_name" {
description = "ECS service role name"
value = "${aws_iam_role_policy.ecs_exec.name}"
}

output "service_name" {
description = "ECS Service name"
value = "${element(coalescelist(aws_ecs_service.default.*.name, aws_ecs_service.ignore_changes_task_definition.*.name), 0)}"
Expand All @@ -8,6 +18,16 @@ output "service_role_arn" {
value = "${aws_iam_role.ecs_service.arn}"
}

output "task_exec_role_name" {
description = "ECS Task role name"
value = "${aws_iam_role.ecs_exec.name}"
}

output "task_exec_role_arn" {
description = "ECS Task exec role ARN"
value = "${aws_iam_role.ecs_exec.arn}"
}

output "task_role_name" {
description = "ECS Task role name"
value = "${aws_iam_role.ecs_task.name}"
Expand Down

0 comments on commit 6ee23cb

Please sign in to comment.