7708 Commits

Author SHA1 Message Date
Ilia Gogotchuri
1eacb9a046 Retaining resources during destruction - New flag -suppress-forget-errors (#3588)
Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
2025-12-16 15:41:03 +04:00
H.K.
88c59b6b25 Update JSON syntax documentation for variables in module & terraform blocks (#3587)
Signed-off-by: H.K. <angivare-contact@yahoo.fr>
2025-12-15 07:54:55 -05:00
James Humphries
da2da475a0 Improve documentation around enabled meta-argument (#3576)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-12-11 10:37:16 +00:00
James Humphries
f559cdd1bf Small tweaks to ephemeral variable documentation (#3577)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-12-11 10:37:11 +00:00
Andrei Ciobanu
1907ce104c Update index to mention the new version (#3556)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-12-09 18:05:48 +02:00
Ilia Gogotchuri
fd19a3763f Retain resource instances with a new lifecycle argument - destroy (#3409)
Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-12-04 18:49:57 +04:00
Martin Atkins
82fdad27fc website: "tofu providers schema" nested_type docs
At some point after this documentation was originally written the schema
structure grew to include the possibility of structural attribute types,
represented using "nested_type" instead of "type" in the attribute
definition, but it seems that the documentation was not updated to mention
that.

This is just a minimal extra note about that focused mainly on just
acknowledging that this possibility exists at all, in case anyone is
relying on these docs to build something to parse this format. It would
probably be helpful to expand both this and the existing documentation to
specify the format more precisely, but my focus here is just on quickly
filling in this missing piece so that the documentation is complete, even
if not detailed and precise.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-19 07:20:49 -08:00
Andrei Ciobanu
c29cd93f21 [main] Fixes for GH workflows for older OpenTofu versions (#3485)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-11-11 11:12:20 +02:00
Martin Atkins
e389a7f2fa website: Warn about "tofu output -raw" in a terminal
By design the "-raw" option to "tofu output" writes the literal output
value directly to stdout without any quoting or escaping, and so it's
risky to use it with an output value that could be controlled by an
attacker when stdout is a terminal.

This risk is inherent in the purpose of this option and is part of the
reason why this is not the default behavior (OpenTofu returns a quoted
representation of an output string by default) so here we just make that
risk explicit in the documentation, in the hope that operators will use
this operation mindfully.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-10 09:49:35 -08:00
nemobis
6d0d9b8773 docs: Fix typo in sensitive.mdx (#3431)
Signed-off-by: nemobis <federico.leva@relexsolutions.com>
2025-10-30 15:11:44 -05:00
Andrei Ciobanu
ab51186a30 Add examples on how to use 'state_tags' and 'lock_tags' (#3437)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-29 11:23:59 +02:00
Martin Atkins
68fbe8d8d7 website: "element" function supports negative indices
We got this new functionality from an upgrade of the upstream cty library,
but we didn't update the docs to mention it.

The examples in this doc were also evidently generated with a much older
version of OpenTofu's predecessor, because the illustrated output was not
shown as a quoted string. The example output now matches how the current
version of "tofu console" would describe these results.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-28 15:11:26 -07:00
Andrei Ciobanu
934be4ad5e Glossary - initial version (#3411)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-28 11:41:31 +02:00
Christian Mesh
f161c7cc27 Update what's new page for 1.11 (#3425)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-23 11:32:36 -04:00
James Humphries
9eaba0d83d No longer mention that deprecation of module variables and outputs is experimental (#3417)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-10-23 14:48:10 +01:00
Andrei Ciobanu
4f57c826f0 Add download_retry_count for direct and network_mirror in CLI configuration (#3368)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-18 11:42:25 +03:00
Martin Atkins
dc9bec611c website: Reorganize and tidy some lifecycle-related information
Over time the discussion about "lifecycle" blocks in the documentation
became confusing because the docs originally written for managed resource
lifecycle got partially generalized for resources of other modes and for
module calls, even though each of those has a completely different
lifecycle and thus a different set of lifecycle settings.

This is a first pass at trying to reorganize that so that the "lifecycle"
page is really just an index of all of the different kinds of lifecycle
block that exist in the language, while the main documentation for each
use of that block type now belongs with the documentation of the block
it's nested within.

While working on this I also found that there was some duplication inside
the "data sources" page where the same information was described multiple
times, and a few other cases where things had become inconsistent over
time. This also includes a little extra content to try to clarify the
difference between managed, data, and ephemeral resources and to make it
explicit that the "Resources" section is focused only on managed resources
because that is the primary resource mode.

As usual there's lots more that could be done here -- this documentation
has gradually evolved over time and is full of weird quirks due to that
evolution -- but I decided to draw a line here so that the diff wouldn't
get too large.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-17 15:08:14 -07:00
Diógenes Fernandes
d42dcc3b0a Add docs for the conditional enabled lifecycle attribute (#3380)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-16 13:10:00 -03:00
Andrei Ciobanu
7bcc6464ed Add a note about the lack of feedback on the experimental encryption method and key_provider (#3323)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
Signed-off-by: Andrei Ciobanu <andreic9203@gmail.com>
Co-authored-by: Diógenes Fernandes <diofeher@gmail.com>
2025-10-03 15:33:46 +03:00
Mick Tarsel
cd21e74e75 Remove Community Supported Archs (#3321)
Signed-off-by: Mick Tarsel <mtarsel@gmail.com>
2025-09-30 19:12:05 -03:00
Magicalcrow
4fbbea6f4b Fix typos in uuid and uuidv5 docs
Signed-off-by: Magicalcrow <simondiev@gmail.com>
2025-09-30 09:00:55 -07:00
Larry Bordowitz
bcbfebce3d Implement the Azure Key Provider
This uses the same auth package as the newly-rewritten Azure State
Backend, so many of the properties and environment variables are the
same. I have put this through both the compliance test as well as built
the binary and run some end-to-end tests, and found that it
appropriately uses the Azure key as expected.

Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-09-29 06:19:02 -04:00
Martin Atkins
116826c32f website: S3 module sources now support all standard AWS credential sources
As of go-getter v1.8.0, which we already upgraded in an earlier commit,
the S3 "getter" now uses the AWS SDK's default credentials chain
configuration and so follows the same set of credentials-searching
strategies that AWS CLI and other AWS SDK applications would follow.

We learned this only after having already merged that upgrade, so this is
a retroactive documentation and changelog update to describe the change.
Since go-getter is now delegating this whole question to the AWS SDK, our
future upgrades of the AWS SDK will automatically adopt any upstream
changes to the default credentials chain and so our documentation about
this is now more general than before: the intention is that our users can
generally assume that OpenTofu should support everything that is documented
as supported for the AWS CLI, instead of us listing out an explicit search
sequence that will be long and inevitably become outdated again.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-23 16:38:37 -07:00
James Humphries
0a811e463d docs: Include link to search.opentofu.org in use-cases.mdx (#3295)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-09-22 12:10:57 +01:00
Andrei Ciobanu
aa403e5f99 Add warning about -target arg usage with individual resource instance address (#3280)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-09-19 09:39:22 +03:00
Larry Bordowitz
0090e8a18c Add new configuration to AzureRM Backend (#3251)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-09-15 19:22:17 +01:00
Martin Atkins
2d2b08517e cliconfig: Registry protocol retry count and timeout settings
These were previously settable only via environment variables. These are
now handled as part of CLI Configuration and so also settable in a new
"registry_protocols" block in a CLI configuration file, with the
environment variables now treated as if they are an additional virtual
configuration file containing the corresponding settings.

This handles our settings in our modern style where package cliconfig is
responsible for deciding the configuration and then package main reacts
to that configuration without being aware of how it is decided.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-10 11:45:38 -07:00
Christian Mesh
c8b58e949b Address review comments
Co-authored-by: James Humphries <James@james-humphries.co.uk>
Co-authored-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-10 07:45:23 -04:00
Andrei Ciobanu
57057aef27 Add docs for all ephemeral constructs (#3209)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Diógenes Fernandes <diofeher@opentofu.org>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-10 07:45:23 -04:00
Christian Mesh
6437bfe01f Add tofu.applying (and terraform.applying) (#3170)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-10 07:45:23 -04:00
Christian Mesh
60b268200c Add ephemeralasnull() function (#3154)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-09-10 07:45:23 -04:00
Martin Atkins
528b778363 website: ORAS v1.3 variant of provider OCI mirror construction
ORAS v1.3.0 introduces some new features that allow directly building an
index manifest in the form that OpenTofu expects, so it's no longer
necessary to edit that index manifest manually.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-09-09 13:22:48 -07:00
Larry Bordowitz
63e8845ad9 Refactor the azurerm backend (#3034)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-09-03 11:06:11 -04:00
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
adenhuen
a4f384cf32 docs: add dev version step for local docs (#2886)
Signed-off-by: Ados <aden.huen@gmail.com>
2025-06-10 10:27:23 -04:00