0

I am using terraform on my Mac system, and terraform apply results with below error

Error: command "bash" failed with no error message
 on ssm.tf line 7, in data "external" "ssm-dynamic-general":
  7: data "external" "ssm-dynamic-general" {

However there is nothing wrong in ssm.tf file, same runs perfectly fine in my another system.

Can some one please let me know what i am missing here?

1
  • As per error it seems like it's not related to ssm.tf instead its giving error from the program which you are executing as "external data source". Can you add the whole ssm-synamic-general external data source. Commented Jan 24, 2020 at 5:05

1 Answer 1

1

You might have done what I accidentally did: not follow the external program protocol:

https://www.terraform.io/docs/providers/external/data_source.html#external-program-protocol

In my particular case, I failed to send the errors that were coming from my program to standard error. Instead, those errors were going to standard out.

That's why Terraform wasn't able to report on those errors.

So if you send any and all errors from your program to standard error using > &2, you should be able to see those errors when you run terraform plan.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.