Skip to main content

Multiline Task

Currently we can run tasks.. but only way to run more than one is by adding a semi-colon, really think there should be a better way to handle this

My scenario is removing specific states, rather than init per state, we end up using semi-colon between each state, this can be large depending how many states we have to remove

Workaround
Status: ✅ Completed3 comments

Log in to comment and vote

Comments3

  • Indigo Milkshake

    •

    Nov 3, 2025

    I would also say, if there is a better way to remove outside of using the task would be helpful as well..

    Our reasoning is because there are times that we are no longer managing a state and would be required to remove it from state rather than deleting the object

    We just had an situation where we were making AWS certificates but instead of handling them through ARN, so we don’t want to remove the certificate but handling them differently

    Whether we have a way to run multiple tasks easier or if there was a different way to remove multiple state resources easier would be helpful

  • Indigo Milkshake

    •

    Nov 3, 2025

    Thanks, while we do have a workaround for this.. we tend to have to throw everything in one command

    tofu rm state state1;tofu rm state state2;tofu rm state state3;tofu rm state state4, etc

    while we could run them one at a time, having to wait each removal, is very slow as most of the time is waiting for the tofu init and also ends up clogging up queue

  • Black Breeze

    •

    Nov 3, 2025

    Thanks for brining this up, Lee! I see where you’re coming from. While this marked as a “nice to have” I'm actually checking with my dev team to see if that’s something we could just fix and ship without unnecessary ceremony.