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
Copy file name to clipboardexpand all lines: aws-ecs-job-fargate/README.md
+10
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,15 @@ container definition external to Terraform (e.g. using [czecs](https://github.co
13
13
Terraform will use a stub definition, but from that point forward will ignore any
14
14
changes to the definition, allowing external task definition management.
15
15
16
+
## Migrating old ECS services
17
+
Older ECS services were created with an ARN in an old format that did not include the ECS cluster name as part of the ARN. AWS began allowing opt-in to the new ARN format starting November 15, 2018, and will require the new format starting January 1, 2020. ECS only allows applying tags (such as cost tags) on services that have the new ARN format. Applying tags to older ECS services using the old ARN format will return the following error message:
18
+
```
19
+
InvalidParameterException: Long arn format must be used for tagging operations
20
+
```
21
+
This module by default will assume your organization has opted in to the new ARN format and will apply tags to the ECS service. Creating new services after the opt-in will work fine, but migrating an existing older ECS service to using this module (via a state mv or an import) will encounter the above error message the next time it is applied.
22
+
23
+
Since changing a service to use the new ARN requires destroying and recreating the service, this can result in downtime. In such cases, you can opt-out applying tags by passing `tag_service = false` as an argument to the module. It is recommended that at the next possible down time, the ECS service be replaced by running `terraform taint`, and if `manage_task_definition = false` restoring the ECS task definition version (the taint/replace will restore to only the last stub definition). After the service is destroy/replaced, the `tag_service = false` argument can be removed.
24
+
16
25
<!-- START -->
17
26
## Inputs
18
27
@@ -30,6 +39,7 @@ changes to the definition, allowing external task definition management.
30
39
| registry\_secretsmanager\_arn | ARN for AWS Secrets Manager secret for credentials to private registry | string |`null`| no |
31
40
| security\_group\_ids | Security group to use for the Fargate task. | list |`<list>`| no |
32
41
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
42
+
| tag\_service | Apply cost tags to the ECS service. Only specify false for backwards compatibility with old ECS services. | bool |`true`| no |
33
43
| task\_definition | JSON to describe task. If omitted, defaults to a stub task that is expected to be managed outside of Terraform. | string |`null`| no |
34
44
| task\_role\_arn || string | n/a | yes |
35
45
| task\_subnets | Subnets to launch Fargate task in. | list |`<list>`| no |
Copy file name to clipboardexpand all lines: aws-ecs-job/README.md
+11
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,16 @@ container definition external to Terraform (e.g. using [czecs](https://github.co
13
13
Terraform will use a stub definition, but from that point forward will ignore any
14
14
changes to the definition, allowing external task definition management.
15
15
16
+
## Migrating old ECS services
17
+
Older ECS services were created with an ARN in an old format that did not include the ECS cluster name as part of the ARN. AWS began allowing opt-in to the new ARN format starting November 15, 2018, and will require the new format starting January 1, 2020. ECS only allows applying tags (such as cost tags) on services that have the new ARN format. Applying tags to older ECS services using the old ARN format will return the following error message:
18
+
```
19
+
InvalidParameterException: Long arn format must be used for tagging operations
20
+
```
21
+
This module by default will assume your organization has opted in to the new ARN format and will apply tags to the ECS service. Creating new services after the opt-in will work fine, but migrating an existing older ECS service to using this module (via a state mv or an import) will encounter the above error message the next time it is applied.
22
+
23
+
Since changing a service to use the new ARN requires destroying and recreating the service, this can result in downtime. In such cases, you can opt-out applying tags by passing `tag_service = false` as an argument to the module. It is recommended that at the next possible down time, the ECS service be replaced by running `terraform taint`, and if `manage_task_definition = false` restoring the ECS task definition version (the taint/replace will restore to only the last stub definition). After the service is destroy/replaced, the `tag_
24
+
service = false` argument can be removed.
25
+
16
26
<!-- START -->
17
27
## Inputs
18
28
@@ -27,6 +37,7 @@ changes to the definition, allowing external task definition management.
27
37
| project | Project for tagging and naming. See [doc](../README.md#consistent-tagging)| string | n/a | yes |
28
38
| scheduling\_strategy | Scheduling strategy for the service: REPLICA or DAEMON. | string |`"REPLICA"`| no |
29
39
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
40
+
| tag\_service | Apply cost tags to the ECS service. Only specify false for backwards compatibility with old ECS services. | bool |`true`| no |
30
41
| task\_definition | JSON to describe task. If omitted, defaults to a stub task that is expected to be managed outside of Terraform. | string |`null`| no |
# this is the name of the service and many of the resources will have this name
96
96
service = "myservice"
@@ -142,6 +142,16 @@ tasks with DNS via ECS service discovery. If with_service_discovery is true, a n
142
142
DNS zone is created, and the tasks are registered in that DNS zone. The domain name is only
143
143
resolvable from within the VPC; it is not publicly resolvable.
144
144
145
+
## Migrating old ECS services
146
+
Older ECS services were created with an ARN in an old format that did not include the ECS cluster name as part of the ARN. AWS began allowing opt-in to the new ARN format starting November 15, 2018, and will require the new format starting January 1, 2020. ECS only allows applying tags (such as cost tags) on services that have the new ARN format. Applying tags to older ECS services using the old ARN format will return the following error message:
147
+
```
148
+
InvalidParameterException: Long arn format must be used for tagging operations
149
+
```
150
+
This module by default will assume your organization has opted in to the new ARN format and will apply tags to the ECS service. Creating new services after the opt-in will work fine, but migrating an existing older ECS service to using this module (via a state mv or an import) will encounter the above error message the next time it is applied.
151
+
152
+
Since changing a service to use the new ARN requires destroying and recreating the service, this can result in downtime. In such cases, you can opt-out applying tags by passing `tag_service = false` as an argument to the module. It is recommended that at the next possible down time, the ECS service be replaced by running `terraform taint`, and if `manage_task_definition = false` restoring the ECS task definition version (the taint/replace will restore to only the last stub definition). After the service is destroy/replaced, the `tag_
153
+
service = false` argument can be removed.
154
+
145
155
<!-- START -->
146
156
## Inputs
147
157
@@ -176,6 +186,7 @@ resolvable from within the VPC; it is not publicly resolvable.
176
186
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
177
187
| ssl\_policy | ELB policy to determine which SSL/TLS encryption protocols are enabled. Probably don't touch this. | string |`null`| no |
178
188
| subdomain | Subdomain in the zone. Final domain name will be subdomain.zone | string | n/a | yes |
189
+
| tag\_service | Apply cost tags to the ECS service. Only specify false for backwards compatibility with old ECS services. | bool |`true`| no |
179
190
| task\_definition | JSON to describe task. If omitted, defaults to a stub task that is expected to be managed outside of Terraform. | string |`null`| no |
180
191
| task\_role\_arn || string | n/a | yes |
181
192
| task\_subnets | List of subnets in which to deploy the task for awsvpc networking mode. | list |`[]`| no |
# this is the name of the service and many of the resources will have this name
92
92
service = "myservice"
@@ -134,6 +134,16 @@ tasks with DNS via ECS service discovery. If with_service_discovery is true, a n
134
134
DNS zone is created, and the tasks are registered in that DNS zone. The domain name is only
135
135
resolvable from within the VPC; it is not publicly resolvable.
136
136
137
+
## Migrating old ECS services
138
+
Older ECS services were created with an ARN in an old format that did not include the ECS cluster name as part of the ARN. AWS began allowing opt-in to the new ARN format starting November 15, 2018, and will require the new format starting January 1, 2020. ECS only allows applying tags (such as cost tags) on services that have the new ARN format. Applying tags to older ECS services using the old ARN format will return the following error message:
139
+
```
140
+
InvalidParameterException: Long arn format must be used for tagging operations
141
+
```
142
+
This module by default will assume your organization has opted in to the new ARN format and will apply tags to the ECS service. Creating new services after the opt-in will work fine, but migrating an existing older ECS service to using this module (via a state mv or an import) will encounter the above error message the next time it is applied.
143
+
144
+
Since changing a service to use the new ARN requires destroying and recreating the service, this can result in downtime. In such cases, you can opt-out applying tags by passing `tag_service = false` as an argument to the module. It is recommended that at the next possible down time, the ECS service be replaced by running `terraform taint`, and if `manage_task_definition = false` restoring the ECS task definition version (the taint/replace will restore to only the last stub definition). After the service is destroy/replaced, the `tag_
145
+
service = false` argument can be removed.
146
+
137
147
<!-- START -->
138
148
## Inputs
139
149
@@ -166,6 +176,7 @@ resolvable from within the VPC; it is not publicly resolvable.
166
176
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
167
177
| ssl\_policy | ELB policy to determine which SSL/TLS encryption protocols are enabled. Probably don't touch this. | string |`null`| no |
168
178
| subdomain | Subdomain in the zone. Final domain name will be subdomain.zone | string | n/a | yes |
179
+
| tag\_service | Apply cost tags to the ECS service. Only specify false for backwards compatibility with old ECS services. | bool |`true`| no |
169
180
| task\_definition | JSON to describe task. If omitted, defaults to a stub task that is expected to be managed outside of Terraform. | string |`null`| no |
170
181
| task\_role\_arn || string | n/a | yes |
171
182
| task\_subnets | List of subnets in which to deploy the task for awsvpc networking mode. Only used if awsvpc_network_mode is true. | list |`[]`| no |
0 commit comments