Skip to content

Include -input=false for all commands that support it #296

@dshanahan-bt

Description

@dshanahan-bt

For some terraform (TF) commands, if required inputs are omitted TF will prompt to input them form the command line. This workflow doesn't work for pipelines because there isn't a method to input the data. The result is that the pipeline task pauses until the timeout is reached and then ungracefully fail it (leaves the state leased). You can also cancel the pipeline early, which also leaves the state leased.

Both of these methods cost time (either the full timeout time if not observing the pipeline, or the time until you cancel), and require cleanup (breaking the statefile lease).

-input=false will instead cause TF to immediately fail if required values are omitted, and release its lease of the statefile gracefully.

-input=false is supported for at least:

  • init
  • plan
  • apply
  • destroy

Which are some of the most common commands anyhow. Currently you can add -input=false using the command args, but including it feels like better default behaviour than pipelines that hang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions