-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using depends_on with splat output from external provider #21151
Comments
Hi @thomasinsel, Sorry about the unexpected behavior here, but the We're tracking this case in #18600, and a proposal for changing the lifecycle of data sources in #17034. |
Got it @jbardin, but could you tell me the recommended method to ensure that a custom executable used for an external provider exists? My plan would have been to make the data provider depend on a local_file resource. Thanks! |
@thomasinsel generating a program with resource "local_file" "example" {
filename = "${path.module}/example"
content = "..."
}
data "external" "example" {
program = ["${local_file.example.filename}"]
}
|
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I don't think this is specific to the external provider, but it's the simplest way to demonstrate the problem.
Terraform Version
Terraform Configuration Files
Expected Behavior
Actual Behavior
Steps to Reproduce
I'm trying to use an external provider to transform a list. In the real world, this would be converting a list of hostnames to IP addresses. In the example, I just use
cat
to do nothing. Since I want a list instead of a list of maps, I use output${data.external.cat.*.result.fruit}
.If I comment out the
depends_on
line and runterraform init && terraform apply
, everything works as expected.But, with
depends_on
it gives the error above.Also,
${data.external.cat.*.result}
works fine in either case.The text was updated successfully, but these errors were encountered: