Skip to content

Commit 72a2ada

Browse files
authored
feat: Added outputs for execution and task role ARNs. (#39)
feat: Added outputs for exedcution and task role ARNs.
1 parent e05ccf7 commit 72a2ada

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ this module offers three ways to define the current image version:
8888
> now to avoid unexpected changes in the future.
8989
9090
| Name | Description | Type | Default | Required |
91-
|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|----------------|-------------|-------------|
91+
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ----------- | ----------- |
9292
| logging_key_id | KMS key to use for log encryption. | `string` | n/a | yes |
9393
| private_subnets | List of private subnet CIDR blocks. | `list` | n/a | yes |
9494
| project | Name of the project. | `string` | n/a | yes |
@@ -228,7 +228,7 @@ oidc_settings = {
228228
```
229229

230230
| Name | Description | Type | Default | Required |
231-
|------------------------|------------------------------------------------------------------|----------|---------|-------------|
231+
| ---------------------- | ---------------------------------------------------------------- | -------- | ------- | ----------- |
232232
| authorization_endpoint | Authorization endpoint from your provider. | `string` | n/a | yes |
233233
| issuer | Issuer endpoint from your provider. | `string` | n/a | yes |
234234
| token_endpoint | Token endpoint from your provider. | `string` | n/a | yes |
@@ -257,7 +257,7 @@ secrets_manager_secrets = {
257257
```
258258

259259
| Name | Description | Type | Default | Required |
260-
|------------------------|--------------------------------------------------------------|----------|---------|----------|
260+
| ---------------------- | ------------------------------------------------------------ | -------- | ------- | -------- |
261261
| description | Description of the secret. | `string` | n/a | yes |
262262
| recovery_window | Number of days that a secret can be recovered after deltion. | `string` | `30` | no |
263263
| create_random_password | Creates a random password as the staring value. | `bool` | `false` | no |
@@ -279,24 +279,26 @@ volumes = {
279279
```
280280

281281
| Name | Description | Type | Default | Required |
282-
|-------|---------------------------------------------------------------------|----------|----------------|----------|
282+
| ----- | ------------------------------------------------------------------- | -------- | -------------- | -------- |
283283
| mount | Path in the container where the volume will be mounted. | `string` | n/a | yes |
284284
| name | Name of the volume. Defauls to the key from the map. | `string` | `null` | no |
285285
| type | Type of volume to create. Currently only `persistent` is supported. | `string` | `"persistent"` | no |
286286

287287
## Outputs
288288

289289
| Name | Description | Type |
290-
|----------------------------|-------------------------------------------------------------------------|----------------|
290+
| -------------------------- | ----------------------------------------------------------------------- | -------------- |
291291
| cluster_name | Name of the ECS Fargate cluster. | `string` |
292292
| docker_push | Commands to push a Docker image to the container repository. | `string` |
293293
| endpoint_security_group_id | Security group ID for the endpoint. | `string` |
294294
| endpoint_url | URL of the service endpoint. | `string` |
295+
| execution_role_arn | ARN of the role used to execute tasks. | `string` |
295296
| load_balancer_arn | ARN of the load balancer, if created. | `string` |
296297
| log_group_names | Names of managed CloudWatch log groups for the service. | `list(string)` |
297298
| repository_arn | ARN of the ECR repository, if created. | `string` |
298299
| repository_url | URL for the container image repository. | `string` |
299300
| security_group_id | Security group ID for the service. | `string` |
301+
| task_role_arn | ARN of the role attached to the running tasks. | `string` |
300302
| version_parameter | Name of the SSM parameter, if one exists, to store the current version. | `string` |
301303

302304
[badge-checks]: https://github.com/codeforamerica/tofu-modules-aws-fargate-service/actions/workflows/main.yaml/badge.svg

outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ output "endpoint_url" {
2323
value = var.create_endpoint ? aws_route53_record.endpoint["this"].fqdn : ""
2424
}
2525

26+
output "execution_role_arn" {
27+
description = "ARN of the role used to execute tasks."
28+
value = aws_iam_role.execution.arn
29+
}
30+
2631
output "load_balancer_arn" {
2732
description = "ARN of the load balancer, if created."
2833
value = var.create_endpoint ? module.alb["this"].arn : ""
@@ -48,6 +53,11 @@ output "security_group_id" {
4853
value = module.task_security_group.security_group_id
4954
}
5055

56+
output "task_role_arn" {
57+
description = "ARN of the role attached to the running tasks."
58+
value = aws_iam_role.task.arn
59+
}
60+
5161
output "version_parameter" {
5262
description = "Name of the SSM parameter, if one exists, to store the current version."
5363
value = local.version_parameter

0 commit comments

Comments
 (0)