mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-16 07:01:11 -05:00
* Initial renaming, rewriting and cleaning up wave for the CLI docs. Signed-off-by: Jakub Martin <kubam@spacelift.io> * More renaming. Signed-off-by: Jakub Martin <kubam@spacelift.io> * More renaming. Signed-off-by: Jakub Martin <kubam@spacelift.io> * More renaming. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Remove tutorial references. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Post-review fixes. Signed-off-by: Jakub Martin <kubam@spacelift.io> --------- Signed-off-by: Jakub Martin <kubam@spacelift.io>
35 lines
1.6 KiB
Plaintext
35 lines
1.6 KiB
Plaintext
---
|
|
page_title: Writing and Modifying Code - OpenTF CLI
|
|
description: >-
|
|
Learn commands that help validate, format, and upgrade code written in the
|
|
OpenTF Configuration Language.
|
|
---
|
|
|
|
# Writing and Modifying OpenTF Code
|
|
|
|
The [OpenTF language](/opentf/language) is OpenTF's primary
|
|
user interface, and all of OpenTF's workflows rely on configurations written
|
|
in the OpenTF language.
|
|
|
|
OpenTF CLI includes several commands to make OpenTF code more convenient
|
|
to work with. Integrating these commands into your editing workflow can
|
|
potentially save you time and effort.
|
|
|
|
- [The `opentf console` command](/opentf/cli/commands/console) starts an
|
|
interactive shell for evaluating OpenTF
|
|
[expressions](/opentf/language/expressions), which can be a faster way
|
|
to verify that a particular resource argument results in the value you expect.
|
|
|
|
- [The `opentf fmt` command](/opentf/cli/commands/fmt) rewrites OpenTF
|
|
configuration files to a canonical format and style, so you don't have to
|
|
waste time making minor adjustments for readability and consistency. It works
|
|
well as a pre-commit hook in your version control system.
|
|
|
|
- [The `opentf validate` command](/opentf/cli/commands/validate) validates the
|
|
syntax and arguments of the OpenTF configuration files in a directory,
|
|
including argument and attribute names and types for resources and modules.
|
|
The `plan` and `apply` commands automatically validate a configuration before
|
|
performing any other work, so `validate` isn't a crucial part of the core
|
|
workflow, but it can be very useful as a pre-commit hook or as part of a
|
|
continuous integration pipeline.
|