You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use map for task & task exec policy arns variables (#194)
* Add option to trigger a redeployment on apply (#193)
* Add option to trigger a redeployment on apply
* add triggers var to each variation of ecs_service
* set redeployment trigger value in locals
* Update example version and fixture
* Update readme
* Bump min tf version to 0.14
doc: rebuild readme
* Run pr/auto-format/host locally
* Modify task_policy_arns to use map
- avoid Terraform for_each error related to dependency on resources known after apply
- deprecate var task_policy_arns - replace with task_policy_arns_map
* Use map instead of list for task_policy_arns
* Replace task_exec_policy_arns with task_exec_policy_arns_map
- deprecate task_exec_policy_arns
- add test input for task_policy_arns
* Rename test policy statement
* Update readme
* Auto Format
* bump tf version for examples
---------
Co-authored-by: cloudpossebot <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+2
Original file line number
Diff line number
Diff line change
@@ -368,10 +368,12 @@ Available targets:
368
368
| <aname="input_task_cpu"></a> [task\_cpu](#input\_task\_cpu)| The number of CPU units used by the task. If using `FARGATE` launch type `task_cpu` must match [supported memory values](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)|`number`|`256`| no |
369
369
| <aname="input_task_definition"></a> [task\_definition](#input\_task\_definition)| Reuse an existing task definition family and revision for the ecs service instead of creating one |`string`|`null`| no |
370
370
| <aname="input_task_exec_policy_arns"></a> [task\_exec\_policy\_arns](#input\_task\_exec\_policy\_arns)| A list of IAM Policy ARNs to attach to the generated task execution role. |`list(string)`|`[]`| no |
371
+
| <aname="input_task_exec_policy_arns_map"></a> [task\_exec\_policy\_arns\_map](#input\_task\_exec\_policy\_arns\_map)| A map of name to IAM Policy ARNs to attach to the generated task execution role. |`map(string)`|`{}`| no |
371
372
| <aname="input_task_exec_role_arn"></a> [task\_exec\_role\_arn](#input\_task\_exec\_role\_arn)| A `list(string)` of zero or one ARNs of IAM roles that allows the<br>ECS/Fargate agent to make calls to the ECS API on your behalf.<br>If the list is empty, a role will be created for you.<br>DEPRECATED: you can also pass a `string` with the ARN, but that<br>string must be known a "plan" time. |`any`|`[]`| no |
372
373
| <aname="input_task_memory"></a> [task\_memory](#input\_task\_memory)| The amount of memory (in MiB) used by the task. If using Fargate launch type `task_memory` must match [supported cpu value](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)|`number`|`512`| no |
373
374
| <aname="input_task_placement_constraints"></a> [task\_placement\_constraints](#input\_task\_placement\_constraints)| A set of placement constraints rules that are taken into consideration during task placement.<br>Maximum number of placement\_constraints is 10. See [`placement_constraints`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#placement-constraints-arguments)| <pre>list(object({<br> type = string<br> expression = string<br> }))</pre> |`[]`| no |
374
375
| <aname="input_task_policy_arns"></a> [task\_policy\_arns](#input\_task\_policy\_arns)| A list of IAM Policy ARNs to attach to the generated task role. |`list(string)`|`[]`| no |
376
+
| <aname="input_task_policy_arns_map"></a> [task\_policy\_arns\_map](#input\_task\_policy\_arns\_map)| A map of name to IAM Policy ARNs to attach to the generated task role. |`map(string)`|`{}`| no |
375
377
| <aname="input_task_role_arn"></a> [task\_role\_arn](#input\_task\_role\_arn)| A `list(string)` of zero or one ARNs of IAM roles that allows<br>your Amazon ECS container task to make calls to other AWS services.<br>If the list is empty, a role will be created for you.<br>DEPRECATED: you can also pass a `string` with the ARN, but that<br>string must be known a "plan" time. |`any`|`[]`| no |
376
378
| <aname="input_tenant"></a> [tenant](#input\_tenant)| ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for |`string`|`null`| no |
377
379
| <aname="input_use_alb_security_group"></a> [use\_alb\_security\_group](#input\_use\_alb\_security\_group)| A flag to enable/disable allowing traffic from the ALB security group to the service security group |`bool`|`false`| no |
Copy file name to clipboardExpand all lines: docs/terraform.md
+2
Original file line number
Diff line number
Diff line change
@@ -121,10 +121,12 @@
121
121
| <aname="input_task_cpu"></a> [task\_cpu](#input\_task\_cpu)| The number of CPU units used by the task. If using `FARGATE` launch type `task_cpu` must match [supported memory values](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)|`number`|`256`| no |
122
122
| <aname="input_task_definition"></a> [task\_definition](#input\_task\_definition)| Reuse an existing task definition family and revision for the ecs service instead of creating one |`string`|`null`| no |
123
123
| <aname="input_task_exec_policy_arns"></a> [task\_exec\_policy\_arns](#input\_task\_exec\_policy\_arns)| A list of IAM Policy ARNs to attach to the generated task execution role. |`list(string)`|`[]`| no |
124
+
| <aname="input_task_exec_policy_arns_map"></a> [task\_exec\_policy\_arns\_map](#input\_task\_exec\_policy\_arns\_map)| A map of name to IAM Policy ARNs to attach to the generated task execution role. |`map(string)`|`{}`| no |
124
125
| <aname="input_task_exec_role_arn"></a> [task\_exec\_role\_arn](#input\_task\_exec\_role\_arn)| A `list(string)` of zero or one ARNs of IAM roles that allows the<br>ECS/Fargate agent to make calls to the ECS API on your behalf.<br>If the list is empty, a role will be created for you.<br>DEPRECATED: you can also pass a `string` with the ARN, but that<br>string must be known a "plan" time. |`any`|`[]`| no |
125
126
| <aname="input_task_memory"></a> [task\_memory](#input\_task\_memory)| The amount of memory (in MiB) used by the task. If using Fargate launch type `task_memory` must match [supported cpu value](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)|`number`|`512`| no |
126
127
| <aname="input_task_placement_constraints"></a> [task\_placement\_constraints](#input\_task\_placement\_constraints)| A set of placement constraints rules that are taken into consideration during task placement.<br>Maximum number of placement\_constraints is 10. See [`placement_constraints`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#placement-constraints-arguments)| <pre>list(object({<br> type = string<br> expression = string<br> }))</pre> |`[]`| no |
127
128
| <aname="input_task_policy_arns"></a> [task\_policy\_arns](#input\_task\_policy\_arns)| A list of IAM Policy ARNs to attach to the generated task role. |`list(string)`|`[]`| no |
129
+
| <aname="input_task_policy_arns_map"></a> [task\_policy\_arns\_map](#input\_task\_policy\_arns\_map)| A map of name to IAM Policy ARNs to attach to the generated task role. |`map(string)`|`{}`| no |
128
130
| <aname="input_task_role_arn"></a> [task\_role\_arn](#input\_task\_role\_arn)| A `list(string)` of zero or one ARNs of IAM roles that allows<br>your Amazon ECS container task to make calls to other AWS services.<br>If the list is empty, a role will be created for you.<br>DEPRECATED: you can also pass a `string` with the ARN, but that<br>string must be known a "plan" time. |`any`|`[]`| no |
129
131
| <aname="input_tenant"></a> [tenant](#input\_tenant)| ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for |`string`|`null`| no |
130
132
| <aname="input_use_alb_security_group"></a> [use\_alb\_security\_group](#input\_use\_alb\_security\_group)| A flag to enable/disable allowing traffic from the ALB security group to the service security group |`bool`|`false`| no |
0 commit comments