conn3x show
conn3x show prints the current state, or a plan file saved with conn3x plan -out. It reads only state or the file. It doesn’t connect to the cloud or the hosts.
conn3x show [options] [PLAN]With no arguments, show prints the latest state.
What Conn3x changes
Section titled “What Conn3x changes”State holds host steps alongside cloud resources, so show lists both. Each host step instance appears under its address, conn3x_MODULE.CIRCUIT__STEP["HOST"], with what Conn3x last read from or wrote to the host, and the ssh settings it used to connect.
For a file written with content_wo, state has no content. show displays content_hmac instead, and never the secret. See Secrets in files.
Options
Section titled “Options”| Option | Description |
|---|---|
-state |
Show the latest state. This is the default. |
-plan=FILE |
Show a saved plan. The same as giving the file as an argument. |
-config |
Show the configuration. Needs -json. |
-module=DIR |
Show the module configuration in DIR. Needs -json. |
-json |
Print machine-readable JSON. |
-show-sensitive |
Show sensitive values instead of (sensitive value). |
-no-color |
Don’t use terminal colors. |
For the JSON formats, see OpenTofu’s show page.
Examples
Section titled “Examples”Show the current state:
conn3x showReview a saved plan, then apply it:
conn3x plan -out=tfplanconn3x show tfplanconn3x apply tfplanList the address of every host step in the root module, with jq:
conn3x show -json | jq -r '.values.root_module.resources[] | select(.mode == "managed" and (.type | startswith("conn3x_"))) | .address'Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | An error, such as a plan file that can’t be read. |