Commit Graph

396 Commits

Author SHA1 Message Date
Diógenes Fernandes
11d416edf9 add for_each attribute to the mock_provider block (#3087)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-08-18 10:36:04 -03:00
Andrei Ciobanu
01493c357f Update apply documentation with the newly accepted -var/-var-file arguments (#3091)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-08-01 16:25:39 +03:00
Diógenes Fernandes
e718044193 docs: consolidate warnings are enabled by default (#3064)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-07-23 17:35:59 -03:00
Martin Atkins
6a27c82bb4 tofu show: -module=DIR mode, for showing just a single module
We previously added the -config mode for showing the entire assembled
configuration tree, including the content of any descendent modules, but
that mode requires first running "tofu init" to install all of the
provider and module dependencies of the configuration.

This new -module=DIR mode returns a subset of the same JSON representation
for only a single module that can be generated without first installing
any dependencies, making this mode more appropriate for situations like
generating documentation for a single module when importing it into the
OpenTofu Registry. The registry generation process does not want to endure
the overhead of installing other providers and modules when all it actually
needs is metadata about the top-level declarations in the module.

To minimize the risk to the already-working full-config JSON representation
while still reusing most of its code, the implementation details of package
jsonconfig are a little awkward here. Since this code changes relatively
infrequently and is implementing an external interface subject to
compatibility constraints, and since this new behavior is relatively
marginal and intended primarily for our own OpenTofu Registry purposes,
this is a pragmatic tradeoff that is hopefully compensated for well enough
by the code comments that aim to explain what's going on for the benefit
of future maintainers. If we _do_ find ourselves making substantial changes
to this code at a later date then we can consider a more significant
restructure of the code at that point; the weird stuff is intentionally
encapsulated inside package jsonconfig so it can change later without
changing any callers.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-07-10 13:18:26 -07:00
Martin Atkins
23d2eafe67 website: OCI provider mirror build doesn't need --artifact-platform (#2964)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-06-30 07:32:04 -04:00
Christian Mesh
59659c8009 Add TOFU_CPU_PROFILE for enabling go pprof (#2904)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-06-16 09:02:54 -04:00
baa-ableton
3bdd0073a5 command: tofu show -config (#2820)
Signed-off-by: Babur Ayanlar <babur.ayanlar@ableton.com>
2025-06-02 10:15:46 -07:00
Martin Atkins
85a90f3d78 website: OCI provider mirror shouldn't talk about prereleases anymore
This text was from earlier on in the development period when we hadn't yet
settled on a strategy, but now we are intending to work with the ORAS team
so that ORAS can construct index manifests in the form that OpenTofu
expects, so we'll talk about that instead of making a comment about
prereleases that will become confusing once OpenTofu v1.10.0 final is
released.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-05-28 08:55:29 -07:00
Patrick Decat
9ac06d3c8b docs: relocate sentence about .terraformignore to proper section (#2812)
Signed-off-by: Patrick Decat <pdecat@gmail.com>
2025-05-16 13:54:30 +03:00
Andrei Ciobanu
2ef59e2299 Add note about the diff dependency on the fmt command (#2801)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-14 15:33:59 +03:00
Andrei Ciobanu
8305bfb2ef Rename the CLI arg for deprecation outputs/variables (#2774)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-09 14:01:32 +03:00
Andrei Ciobanu
22dc9b2137 Add new CLI arg to control what warnings should be shown for deprecated outputs/variables (#2705)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-08 17:01:40 +03:00
Martin Atkins
91da758a9a website: Remove the "very early draft" note from OCI Registry content
For the v1.10.0-alpha1 release, where we weren't even feature-complete yet,
we included a callout box warning that features were incomplete and details
subject to change.

We're not expecting to issue another alpha before we reach the beta phase
during which we'll be aiming to change the design of these features as
little as possible, so it's time to remove that callout box.

In its place we now have a short statement about which versions of the
OCI Distribution protocol we support. Because some registries allow and
just ignore unrecognized properties in submitted manifests it is possible
that these features will work with older implementations, but such support
is not guaranteed by earlier versions of the specification. In practice,
OCI Distribution v1.1.0 is already quite well-deployed.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-05-06 07:56:54 -07:00
Martin Atkins
b78ab83f76 website: Note about Docker-style credential helper configuration
From feedback in alpha testing of the new OCI Distribution features we
learned that on some platforms Docker CLI automatically searches for
platform-specific credential helpers and uses them automatically when
found, but OpenTofu intentionally does not copy that behavior.

We'll now be explicit about that intentional difference in a callout box
in the documentation. This is unfortunately the kind of situation where
an affected person is unlikely to read the documentation to find out what
_isn't_ supported, and so this content is primarily intended to appear
in search results and other similar indirect querying, rather than by the
reader encountering it organically while reading the documentation. It's
therefore placed adjacent to the configuration option that someone might
use to solve the problem once they've learned about it.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-05-06 07:56:54 -07:00
Diógenes Fernandes
8440f6c095 docs: clarifying -filter and -test-directory behavior in tofu test (#2717)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-04-28 07:09:55 -04:00
Christian Mesh
d0ee5a36a5 Provider plugin cache locking (#1878)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-04-25 09:39:17 -04:00
Martin Atkins
f42dfbc497 tofu show: new explicit/extensible usage style
The "tofu show" command has historically been difficult to extend to meet
new use-cases, such as showing the current configuration without creating
a plan, because it was designed to take zero or one arguments and then try
to guess what the one specified argument was intended to mean.

This commit introduces a new style where the type of object to inspect is
specified using command line option syntax, using one of two
mutually-exclusive options:

    -state      Show the latest state snapshot.
    -plan=FILE  Show the plan from the given saved plan file.

We expect that a future commit will extend this with a new "-config" option
to inspect the configuration rooted in the current working directory, and
possibly with "-module=DIR" to shallowly inspect a single module without
necessarily having to fully initialize it with all of its dependencies
first. However, both of those use-cases (and any others) are not in scope
for this commit, which is focused only on refactoring to make those future
use-cases possible.

The old mode of specifying neither option and providing zero or one
positional arguments is still supported for backward compatibility.
Notably, the legacy style is the only way to access the legacy behavior of
inspecting a specific state snapshot file from the local filesystem, which
has not often been used since Terraform v0.9 as we've moved away
from manual management of state files to the structure of state backends.
Those who _do_ still need that old behavior can still access it in the
old way, but there will be no new-style equivalent of it unless we learn
of a compelling use case for it.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-04-24 15:04:11 -07:00
Diógenes Fernandes
4a64aa9192 Add remote sources to module on tofu test (#2651)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diógenes Fernandes <diofeher@opentofu.org>
Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-04-24 14:02:22 -03:00
Martin Atkins
1260f2218c Documentation for the new -target-file and -exclude-file planning options (#2691)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-04-23 07:56:51 -04:00
Martin Atkins
1421849989 website: Documentation for module packages in OCI repositories
This is a first draft of documentation describing our new capability to
treat artifacts in OCI Distribution repositories as a new kind of remote
module package.

This documentation includes both some caller-focused documentation that
extends our existing "Module Sources" page, and some documentation intended
more for the author of a module package describing how they could publish
their package as an OCI artifact that OpenTofu will accept.

As usual, we'll continue to refine this documentation based on feedback
during the prerelease period and beyond.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-04-21 10:11:44 -07:00
Diógenes Fernandes
daa59d2ca8 Reflecting the current state of module source on tofu test docs (#2666)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-04-16 09:41:21 -03:00
Martin Atkins
daabee5873 website: OCI provider mirror setup additional index manifest step
We are currently documenting how to manually edit the index manifest while
we wait for the ORAS CLI support for this to be finalized, but the initial
draft of these instructions missed the step of annotating each manifest
with the platform it's intended for.

(We intend to replace all of this manual setup with a single ORAS CLI
command once the associated functionality is finalized there. At the time
of writing this message, the ORAS project is preparing that functionality
for their forthcoming v1.3.0 release.)

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-03-27 08:53:26 -07:00
Martin Atkins
1b673291bc website: Very early docs for the new OCI Registry functionality
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-03-26 09:49:23 -07:00
Ilia Gogotchuri
39d65540af Adds docs for tests - run references in test files (#2607)
Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
2025-03-18 18:38:35 +04:00
Diógenes Fernandes
662b101112 feat: remove progress messages from commands using -concise argument (#2549)
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-03-04 11:30:31 -03:00
Oleksandr Levchenkov
d7af2c4d39 update tofu console docs for non-interactive use-case (#2369)
Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Oleksandr Levchenkov <ollevche@gmail.com>
Co-authored-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2025-01-14 19:03:30 +02:00
Christian Mesh
f6a1d8e2dd Support References in Variable Validation (#2216)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-12-04 14:24:44 -05:00
Oleksandr Levchenkov
6c8bfa2794 implement override resources for mock providers (#2168)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-12-03 11:24:26 -05:00
Oleksandr Levchenkov
5264ccee99 fix documentation typo in mock provider link (#2146)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-11-06 17:30:40 +02:00
Arel Rabinowitz
3d4bf29c56 Add exclude flag support (#1900)
Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
2024-11-05 10:16:00 -05:00
Nathan Baulch
9b7bec31b4 Another batch of minor typos (#1953)
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-09 07:51:39 -04:00
Nathan Baulch
ea558d9d4b Fix typos (#1905)
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-08-29 13:20:33 -04:00
Ronny Orot
23d69e2351 Cloud Backend - Fix logic that forces TF_WORKSPACE to be equal to a tag name (#1930)
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
2024-08-22 10:55:50 +03:00
Jordan Pitlor
0e6d14b301 Update environment-variables.mdx (#1885)
Signed-off-by: Jordan Pitlor <jpitlor@gmail.com>
Signed-off-by: Jordan Pitlor <jordan@pitlor.dev>
2024-08-07 11:25:44 +03:00
Oleksandr Levchenkov
c3ddd51d8c update documentation images (#1864)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-07-29 11:47:07 -04:00
Christian Mesh
3b3822d770 Improve documentation around static evaluation (#1843)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: ollevche <ollevche@gmail.com>
Co-authored-by: ollevche <ollevche@gmail.com>
2024-07-23 09:31:50 -04:00
Andrew Hayes
520165c089 Adds TACOS page to docs and links to it from all mentionds of TACOS (#1836)
Signed-off-by: Andrew Hayes <andrew.hayes@harness.io>
2024-07-23 09:55:58 +01:00
Ronny Orot
faf9f6aedc Add documentation about the new .tofu extension (#1841)
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
2024-07-22 18:35:59 +03:00
Oleksandr Levchenkov
9d9a7aab06 add mock providers for testing framework (#1772)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-07-09 14:41:52 +03:00
Oleksandr Levchenkov
64fb36dc54 add override implementation for testing framework (#1499)
Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Oleksandr Levchenkov <ollevche@gmail.com>
Co-authored-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Co-authored-by: Ronny Orot <ronny.orot@gmail.com>
2024-06-06 13:20:41 +03:00
Alex Ott
7e1a02cbb8 Make persist interval for remote state backend configurable (#1591)
Signed-off-by: Alex Ott <alexott@gmail.com>
Co-authored-by: Siddhartha Sonker <158144589+siddharthasonker95@users.noreply.github.com>
2024-05-28 13:47:16 -04:00
Oleksandr Levchenkov
8361438c52 remove copyright headers from website examples and lock files (#1687)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-05-28 13:40:19 -04:00
Wei
542ad1b29c docs: broken link (#1659)
Signed-off-by: Wei Hong <zxc37984@gmail.com>
2024-05-20 11:15:44 -04:00
SaiCharanReddyAdla
a4fb0f3fa3 Fix #1375 - missing cli command options (#1448)
Signed-off-by: SaiCharanReddy Adla <saicharanreddy.adla@fmr.com>
Signed-off-by: SaiCharanReddyAdla <163337878+SaiCharanReddyAdla@users.noreply.github.com>
2024-04-25 14:29:47 +02:00
Janos
a15a6c9657 Versioned docs: replacing docs links with relative variants (#1537)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: Damian Stasik <920747+damianstasik@users.noreply.github.com>
Signed-off-by: Roman Grinovski <roman.grinovski@gmail.com>
Co-authored-by: Damian Stasik <920747+damianstasik@users.noreply.github.com>
Co-authored-by: Roman Grinovski <roman.grinovski@gmail.com>
2024-04-24 13:24:30 +02:00
Syasusu
0b90cc3383 doc: add -json flag doc for init and get command (#1460)
Signed-off-by: Syasusu <syasusu@163.com>
2024-04-08 13:17:40 +02:00
Yuvraj
aa8b4a7cca feat: add retry in provider install (#1255)
Signed-off-by: Yuvraj <evalsocket@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: James Humphries <James@james-humphries.co.uk>
2024-04-01 12:41:18 -04:00
Sanskruti Shahu
08f9a740ac Added support to use .tfvars files from tests folder (#1386)
Signed-off-by: sanskruti-shahu <sanskruti.shahu@harness.io>
2024-03-29 08:44:27 -04:00
Shashwat Pandey
e539576a84 added documentation of -concise flag for plan (#1356)
Signed-off-by: Shashwat Pandey <72958686+SypherSP@users.noreply.github.com>
2024-03-11 12:03:54 +01:00
Christian Mesh
5ab6167bbf Initial wiring of encryption through the command package (#1316)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-03-07 08:55:57 -05:00