Using terraform, ecr and docker image: Error in data “external” “hash”:

Issue

This Content is from Stack Overflow. Question asked by Jeremy Thompson

I’m trying to build this Project on GitHub:
https://github.com/mathspace/terraform-aws-ecr-docker-image

It fails with this error:

Error: External Program Execution Failed
│
│   with data.external.hash,
│   on push.tf line 3, in data "external" "hash":
│    3:   program = [coalesce(var.hash_script, "C://VS//terraform-aws-ecr-docker-image//hash.sh"), var.source_path]
│
│ The data source received an unexpected error while attempting to execute the program.
│
│ Program: C://VS//terraform-aws-ecr-docker-image//hash.sh
│ Error: fork/exec C://VS//terraform-aws-ecr-docker-image//hash.sh: %1 is not a valid Win32 application.

I’m stumped as to what the problem is with the External Hash being generated?

It’s a clone of this popular Git Repo so unless something changed in the last few years it doesn’t work – despite 26 stars.



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?