Skip to content

Commit

Permalink
Expose ARN for service so we don't have to manually construct it (#96)
Browse files Browse the repository at this point in the history
* Expose ARN for service so we don't have to manually construct it

* fix: sweetops recommended changes as arn is not exported and is under id instead

* Update outputs.tf

Co-authored-by: Vladimir <[email protected]>

* fix: update with make

Co-authored-by: Tiamarch <[email protected]>
Co-authored-by: Vladimir <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2021
1 parent 6eb048c commit 763172d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ Available targets:
|------|-------------|
| ecs\_exec\_role\_policy\_id | The ECS service role policy ID, in the form of `role_name:role_policy_name` |
| ecs\_exec\_role\_policy\_name | ECS service role name |
| service\_arn | ECS Service ARN |
| service\_name | ECS Service name |
| service\_role\_arn | ECS Service role ARN |
| service\_security\_group\_id | Security Group ID of the ECS task |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
|------|-------------|
| ecs\_exec\_role\_policy\_id | The ECS service role policy ID, in the form of `role_name:role_policy_name` |
| ecs\_exec\_role\_policy\_name | ECS service role name |
| service\_arn | ECS Service ARN |
| service\_name | ECS Service name |
| service\_role\_arn | ECS Service role ARN |
| service\_security\_group\_id | Security Group ID of the ECS task |
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ output "service_name" {
value = join("", aws_ecs_service.default.*.name) != "" ? join("", aws_ecs_service.default.*.name) : join("", aws_ecs_service.ignore_changes_task_definition.*.name)
}

output "service_arn" {
description = "ECS Service ARN"
value = join("", aws_ecs_service.default.*.id) != "" ? join("", aws_ecs_service.default.*.id) : join("", aws_ecs_service.ignore_changes_task_definition.*.id)
}

output "service_role_arn" {
description = "ECS Service role ARN"
value = join("", aws_iam_role.ecs_service.*.arn)
Expand Down

0 comments on commit 763172d

Please sign in to comment.