Skip to content

Commit

Permalink
Merge pull request #111 from pbs/feature/task-execution-policy
Browse files Browse the repository at this point in the history
Allowing task execution policy to also be provided
  • Loading branch information
chipbell4 authored Feb 24, 2025
2 parents 7b722ee + eb98359 commit a05e776
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.1.1
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.1.1"
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.1.1"
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.1.1`
`x.y.z`

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

Expand Down Expand Up @@ -271,6 +271,7 @@ Below is automatically generated documentation on this Terraform module using [t
| <a name="input_target_group_name"></a> [target\_group\_name](#input\_target\_group\_name) | Target group name. Will default to product if not defined. | `string` | `null` | no |
| <a name="input_target_memory_utilization"></a> [target\_memory\_utilization](#input\_target\_memory\_utilization) | Target memory utilization for scaling | `number` | `50` | no |
| <a name="input_task_def_arn"></a> [task\_def\_arn](#input\_task\_def\_arn) | Task definition ARN. If null, task will be created with default values, except that image\_repo and image\_tag may be defined. | `string` | `null` | no |
| <a name="input_task_execution_role_policy_json"></a> [task\_execution\_role\_policy\_json](#input\_task\_execution\_role\_policy\_json) | IAM policy to attach to task execution role used for this task | `string` | `null` | no |
| <a name="input_task_family"></a> [task\_family](#input\_task\_family) | (optional) task family for task. This is effectively the name of the task, without qualification of revision | `string` | `null` | no |
| <a name="input_tcp_port"></a> [tcp\_port](#input\_tcp\_port) | NLB TCP port number. Ignored for application load balancers. | `number` | `null` | no |
| <a name="input_use_xray_sidecar"></a> [use\_xray\_sidecar](#input\_use\_xray\_sidecar) | (optional) if set to null, will use the sidecar to trace the task if envoy is used, as that automatically implements tracing configs. | `bool` | `null` | no |
Expand Down
6 changes: 6 additions & 0 deletions optional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ variable "role_policy_json" {
type = string
}

variable "task_execution_role_policy_json" {
description = "IAM policy to attach to task execution role used for this task"
default = null
type = string
}

variable "enable_execute_command" {
description = "Enables `ecs exec`. If null, will enable if not on prod"
default = null
Expand Down
3 changes: 2 additions & 1 deletion task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module "task" {
mesh_name = var.mesh_name
virtual_gateway = var.virtual_gateway

role_policy_json = var.role_policy_json
role_policy_json = var.role_policy_json
task_execution_role_policy_json = var.task_execution_role_policy_json

service_name = local.name
task_family = local.task_family
Expand Down

0 comments on commit a05e776

Please sign in to comment.