Skip to content

Commit a881573

Browse files
author
Liam Cervante
committed
backport of commit 4e9ae3e
1 parent d1761f4 commit a881573

File tree

367 files changed

+18822
-23275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+18822
-23275
lines changed

.github/workflows/checks.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ jobs:
6060
6161
- name: "Unit tests"
6262
run: |
63-
# We run tests for all packages from all modules in this repository.
64-
for dir in $(go list -m -f '{{.Dir}}' github.com/hashicorp/terraform/...); do
65-
(cd $dir && go test "./...")
66-
done
63+
go test ./...
6764
6865
race-tests:
6966
name: "Race Tests"
@@ -167,12 +164,9 @@ jobs:
167164
168165
- name: "go.mod and go.sum consistency check"
169166
run: |
170-
make syncdeps
171-
CHANGED="$(git status --porcelain)"
172-
if [[ -n "$CHANGED" ]]; then
173-
git diff
174-
echo >&2 "ERROR: go.mod/go.sum files are not up-to-date. Run 'make syncdeps' and then commit the updated files."
175-
echo >&2 $'Affected files:\n'"$CHANGED"
167+
go mod tidy
168+
if [[ -n "$(git status --porcelain)" ]]; then
169+
echo >&2 "ERROR: go.mod/go.sum are not up-to-date. Run 'go mod tidy' and then commit the updated files."
176170
exit 1
177171
fi
178172

CHANGELOG.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,49 @@
1-
## 1.9.0 (Unreleased)
1+
## 1.8.1 (Unreleased)
22

3-
ENHANCEMENTS:
3+
BUG FIXES:
44

5-
* `terraform console`: Now has basic support for multi-line input in interactive mode. ([#34822](https://github.com/hashicorp/terraform/pull/34822))
5+
* Plan renderer: Correctly render strings that begin with JSON compatible text but don't end with it. ([#34959](https://github.com/hashicorp/terraform/pull/34959))
66

7-
If an entered line contains opening paretheses/etc that are not closed, Terraform will await another line of input to complete the expression. This initial implementation is primarily intended to support pasting in multi-line expressions from elsewhere, rather than for manual multi-line editing, so the interactive editing support is currently limited.
8-
* `cli`: Updates the Terraform CLI output to show logical separation between OPA and Sentinel policy evaluations
7+
## 1.8.0 (April 10, 2024)
98

10-
BUG FIXES:
9+
If you are upgrading from Terraform v1.7 or earlier, please refer to
10+
[the Terraform v1.8 Upgrade Guide](https://developer.hashicorp.com/terraform/language/v1.8.x/upgrade-guides).
1111

12-
* `remote-exec`: Each remote connection will be closed immediately after use ([#34137](https://github.com/hashicorp/terraform/issues/34137))
13-
* `backend/s3`: Fixed the digest value displayed for DynamoDB/S3 state checksum mismatches ([#34387](https://github.com/hashicorp/terraform/issues/34387))
12+
NEW FEATURES:
1413

15-
EXPERIMENTS:
14+
* Providers can now offer functions which can be used from within the Terraform configuration language.
1615

17-
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
16+
The syntax for calling a provider-contributed function is `provider::provider_name::function_name()`. ([#34394](https://github.com/hashicorp/terraform/issues/34394))
17+
* Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
18+
19+
This extends the `moved` block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported.
20+
* New `issensitive` function returns true if the given value is marked as sensitive.
21+
22+
ENHANCEMENTS:
23+
24+
* `terraform test`: File-level variables can now refer to global variables. ([#34699](https://github.com/hashicorp/terraform/issues/34699))
25+
* When generating configuration based on `import` blocks, Terraform will detect strings that contain valid JSON syntax and generate them as calls to the `jsonencode` function, rather than generating a single string. This is primarily motivated by readability, but might also be useful if you need to replace part of the literal value with an expression as you generalize your module beyond the one example used for importing.
26+
* `terraform plan` now uses a different presentation for describing changes to lists where the old and new lists have the same length. It now compares the elements with correlated indices and shows a separate diff for each one, rather than trying to show a diff for the list as a whole. The behavior is unchanged for lists of different lengths.
27+
* `terraform providers lock` accepts a new boolean option `-enable-plugin-cache`. If specified, and if a [global plugin cache](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-plugin-cache) is configured, Terraform will use the cache in the provider lock process. ([#34632](https://github.com/hashicorp/terraform/issues/34632))
28+
* built-in "terraform" provider: new `decode_tfvars`, `encode_tfvars`, and `encode_expr` functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. ([#34718](https://github.com/hashicorp/terraform/issues/34718))
29+
* `terraform show`'s JSON rendering of a plan now includes two explicit flags `"applyable"` and `"complete"`, which both summarize characteristics of a plan that were previously only inferrable by consumers replicating some of Terraform Core's own logic. ([#34642](https://github.com/hashicorp/terraform/issues/34642))
30+
31+
`"applyable"` means that it makes sense for a wrapping automation to offer to apply this plan.
32+
33+
`"complete"` means that applying this plan is expected to achieve convergence between desired and actual state. If this flag is present and set to `false` then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.
34+
35+
BUG FIXES:
1836

19-
* `variable_validation_crossref`: This [language experiment](https://developer.hashicorp.com/terraform/language/settings#experimental-language-features) allows `validation` blocks inside input variable declarations to refer to other objects inside the module where the variable is declared, including to the values of other input variables in the same module.
20-
* `terraform test` accepts a new option `-junit-xml=FILENAME`. If specified, and if the test configuration is valid enough to begin executing, then Terraform writes a JUnit XML test result report to the given filename, describing similar information as included in the normal test output. ([#34291](https://github.com/hashicorp/terraform/issues/34291))
21-
* The new command `terraform rpcapi` exposes some Terraform Core functionality through an RPC interface compatible with [`go-plugin`](https://github.com/hashicorp/go-plugin). The exact RPC API exposed here is currently subject to change at any time, because it's here primarily as a vehicle to support the [Terraform Stacks](https://www.hashicorp.com/blog/terraform-stacks-explained) private preview and so will be broken if necessary to respond to feedback from private preview participants, or possibly for other reasons. Do not use this mechanism yet outside of Terraform Stacks private preview.
22-
* The experimental "deferred actions" feature, enabled by passing the `-allow-deferral` option to `terraform plan`, permits `count` and `for_each` arguments in `module`, `resource`, and `data` blocks to have unknown values and allows providers to react more flexibly to unknown values. This experiment is under active development, and so it's not yet useful to participate in this experiment.
37+
* core: Sensitive values will now be tracked more accurately in state and plans, preventing unexpected updates with no apparent changes. ([#34567](https://github.com/hashicorp/terraform/issues/34567))
38+
* core: Fix incorrect error message when using in invalid `iterator` argument within a dynamic block. ([#34751](https://github.com/hashicorp/terraform/issues/34751))
39+
* core: Fixed edge-case bug that could cause loss of floating point precision when round-tripping due to incorrectly using a MessagePack integer to represent a large non-integral number. ([#24576](https://github.com/hashicorp/terraform/issues/24576))
40+
* config: Converting from an unknown map value to an object type now correctly handles the situation where the map element type disagrees with an optional attribute of the target type, since when a map value is unknown we don't yet know which keys it has and thus cannot predict what subset of the elements will get converted as attributes in the resulting object. ([#34756](https://github.com/hashicorp/terraform/issues/34756))
41+
* cloud: Fixed unparsed color codes in policy failure error messages. ([#34473](https://github.com/hashicorp/terraform/issues/34473))
2342

2443
## Previous Releases
2544

2645
For information on prior major and minor releases, see their changelogs:
2746

28-
* [v1.8](https://github.com/hashicorp/terraform/blob/v1.8/CHANGELOG.md)
2947
* [v1.7](https://github.com/hashicorp/terraform/blob/v1.7/CHANGELOG.md)
3048
* [v1.6](https://github.com/hashicorp/terraform/blob/v1.6/CHANGELOG.md)
3149
* [v1.5](https://github.com/hashicorp/terraform/blob/v1.5/CHANGELOG.md)

CODEOWNERS

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
# Each line is a file pattern followed by one or more owners.
22
# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
33

4-
# Entries that are commented out have maintainers that are not in the
5-
# HashiCorp organization and so cannot be automatically added as reviewers.
6-
#
7-
# We retain those as documentation of who agreed to maintain, but they
8-
# cannot be used automatically by GitHub's pull request workflow and would
9-
# make GitHub consider this file invalid if not commented.
10-
114
# Remote-state backend # Maintainer
5+
/internal/backend/remote-state/artifactory Unmaintained
126
/internal/backend/remote-state/azure @hashicorp/terraform-azure
13-
#/internal/backend/remote-state/consul Unmaintained
14-
#/internal/backend/remote-state/cos @likexian
15-
/internal/backend/remote-state/gcs @hashicorp/tf-eco-hybrid-cloud
7+
/internal/backend/remote-state/consul @hashicorp/consul @remilapeyre
8+
/internal/backend/remote-state/cos @likexian
9+
/internal/backend/remote-state/etcdv2 Unmaintained
10+
/internal/backend/remote-state/etcdv3 Unmaintained
11+
/internal/backend/remote-state/gcs @hashicorp/terraform-google @hashicorp/terraform-ecosystem-strategic
1612
/internal/backend/remote-state/http @hashicorp/terraform-core
17-
#/internal/backend/remote-state/oss @xiaozhu36
18-
#/internal/backend/remote-state/pg @remilapeyre
13+
/internal/backend/remote-state/manta Unmaintained
14+
/internal/backend/remote-state/oss @xiaozhu36
15+
/internal/backend/remote-state/pg @remilapeyre
1916
/internal/backend/remote-state/s3 @hashicorp/terraform-aws
20-
/internal/backend/remote-state/kubernetes @hashicorp/tf-eco-hybrid-cloud
17+
/internal/backend/remote-state/swift Unmaintained
18+
/internal/backend/remote-state/kubernetes @jrhouston @alexsomesan
2119

2220
# Provisioners
21+
builtin/provisioners/chef Deprecated
2322
builtin/provisioners/file @hashicorp/terraform-core
23+
builtin/provisioners/habitat Deprecated
2424
builtin/provisioners/local-exec @hashicorp/terraform-core
25+
builtin/provisioners/puppet Deprecated
2526
builtin/provisioners/remote-exec @hashicorp/terraform-core
26-
27-
# go.sum files should never cause automatic review requests because they only
28-
# ever change in response to go.mod files (our PR checks would fail if not) and
29-
# if a specific module has _only_ a go.sum update without an associated go.mod
30-
# update then that represents that the update cannot affect the module, and
31-
# the Go toolchain just needed to download something new to prove that.
32-
#
33-
# (The last match in the file "wins", so this overrides any explicit owner
34-
# specified above when go.sum is the only file that changed.)
35-
*/go.sum # no owner for these
27+
builtin/provisioners/salt-masterless Deprecated

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ copyright:
3232
copyrightfix:
3333
"$(CURDIR)/scripts/copyright.sh"
3434

35-
syncdeps:
36-
"$(CURDIR)/scripts/syncdeps.sh"
37-
3835
# Run this if working on the website locally to run in watch mode.
3936
website:
4037
$(MAKE) -C website website
@@ -52,4 +49,4 @@ website/build-local:
5249
# under parallel conditions.
5350
.NOTPARALLEL:
5451

55-
.PHONY: fmtcheck importscheck generate protobuf staticcheck syncdeps website website/local website/build-local
52+
.PHONY: fmtcheck importscheck generate protobuf staticcheck website website/local website/build-local

docs/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ to [the main Terraform CLI documentation](https://www.terraform.io/docs/cli/inde
3939
* [Terraform Core RPC API](../internal/rpcapi/README.md): an integration point
4040
for external software that needs to integrate Terraform Core functionality.
4141

42-
* [Upgrading Terraform's Dependencies](./dependency-upgrades.md): guidance on
43-
some special details that arise when we upgrade Go Module dependencies, due
44-
to this codebase containing Terraform CLI, Terraform Core, and the various
45-
remote state backends which all have some overlapping dependencies.
46-
4742
* [How Terraform Uses Unicode](./unicode.md): an overview of the various
4843
features of Terraform that rely on Unicode and how to change those features
4944
to adopt new versions of Unicode.

0 commit comments

Comments
 (0)