You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to execute a CLI command several times per apply run based on some files in a local directory. I do not want to create a local_exec null resource for each of these files and create a mess of "depends_on" logic when a for_each loop could work so much better. The problem is that the CLI being executed by local_exec cannot be run more than one at a time as it locks the remote resource. This causes all other parallel executions to fail.
Attempted Solutions
Setting the global flag "-parallelism=1" solves my issue, but it slows down my entire apply run when I only need one specific resource block to not be executed in parallel.
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.
Terraform Version
Use Cases
I need to execute a CLI command several times per apply run based on some files in a local directory. I do not want to create a local_exec null resource for each of these files and create a mess of "depends_on" logic when a for_each loop could work so much better. The problem is that the CLI being executed by local_exec cannot be run more than one at a time as it locks the remote resource. This causes all other parallel executions to fail.
Attempted Solutions
Setting the global flag "-parallelism=1" solves my issue, but it slows down my entire apply run when I only need one specific resource block to not be executed in parallel.
Proposal
Or as part of the APPLY parameters
References
No response
The text was updated successfully, but these errors were encountered: