Commit Graph

2516 Commits

Author SHA1 Message Date
Martin Atkins
9a161adbe3 go.mod: Upgrade to Go 1.25 (#3166)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-08-22 07:10:11 -04:00
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
e342597e17 Print docker logs of the failing check for easier debug in CI (#3139)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-08-13 17:47:26 +03:00
James Humphries
9d47636173 Clarify dynamodb vs s3-native locking guidance (#3109)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-08-11 10:46:46 +01:00
Aaron George
e802c63f58 Add tag options for S3 state backend objects (#3038)
Signed-off-by: Aaron George <aarongeorge1994+github@gmail.com>
Co-authored-by: Andrei Ciobanu <andreic9203@gmail.com>
2025-08-07 10:39:19 +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
5fb4a1aed2 Using a Key on ExtraInfo to differentiate between Consolidation Warnings (#3036)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
2025-07-24 12:20:57 -03:00
Clément Denis
7dd55ebd5a Update documentation regarding short-circuiting boolean operators (#3063)
Signed-off-by: Clément Denis <clement.denis@gmail.com>
2025-07-24 14:04:52 +04: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
baa-ableton
5e4924a8b2 Issue 2581: Flaky PR test due to outdated Docker Compose file entries (#3052)
Signed-off-by: Babur Ayanlar <babur.ayanlar@ableton.com>
2025-07-23 09:13:49 -04:00
Diógenes Fernandes
cb73ae4299 docs for provider for_each in modules and resources (#2696)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-07-15 16:54:32 -03:00
Martin Atkins
cbfeb0fdc8 jsonconfig: Additional details about input variables
The JSON object describing an input variable can now include two additional
properties:

- "type" provides a JSON representation of the variable's type constraint,
  if one is set. Omitted if either there is no constraint declared at all
  or if it's set to "any", which are equivalent and both mean that the
  type is completely unconstrained.

  This uses the standard cty representation of a type constraint, which
  matches how OpenTofu already describes types in the provider protocol,
  in state snapshots, and in saved plan files.
- "required" directly represents whether callers are required to provide
  a value for the variable. This is technically redundant since it is
  set to true unless "default" is also set, but this avoids the need for
  consuming software to reimplement this rule and potentially allows us to
  make this rule more complicated/subtle in future if needed.

For some reason the documentation about the JSON configuration
representation did not previously mention the "variables" property at all,
so this adds documentation for both the new properties and the pre-existing
properties.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-07-11 09:25:30 -07: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
adenhuen
6fa79a7de3 docs: update JSON Output Format page (#2885)
Signed-off-by: Ados <aden.huen@gmail.com>
2025-06-10 10:33:27 -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
Andrei Ciobanu
4adc571c8c Fix a typo in the external method code snippet (#2881)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-06-02 15:19:47 +03: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
Ruben Aleman
dfcb220edd docs: fix headers default value for backend http (#2864)
Signed-off-by: Ruben Aleman <github@rubenaleman.de>
2025-05-27 11:26:59 +01: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
Skyper
26a77c9156 website: mark input passphrase for state encryption as sensitive
Signed-off-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
2025-05-07 16:39:01 -07:00
Andrei Ciobanu
0d3d36778d Update some names in the encryption docs (#2762)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-05-07 16:06:22 +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
Oleksandr Levchenkov
89296b438a add explanation of supported commands for deprecation warnings (#2737)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-05-02 11:31:03 +03: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
Andrei Ciobanu
3c51831e5c Enhance removed block with lifecycle and provisioner functionalities (#2628)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-04-25 06:29:42 -04:00
Oleksandr Levchenkov
8589d20d50 add website docs for deprecation attrs (#2706)
Signed-off-by: ollevche <ollevche@gmail.com>
2025-04-25 12:26:40 +03: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
Christian Mesh
5e714bc315 Add warning for sensitive state outputs in terraform_remote_state (#2697)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-04-24 07:55:53 -04: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
Taliesin Sisson
690a38dd69 Make table name and index name a config value for PG backend (#2465)
Signed-off-by: Taliesin Sisson <taliesins@yahoo.com>
2025-04-09 17:21:25 -04:00
Eligio Mariño
15f9d754b1 website: add windows installation page (#2626)
Signed-off-by: Eligio Mariño <22875166+gmeligio@users.noreply.github.com>
2025-04-08 07:18:40 -04: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
Andrei Ciobanu
325bf395fb Reword skip_s3_checksum mentions in the migration guides (#2608)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
2025-03-18 17:07:08 +02: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
Timothée Ravier
47ec05fef5 website: Fix the cosign verification example to allow shell glob expansion
Signed-off-by: Timothée Ravier <tim@siosm.fr>
2025-03-17 11:27:13 -07: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
Andrei Ciobanu
eba25e2fed Add the initial implementation for s3 locking (#2521)
Signed-off-by: yottta <andrei.ciobanu@opentofu.org>
2025-02-25 14:17:30 +02:00
Alexander Scheel
c66319a56b Remove experimental marker from OpenBao transit (#2536)
Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
2025-02-21 10:00:13 -05:00
Ilia Gogotchuri
ec4e0cf0e2 Migration of null resource to terraform data (#2481)
Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
2025-02-06 17:45:00 +04:00