quaint-telephone-89068
09/16/2026, 8:46 PMterraform_deployment target as a dependency leads to the dependency being silently ignored. This seems wrong, something should happen when you depend on a terraform_deployment.
My specific use case is I have two separate `terraform_deployment`s where module A provisions a resource which is needed by module B. I want to express this relationship through a dependency so that I can run experimental-deploy once. Currently the workaround is to run experimental-deploy multiple times.
If any of that isn't clear, please see this example which demonstrates the issue.
Describe the solution you'd like
This feels clear to me in one specific instance: A terraform_deployment that depends on another terraform_deployment should trigger a deployment of that dependency first.
It's less clear to me what should happen when it's eg. a python_test that depends on a terraform_deployment. There might be a use case for this eg. smoke testing after a successful deployment but what happens if that terraform_deployment itself has other dependencies? Currently a terraform_deployment can't trigger a package step, but what if we changed that? How does one then control the `publish_dependencies` option of the experimental-deploy goal if you are instead running a test goal? @alonsodomin raised a similar concern about running `publish` on a `deploy` and whether that's actually an intuitive thing to do. Running a deployment when you're running a test feels like a more extreme version of the same design problem.
Because of this lack of clarity, I suggest we initially scope this to a terraform_deployment is only supported as a dependency of another terraform_deployment, everything else is an error.
Describe alternatives you've considered
A terraform_deployment as a dependency is always an error - we never allow depending on other `terraform_deployment`s. This would break my use case, but what I'm proposing does feel like it's starting to push uncomfortably on the design of goals.
Additional context
See example repo here: `ranisputnik/pants-examples//terraform-deploy-behaviour`.
pantsbuild/pants