Using the Cloud Backend with OpenTF CLI
The OpenTF CLI lets you use cloud backends on the command line.
When you use the cloud backend CLI workflow, operations like opentf plan
or opentf apply
are remotely executed in the cloud backend's run environment by default, with log output streaming to the local terminal. This lets you use cloud backend's features within the familiar OpenTF CLI workflow. Cloud backend services may choose to implement only a subset of the available features.
Workspaces can also be configured for local execution, in which case the cloud backend only stores state. In this mode, the cloud backend behaves just like a standard state backend.
Documentation Summary
- Cloud Backend Settings documents the
cloud
block that you must add to your configuration to enable cloud backend support. - Initializing and Migrating describes how to start using the cloud backend with a working directory that already has state data.
- Command Line Arguments lists the OpenTF command flags that are specific to using OpenTF with the cloud backend.