Skip to content

Commit 34ecc68

Browse files
committed
Add outputs for ARNs, and name
1 parent a42e527 commit 34ecc68

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,15 @@ This software is released under the MIT License (see `LICENSE`).
119119

120120
| Name | Description |
121121
|------|-------------|
122+
| cluster\_arn | ECS cluster ARN |
122123
| container\_json | |
123124
| lb\_dns\_aliases | List of DNS aliases add for ALB |
124125
| lb\_dns\_name | FQDN of ALB provisioned for service (if present) |
125126
| lb\_zone\_id | Route 53 zone ID of ALB provisioned for service (if present) |
127+
| service\_arn | ECS service ARN |
126128
| service\_iam\_role\_arn | ARN of the IAM Role for the ECS Service |
127129
| service\_iam\_role\_name | Name of the IAM Role for the ECS Task |
130+
| service\_name | ECS service name |
128131
| task\_iam\_role\_arn | ARN of the IAM Role for the ECS Task |
129132
| task\_iam\_role\_name | Name of the IAM Role for the ECS Task |
130133

outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ output "service_iam_role_name" {
3333
value = "${element(concat(aws_iam_role.service.*.name, list("")), 0)}"
3434
}
3535

36+
output "cluster_arn" {
37+
description = "ECS cluster ARN"
38+
value = "${element(compact(concat(aws_ecs_service.service-no-lb.*.cluster, aws_ecs_service.service.*.cluster, list(""))), 0)}"
39+
}
40+
41+
output "service_arn" {
42+
description = "ECS service ARN"
43+
value = "${element(compact(concat(aws_ecs_service.service-no-lb.*.id, aws_ecs_service.service.*.id, list(""))), 0)}"
44+
}
45+
46+
output "service_name" {
47+
description = "ECS service name"
48+
value = "${element(compact(concat(aws_ecs_service.service-no-lb.*.name, aws_ecs_service.service.*.name, list(""))), 0)}"
49+
}
50+
3651
output "container_json" {
3752
description = ""
3853
value = "${element(concat(data.template_file.container_definition.*.rendered, list("")), 0)}"

resource-plan-graph.png

-255 KB
Loading

0 commit comments

Comments
 (0)