Skip to content

Commit

Permalink
Merge pull request #109 from pbs/CAT-24475
Browse files Browse the repository at this point in the history
CAT-24475 - Outputting IAM role associated with a created task defintion
  • Loading branch information
ccioltan authored Oct 9, 2024
2 parents 0f799aa + 6806bb0 commit b969786
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Using the Repo Source

```hcl
github.com/pbs/terraform-aws-ecs-service-module?ref=6.0.2
github.com/pbs/terraform-aws-ecs-service-module?ref=x.y.z
```

### Alternative Installation Methods
Expand All @@ -26,7 +26,7 @@ Integrate this module like so:

```hcl
module "service" {
source = "github.com/pbs/terraform-aws-ecs-service-module?ref=6.0.2"
source = "github.com/pbs/terraform-aws-ecs-service-module?ref=x.y.z"
# Required
hosted_zone = "example.com"
Expand All @@ -49,7 +49,7 @@ This module will create an ECS cluster if one is not provided. If you would like

```hcl
module "service" {
source = "github.com/pbs/terraform-aws-ecs-service-module?ref=6.0.2"
source = "github.com/pbs/terraform-aws-ecs-service-module?ref=x.y.z"
# Required
hosted_zone = "example.com"
Expand All @@ -73,7 +73,7 @@ module "service" {

If this repo is added as a subtree, then the version of the module should be close to the version shown here:

`6.0.2`
`x.y.z`

Note, however that subtrees can be altered as desired within repositories.

Expand Down Expand Up @@ -288,6 +288,7 @@ Below is automatically generated documentation on this Terraform module using [t
| <a name="output_container_name"></a> [container\_name](#output\_container\_name) | Name of the main container used by this service |
| <a name="output_domain_name"></a> [domain\_name](#output\_domain\_name) | One domain name that will resolve to this service. Might not be a valid alias. |
| <a name="output_https_listener_arn"></a> [https\_listener\_arn](#output\_https\_listener\_arn) | ARN of the HTTPS listener. Useful when adding extra ACM certificates to the listener. |
| <a name="output_iam_task_role_arn"></a> [iam\_task\_role\_arn](#output\_iam\_task\_role\_arn) | IAM role ARN associated with a task defition, if task defition is created by the ecs service module |
| <a name="output_image_tag"></a> [image\_tag](#output\_image\_tag) | Tag of the image used by this service |
| <a name="output_lb_arn"></a> [lb\_arn](#output\_lb\_arn) | Load balancer ARN |
| <a name="output_lb_dns_name"></a> [lb\_dns\_name](#output\_lb\_dns\_name) | Load balancer DNS Name |
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ output "lb_zone_id" {
description = "Load balancer Zone Id"
value = local.create_lb ? one(aws_lb.lb[*].zone_id) : null
}

output "iam_task_role_arn" {
description = "IAM role ARN associated with a task defition, if task defition is created by the ecs service module"
value = var.task_def_arn == null ? module.task[0].role_arn : "N/A"
}

0 comments on commit b969786

Please sign in to comment.