Closed deweysasser closed 6 years ago
I have the same problem with container_definitions
appearing as changed again after applying changes. It seems that null values are not filtered out anymore, and the order of environment variables seems to be different...
container_definitions: "g9:batch:archive_inactive_users"
],
"cpu": 100,
"environment": [
{
+ "name": "redis_request_1",
+ "value": "{snip}"
+ },
+ {
"name": "RAILS_ENV",
"value": "ci"
},
{
"name": "maria_db_host",
{
"name": "riak_host",
"value": "{snip}"
},
{
- "name": "redis_request_1",
- "value": "{snip}"
- },
- {
- "name": "NEWRELIC_AGENT_ENABLED",
- "value": "false"
+ "name": "polly_host",
+ "value": "{snip}"
},
{
"name": "THIN_COUNT",
"value": "2"
},
{
- "name": "polly_host",
- "value": "{snip}"
+ "name": "NEWRELIC_AGENT_ENABLED",
+ "value": "false"
}
],
"essential": true,
"image": "{snip}",
"links": [
],
"name": "archiver",
"portMappings": [
],
+ "privileged": null,
- "volumesFrom": [
-
- ],
}
]
This only started happening after upgrading the provider version to version: ~> 1.3
.
Hm, and it looks like this is fixed by https://github.com/terraform-providers/terraform-provider-aws/pull/2339... so the issue can probably be closed.
@bforchhammer Could you check it on your own, compiling the master branch, and let us know?
Thanks!
(@bforchhammer) I built master and tried this test case under linux. It does indeed seem that #2339 fixed this issue.
For any who comes after looking at this issue, in order to make everything work properly you should reference the arn
of the task definition in the aws_ecs_service
, rather than the id
.
In other words: task_definition = "${aws_ecs_task_definition.task.arn}"
and NOT task_definition = "${aws_ecs_task_definition.task.id}"
The issue is that the task_definition field of the aws_ecs_service
gets the version number appended, which is always different than the unversioned task name. Also note that this change does NOT fix the original issue without #2339 applied.
I'm going to close this out, as #2339 reportedly fixes it. Sorry for the issues!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Terraform Version
Affected Resource(s)
Terraform Configuration Files