Skip to content

Commit c140e2e

Browse files
committed
Merge branch 'main' into patch-1
2 parents 2a531ad + d3b8a55 commit c140e2e

File tree

771 files changed

+44367
-21846
lines changed

Some content is hidden

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

771 files changed

+44367
-21846
lines changed

.copywrite.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ schema_version = 1
22

33
project {
44
license = "BUSL-1.1"
5-
copyright_year = 2023
5+
copyright_year = 2024
66

77
# (OPTIONAL) A list of globs that should not have copyright/license headers.
88
# Supports doublestar glob patterns for more flexibility in defining which

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ label to enable the backport bot.
3131
3232
-->
3333

34-
1.5.x
34+
1.8.x
3535

3636
## Draft CHANGELOG entry
3737

.github/workflows/checks.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ on:
1919
pull_request:
2020
push:
2121
branches:
22-
- main
23-
- 'v[0-9]+.[0-9]+'
24-
- checks-workflow-dev/*
22+
- '*'
2523
tags:
2624
- 'v[0-9]+.[0-9]+.[0-9]+*'
2725

@@ -62,7 +60,10 @@ jobs:
6260
6361
- name: "Unit tests"
6462
run: |
65-
go test ./...
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
6667
6768
race-tests:
6869
name: "Race Tests"
@@ -166,9 +167,12 @@ jobs:
166167
167168
- name: "go.mod and go.sum consistency check"
168169
run: |
169-
go mod tidy
170-
if [[ -n "$(git status --porcelain)" ]]; then
171-
echo >&2 "ERROR: go.mod/go.sum are not up-to-date. Run 'go mod tidy' and then commit the updated files."
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"
172176
exit 1
173177
fi
174178
@@ -182,7 +186,7 @@ jobs:
182186
183187
- name: "Code consistency checks"
184188
run: |
185-
make fmtcheck importscheck generate staticcheck exhaustive protobuf
189+
make fmtcheck importscheck copyright generate staticcheck exhaustive protobuf
186190
if [[ -n "$(git status --porcelain)" ]]; then
187191
echo >&2 "ERROR: Generated files are inconsistent. Run 'make generate' and 'make protobuf' locally and then commit the updated files."
188192
git >&2 status --porcelain

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ website/node_modules
1818
*.test
1919
*.iml
2020

21+
go.work*
22+
2123
/terraform
2224

2325
website/vendor

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.5
1+
1.22.1

.release/ci.hcl

Lines changed: 8 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) HashiCorp, Inc.
22
# SPDX-License-Identifier: BUSL-1.1
33

4-
schema = "1"
4+
schema = "2"
55

66
project "terraform" {
77
// the team key is not used by CRT currently
@@ -69,32 +69,6 @@ event "promote-staging" {
6969
}
7070
}
7171

72-
event "promote-staging-docker" {
73-
depends = ["promote-staging"]
74-
action "promote-staging-docker" {
75-
organization = "hashicorp"
76-
repository = "crt-workflows-common"
77-
workflow = "promote-staging-docker"
78-
}
79-
80-
notification {
81-
on = "always"
82-
}
83-
}
84-
85-
event "promote-staging-packaging" {
86-
depends = ["promote-staging-docker"]
87-
action "promote-staging-packaging" {
88-
organization = "hashicorp"
89-
repository = "crt-workflows-common"
90-
workflow = "promote-staging-packaging"
91-
}
92-
93-
notification {
94-
on = "always"
95-
}
96-
}
97-
9872
event "trigger-production" {
9973
// This event is dispatched by the bob trigger-promotion command
10074
// and is required - do not delete.
@@ -108,56 +82,13 @@ event "promote-production" {
10882
workflow = "promote-production"
10983
}
11084

111-
notification {
112-
on = "always"
113-
}
114-
}
115-
116-
event "crt-hook-tfc-upload" {
117-
depends = ["promote-production"]
118-
action "crt-hook-tfc-upload" {
119-
organization = "hashicorp"
120-
repository = "terraform-releases"
121-
workflow = "crt-hook-tfc-upload"
122-
}
123-
124-
notification {
125-
on = "always"
126-
}
127-
}
128-
129-
event "promote-production-docker" {
130-
depends = ["crt-hook-tfc-upload"]
131-
action "promote-production-docker" {
132-
organization = "hashicorp"
133-
repository = "crt-workflows-common"
134-
workflow = "promote-production-docker"
135-
}
136-
137-
notification {
138-
on = "always"
139-
}
140-
}
141-
142-
event "promote-production-packaging" {
143-
depends = ["promote-production-docker"]
144-
action "promote-production-packaging" {
145-
organization = "hashicorp"
146-
repository = "crt-workflows-common"
147-
workflow = "promote-production-packaging"
148-
}
149-
150-
notification {
151-
on = "always"
152-
}
153-
}
154-
155-
event "update-ironbank" {
156-
depends = ["promote-production-packaging"]
157-
action "update-ironbank" {
158-
organization = "hashicorp"
159-
repository = "crt-workflows-common"
160-
workflow = "update-ironbank"
85+
promotion-events {
86+
update-ironbank = true
87+
post-promotion {
88+
organization = "hashicorp"
89+
repository = "terraform-releases"
90+
workflow = "crt-hook-tfc-upload"
91+
}
16192
}
16293

16394
notification {

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
## 1.8.0 (Unreleased)
1+
## 1.9.0 (Unreleased)
2+
3+
ENHANCEMENTS:
4+
5+
* `terraform console`: Now has basic support for multi-line input in interactive mode. ([#34822](https://github.com/hashicorp/terraform/pull/34822))
6+
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+
9+
BUG FIXES:
10+
11+
* `remote-exec`: Each remote connection will be closed immediately after use [GH-34137]
12+
13+
EXPERIMENTS:
14+
15+
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
16+
17+
* `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))
18+
* 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.
19+
* The [language-level experiment](https://developer.hashicorp.com/terraform/language/settings#experimental-language-features) `unknown_instances` permits `count` and `for_each` arguments in `module`, `resource`, and `data` blocks to have unknown values.
20+
21+
This is at an early stage and so currently setting these arguments to unknown values will only yield broken behavior, and so it's not yet useful to participate in this experiment. Future work will improve support for this new possibility, gradually making this experiment viable.
222

323
## Previous Releases
424

525
For information on prior major and minor releases, see their changelogs:
626

27+
* [v1.8](https://github.com/hashicorp/terraform/blob/v1.8/CHANGELOG.md)
728
* [v1.7](https://github.com/hashicorp/terraform/blob/v1.7/CHANGELOG.md)
829
* [v1.6](https://github.com/hashicorp/terraform/blob/v1.6/CHANGELOG.md)
930
* [v1.5](https://github.com/hashicorp/terraform/blob/v1.5/CHANGELOG.md)

CODEOWNERS

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
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+
411
# Remote-state backend # Maintainer
5-
/internal/backend/remote-state/artifactory Unmaintained
612
/internal/backend/remote-state/azure @hashicorp/terraform-azure
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
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
1216
/internal/backend/remote-state/http @hashicorp/terraform-core
13-
/internal/backend/remote-state/manta Unmaintained
14-
/internal/backend/remote-state/oss @xiaozhu36
15-
/internal/backend/remote-state/pg @remilapeyre
17+
#/internal/backend/remote-state/oss @xiaozhu36
18+
#/internal/backend/remote-state/pg @remilapeyre
1619
/internal/backend/remote-state/s3 @hashicorp/terraform-aws
17-
/internal/backend/remote-state/swift Unmaintained
18-
/internal/backend/remote-state/kubernetes @jrhouston @alexsomesan
20+
/internal/backend/remote-state/kubernetes @hashicorp/tf-eco-hybrid-cloud
1921

2022
# Provisioners
21-
builtin/provisioners/chef Deprecated
2223
builtin/provisioners/file @hashicorp/terraform-core
23-
builtin/provisioners/habitat Deprecated
2424
builtin/provisioners/local-exec @hashicorp/terraform-core
25-
builtin/provisioners/puppet Deprecated
2625
builtin/provisioners/remote-exec @hashicorp/terraform-core
27-
builtin/provisioners/salt-masterless Deprecated
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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
44
Parameters
55

66
Licensor: HashiCorp, Inc.
7-
Licensed Work: Terraform Version 1.6.0 or later. The Licensed Work is (c) 2023
7+
Licensed Work: Terraform Version 1.6.0 or later. The Licensed Work is (c) 2024
88
HashiCorp, Inc.
99
Additional Use Grant: You may make production use of the Licensed Work, provided
1010
Your use does not include offering the Licensed Work to third

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ staticcheck:
2626
exhaustive:
2727
"$(CURDIR)/scripts/exhaustive.sh"
2828

29+
copyright:
30+
"$(CURDIR)/scripts/copyright.sh" --plan
31+
32+
copyrightfix:
33+
"$(CURDIR)/scripts/copyright.sh"
34+
35+
syncdeps:
36+
"$(CURDIR)/scripts/syncdeps.sh"
37+
2938
# Run this if working on the website locally to run in watch mode.
3039
website:
3140
$(MAKE) -C website website
@@ -43,4 +52,4 @@ website/build-local:
4352
# under parallel conditions.
4453
.NOTPARALLEL:
4554

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

0 commit comments

Comments
 (0)