Commit Graph

33072 Commits

Author SHA1 Message Date
Andrei Ciobanu
84bd72870b Bump RC version (#3514)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
v1.11.0-rc3
2025-11-19 10:02:16 -05:00
Christian Mesh
33e04753a3 Fix import validation with resource reference (unknown value) (#3513)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-11-19 09:58:55 -05:00
Andrei Ciobanu
482132659b Bump RC version (#3502)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
v1.11.0-rc2
2025-11-17 13:52:05 +00:00
James Humphries
111a1f7996 Ensure Ephemeral values are handled by the diff transformer (#3495)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
Signed-off-by: James Humphries <james@james-humphries.co.uk>
Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-11-17 07:42:40 -05:00
Martin Atkins
df34865265 Mention in logs and version output when FIPS-140-3 mode is enabled
Unfortunately the Go team has unilaterally decided that all programs built
with Go 1.24 and later always allow enabling FIPS-140-3 mode -- both in
its "on" and "only" configurations -- regardless of whether the authors
of that software intend to support running in that restricted mode, or
whether they are even testing their application in that configuration.

We have not yet made a final decision on how and whether we intend to
support this mode in our official builds, but we _do_ know that OpenTofu
cannot currently function correctly with this mode enabled because it
relies on standard library features and external libraries that are not
available in that case.

Therefore in the meantime we'll mention explicitly in both the internal
logs and in the "tofu version" output if we appear to be running in that
mode, meaning that if someone tries to use it and finds that it doesn't
work properly then if they open a GitHub issue and share those two
artifacts (as requested by our bug report template) then we can know that
we might need to turn on the special mode in order to reproduce the
reported problem, rather than wasting time trying to reproduce it in the
standard mode.

We do still need to make a final decision about what we want to do with
this in the long run, but this is intended as an short-term compromise
that allows folks to experiment with this unsupported mode if they wish
while hopefully making it clearer that in the mean time we may
deprioritize fixing problems that only occur when this unusual mode is
enabled.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-11-17 07:40:57 -05:00
Martin Atkins
4726dfa00d CHANGELOG: Entry for opentofu/opentofu#3364
The new SDK version we adopted includes new definitions required to support
the eusc-de-east-1 retion, and so this upgrade should be sufficient for
the "s3" state storage backend to work with S3 buckets in that region.

Note that this region is part of the new separate European partition of
AWS, rather than the main commercial partition that's simply called "aws".
This means that it's segregated from regions in the various other
partitions.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-12 08:27:35 -08:00
Andrei Ciobanu
1a37c45171 [v1.11] Fixes for GH workflows for older OpenTofu versions (#3486)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-11-11 11:12:36 +02:00
Christian Mesh
b8c7610084 Fix nil entry in state resource instance map from state hook (#3478)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-11-06 16:28:47 -05:00
James Humphries
2a9256e2cd Bump version for 1.11.0-rc1 (#3466)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
v1.11.0-rc1
2025-11-03 16:05:14 +00:00
Christian Mesh
e6a33e055a Fix OTEL init from semconv conflict (#3446)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-29 15:17:42 -04:00
Martin Atkins
cd28b8ab17 website: "element" function supports negative indices (#3440)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-29 08:14:30 -04:00
Andrei Ciobanu
0a9e6ddfad [Backport][v1.11] for_each inside dynamic blocks can now call provider-defined functions (#3441)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-29 08:13:57 -04:00
Andrei Ciobanu
e80213d497 [Backport][v1.11] Better documentation for state_tags and lock_tags (#3444)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-29 12:01:32 +02:00
Christian Mesh
c3dc5b4a83 Update what's new page for 1.11 (#3425)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-23 11:32:51 -04:00
James Humphries
2e73239e87 Add goreleaser key to main release process (#3423)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
v1.11.0-beta1
2025-10-23 15:38:43 +01:00
James Humphries
ec37f46b5f Use goreleaser-pro for release process 1.11 backport (#3422)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-10-23 15:17:33 +01:00
Christian Mesh
56bccad283 Bump version for 1.11.0-beta1
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-23 09:49:08 -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
Christian Mesh
4907623433 go.mod: Update "go-tfe" library to latest release (#3413)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-10-22 11:33:35 -07:00
Martin Atkins
4031dd0e38 rfc: A new approach to configuration evaluation, planning, and applying
This is a followup to our earlier RFC describing some drawbacks and
limitations of the current OpenTofu language runtime and proposing to move
to a new approach. Whereas the previous RFC primarily focused on defining
the problem, this document aims to propose the start of a solution, in
the form of a high-level architectural model that we can hopefully find
consensus on before we move on to discussing the associated implementation
details.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-22 08:56:58 -07:00
Larry Bordowitz
8b99bac328 go.mod: upgrade tencent libraries (#3412)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-10-22 16:51:52 +01:00
Diogenes Fernandes
13f2a9fcec refactor: use TF_AZURE_TEST_CLIENT_* variables instead of default ones
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-10-22 11:44:39 -03:00
Diogenes Fernandes
8b4fcce514 test: allowing environment variables on azure acceptance tests
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-10-22 11:44:39 -03:00
Diogenes Fernandes
6a2bb41f9a test: avoid panics
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-10-22 11:44:39 -03:00
Diogenes Fernandes
0097923395 deps: upgrade Azure-related libraries
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-10-22 11:44:39 -03:00
Martin Atkins
bc0faecff8 rfc: Minor revision to "Miscellaneous Configuration Settings in Modules"
While drafting this RFC originally I had intended to carve out an exception
of ignoring required_version arguments in .tf files while continuing to
support them in .tofu files, but apparently I lost that detail during some
copyediting and so the current draft implies that OpenTofu would continue
to use required_version in .tf files unless there's an OpenTofu-specific
declaration that takes precedence.

This update aims to clarify the proposal's handling of modules that are
written only for Terraform without using any OpenTofu-specific mechanisms:
in that case, we must just make a best effort to load the module in
OpenTofu and let it fail with a more specific error if the module happens
to be using language features that OpenTofu does not support, so that
loading can succeed when the module is only using the subset of features
that are cross-compatible between both systems.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-22 07:08:29 -07:00
Andrei Ciobanu
31d7bddbc2 go.mod: go get cloud.google.com/go/kms@v1.23.2 && go get google.golang.org/api@v0.252.0 (#3410)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-22 15:28:42 +03:00
James Humphries
cea35d6206 Bump our hcl fork to include fix for Provider defined functions in parentheses (#3402)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
2025-10-22 10:40:53 +01:00
Martin Atkins
2a04940157 CHANGELOG: Entry for opentofu/opentofu#3393
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-21 16:07:38 -07:00
Martin Atkins
8a9f1587d2 communicator/ssh: Error for public key instead of certificate
The "certificate" argument in a provisioner connection block is only used
when using an SSH certificate authority, but because it uses the same
authorized_keys syntax that could be used to represent a public key on
the remote server it's perhaps tempting to think that it's necessary to
specify a plain public key here when attempting traditional keypair-based
authentication.

The configuration handling logic previously assumed incorrectly that the
result of parsing that string would always be *ssh.Certificate if parsing
succeeded at all, but the upstream library doesn't have a
certificate-specific parsing function and so we're using the more general
parser for the authorized_keys format and so the result could potentially
be of one of the many supported public key types, which would previously
have caused a type assertion panic.

Now we'll handle this as a normal error. The fact that communicators still
use error values directly rather than diagnostics means that we need to be
more terse than I would've liked to have been in this message, since the
reader of the message might not be an SSH authentication expert, but the
provisioner/communicator functionality long predates our modern idea of
diagnostics so I tried for a compromise here of mentioning that it's okay
to omit the certificate argument when you aren't trying to use a CA in the
hope that this is sufficient hint for someone who isn't yet aware of the
differences between these two different authentication methods.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-21 16:07:38 -07:00
Martin Atkins
3ae9b29a92 go.mod: go get github.com/aliyun/alibaba-cloud-sdk-go@v1.63.107
This is just a routine upgrade, not expected to change the external
behavior of OpenTofu in any significant way.

However, notably the OpenTofu team does not currently have any way to run
the acceptance tests for this backend, so we cannot be sure that this won't
cause some kind of regression. I've reviewed the changes to these modules
as best I could from the Git history and it seems to be primarily
autogenerated API stub updates and a few small bugfixes, so I think the
risk is relatively low but there is nonetheless still some risk.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-21 16:02:52 -07:00
Martin Atkins
3426be27ef go.mod: go get k8s.io/client-go@v0.34.1
This also updates the other three k8s.io/* modules that we use, as
prerequisites for the upgrade.

The indirect dependency landscape for these modules has changed quite a lot
since the versions we were previously using, and so we have some new
indirect dependencies here. I quickly reviewed each of them and confirmed
that they seem to be under suitable licenses.

The k8s.io/utils/pointer package has been deprecated in favor of
k8s.io/utils/ptr, so this also updates our two callers of that to avoid
calling into deprecated functions.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-21 06:54:13 -07:00
Andrei Ciobanu
195a131042 Add steps to alter version/VERSION for the nightly builds (#3399)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-21 13:28:39 +03:00
ian
8481608b52 fix: broken links on DEVELOPING.md (#3395)
Signed-off-by: yumosx <zhengel2022@163.com>
Signed-off-by: ian <141902143+yumosx@users.noreply.github.com>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
Co-authored-by: Andrei Ciobanu <andreic9203@gmail.com>
Co-authored-by: Diógenes Fernandes <diofeher@gmail.com>
2025-10-21 05:43:34 -03:00
Martin Atkins
554b533847 CHANGELOG: Entry for opentofu/opentofu#3388
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-20 07:27:04 -07:00
Martin Atkins
c258585062 tofu: Include schema-based marks in final state after apply
During the "refresh" and "plan" steps we build the marks for a managed
resource object's value as a combination of the marks from the input
(prior state or configuration, respectively) and the marks implied by the
provider schema.

However, the apply step was previously relying only on the marks from the
planned new state, without considering marks from the provider schema. That
meant that a sensitive attribute contained within a container that is
unknown during planning could not be marked as sensitive once the container
became known, because the corresponding value did not exist at all in the
planned new state and therefore could not carry a sensitive mark.

To fix this problem, this changes the apply step to match the strategy
already used in the refresh and plan steps: using combinePathValueMarks
to blend the dynamic marks with the static information from the schema,
so that the final value saved in the new state snapshot will have a full
set of sensitive markings for the next plan/apply round to rely on. Without
this the next plan/apply round would produce a spurious diff due to the
sensitivity of the nested attributes appearing to have changed.

This introduces a new test TestContext2Apply_sensitiveInsideUnknown which
covers the case where the sensitivity information comes from schema. The
preexisting test TestContext2Apply_additionalSensitiveFromState already
covered the case of dynamically-tracked sensitivity information, and
remains passing without modification after this change.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-20 07:27:04 -07:00
Andrei Ciobanu
1239e21c04 Remove unused hcl tags (#3391)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-20 10:49:08 +03: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
ian
b7bcc13ea5 encryption/keyprovider/aws_kms: Use APNInfo instead of UserAgent 2025-10-17 12:08:51 -07:00
Andrei Ciobanu
943c54079a go.mod: go get cloud.google.com/go/storage@v1.57.0 (#3385)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
2025-10-17 18:16:53 +03:00
Martin Atkins
a14e3db835 CHANGELOG: Copyediting in preparation for v1.11.0 release
As usual we've been gradually adding things to this in a decentralized and
uncoordinated fashion throughout the v1.11 development period, and so this
is a first pass of copyediting to try to present the information in a more
useful order (which is, of course, highly subjective), to describe the
changes in a more consistent writing style, to consolidate entries for
work that happened over multiple PRs but yet represents only one
end-user-facing feature, and to remove a few entries for changes that
are really just implementation details that don't affect the externally-
visible behavior of OpenTofu in any significant way.

We'll probably edit this some more throughout the v1.11 prerelease period,
but this is intended as a starting point for use with the v1.11.0-beta1
release.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-16 11:26:08 -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
Martin Atkins
c27094e816 go.mod: Fix direct vs. indirect split
For some reason we had a few direct dependencies included in the "require"
clause for indirect dependencies. "go mod tidy" considers any directive
that contains a mixture of direct and indirect dependencies as
manually-edited and so avoids adding any new items to it, which was the
root cause of the repeated addition of a third "require" directive whenever
we made a change that caused a new indirect dependency to appear in this
file.

Moving these Azure-related direct dependencies into the first "require"
directive along with all of the other direct dependencies should hopefully
avoid that "go mod tidy" quirk occurring again under future maintenance.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-15 13:21:49 -07:00
Martin Atkins
fb51c171b7 go.mod: go get github.com/ProtonMail/go-crypto@v1.3.0
This is a routine upgrade that does not cause any significant chance to
OpenTofu's behavior.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-15 07:13:05 -07:00
Diógenes Fernandes
176120f3e4 Implicit moves for modules (#3327)
Implicit move statement for modules previously using `count` and
then moving to use `enabled`, or vice versa.

Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
2025-10-15 09:10:15 -03:00
Martin Atkins
95ce04c726 go.mod: go get github.com/lib/pq@v1.10.9
This library is a dependency of our "postgresql" state storage
implementation.

This is just a routine upgrade to the latest available patch release. This
is mainly just a collection of minor upstream bugfixes and performance
improvements.

Notably this adds support for context.Context-based cancellation, though
that won't do anything in OpenTofu because we intentionally prevent
cancellation from reaching any of the state storage implementations so that
we can save new state snapshots even when other parts of OpenTofu are
shutting themselves down in response to a cancellation.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-14 16:09:25 -07:00
James Humphries
82ff2084f0 go.mod: go get github.com/openbao/openbao/api/v2@v2.4.0
Signed-off-by: James Humphries <james@james-humphries.co.uk>
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-14 16:09:07 -07:00
Martin Atkins
e7cf4a4080 go.mod: go get github.com/hashicorp/consul/api@v1.32.4
This is just a routine upgrade, with no significant change in
functionality. It caused several indirect dependency changes too, but
they don't affect OpenTofu's main behavior.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-14 14:11:27 -07:00
Martin Atkins
ec31947e4a CHANGELOG: Entry for opentofu/opentofu#3372
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-14 12:52:00 -07:00