go.mod: Upgrade to Go 1.25 (#3166)

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
Martin Atkins
2025-08-22 04:10:11 -07:00
committed by GitHub
parent dfe6c6d514
commit 9a161adbe3
6 changed files with 63 additions and 54 deletions

View File

@@ -174,7 +174,7 @@ jobs:
- name: "Code linting" - name: "Code linting"
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with: with:
version: v2.1.6 version: v2.4.0
- name: "Copyright headers" - name: "Copyright headers"
run: | run: |

View File

@@ -1 +1 @@
1.24.6 1.25.0

View File

@@ -2,14 +2,17 @@
UPGRADE NOTES: UPGRADE NOTES:
* OpenTofu on macOS now requires macOS 12 Monterey or later.
* The `issensitive` function previously incorrectly returned known results when given unknown values, which has now been corrected to avoid confusing consistency check failures during the apply phase, as reported in [issue #2415](https://github.com/opentofu/opentofu/issues/2415). * The `issensitive` function previously incorrectly returned known results when given unknown values, which has now been corrected to avoid confusing consistency check failures during the apply phase, as reported in [issue #2415](https://github.com/opentofu/opentofu/issues/2415).
If your module was previously assigning something derived from an `issensitive` result to a context where unknown values are not allowed during the planning phase, such as `count`/`for_each` arguments for resources or modules, this will now fail during the planning phase and so you will need to choose a new approach where either the `issensitive` argument is always known during the planning phase or where the sensitivity of an unknown value is not used as part of the decision. If your module was previously assigning something derived from an `issensitive` result to a context where unknown values are not allowed during the planning phase, such as `count`/`for_each` arguments for resources or modules, this will now fail during the planning phase and so you will need to choose a new approach where either the `issensitive` argument is always known during the planning phase or where the sensitivity of an unknown value is not used as part of the decision.
* OpenTofu no longer accepts SHA-1 signatures in TLS handshakes, as recommended in [RFC 9155](https://www.rfc-editor.org/rfc/rfc9155.html).
ENHANCEMENTS: ENHANCEMENTS:
* OpenTofu will now suggest using `-exclude` if a provider reports that it cannot create a plan for a particular resource instance due to values that won't be known until the apply phase. ([#2643](https://github.com/opentofu/opentofu/pull/2643)) * OpenTofu will now suggest using `-exclude` if a provider reports that it cannot create a plan for a particular resource instance due to values that won't be known until the apply phase. ([#2643](https://github.com/opentofu/opentofu/pull/2643))
* `tofu validate` now supports running in a module that contains provider configuration_aliases. ([#2905](https://github.com/opentofu/opentofu/pull/2905)) * `tofu validate` now supports running in a module that contains provider configuration_aliases. ([#2905](https://github.com/opentofu/opentofu/pull/2905))
* The `regex` and `regexall` functions now support using `\p` and `\P` sequences with the long-form names for Unicode general character properties. For example, `\p{Letter}` now has the same meaning as `\p{L}`. ([#3166](https://github.com/opentofu/opentofu/pull/3166))
* `tofu show` now supports `-config` and `-module=DIR` options, to be used in conjunction with `-json` to produce a machine-readable summary of either the whole configuration or a single module without first creating a plan. ([#2820](https://github.com/opentofu/opentofu/pull/2820), [#3003](https://github.com/opentofu/opentofu/pull/3003)) * `tofu show` now supports `-config` and `-module=DIR` options, to be used in conjunction with `-json` to produce a machine-readable summary of either the whole configuration or a single module without first creating a plan. ([#2820](https://github.com/opentofu/opentofu/pull/2820), [#3003](https://github.com/opentofu/opentofu/pull/3003))
* [The JSON representation of configuration](https://opentofu.org/docs/internals/json-format/#configuration-representation) returned by `tofu show` in `-json` mode now includes type constraint information for input variables and whether each input variable is required, in addition to the existing properties related to input variables. ([#3013](https://github.com/opentofu/opentofu/pull/3013)) * [The JSON representation of configuration](https://opentofu.org/docs/internals/json-format/#configuration-representation) returned by `tofu show` in `-json` mode now includes type constraint information for input variables and whether each input variable is required, in addition to the existing properties related to input variables. ([#3013](https://github.com/opentofu/opentofu/pull/3013))
* Multiline string updates in arrays are now diffed line-by-line, rather than as a single element, making it easier to see changes in the plan output. ([#3030](https://github.com/opentofu/opentofu/pull/3030)) * Multiline string updates in arrays are now diffed line-by-line, rather than as a single element, making it easier to see changes in the plan output. ([#3030](https://github.com/opentofu/opentofu/pull/3030))

4
go.mod
View File

@@ -107,7 +107,7 @@ require (
golang.org/x/sys v0.33.0 golang.org/x/sys v0.33.0
golang.org/x/term v0.32.0 golang.org/x/term v0.32.0
golang.org/x/text v0.25.0 golang.org/x/text v0.25.0
golang.org/x/tools v0.25.0 golang.org/x/tools v0.25.1
google.golang.org/api v0.155.0 google.golang.org/api v0.155.0
google.golang.org/grpc v1.62.1 google.golang.org/grpc v1.62.1
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
@@ -273,6 +273,6 @@ require (
sigs.k8s.io/yaml v1.2.0 // indirect sigs.k8s.io/yaml v1.2.0 // indirect
) )
go 1.24.6 go 1.25.0
replace github.com/hashicorp/hcl/v2 v2.20.1 => github.com/opentofu/hcl/v2 v2.20.2-0.20250121132637-504036cd70e7 replace github.com/hashicorp/hcl/v2 v2.20.1 => github.com/opentofu/hcl/v2 v2.20.2-0.20250121132637-504036cd70e7

4
go.sum
View File

@@ -1490,8 +1490,8 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= golang.org/x/tools v0.25.1 h1:YeIyhd0M7gStYR9jb2IFXVVT+QJhgXu1ZECOuRwofh4=
golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/tools v0.25.1/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@@ -40,54 +40,60 @@ language, the quoted string itself already uses backslash `\` as an escape
character for the string, so any backslashes intended to be recognized as part character for the string, so any backslashes intended to be recognized as part
of the pattern must be escaped as `\\`. of the pattern must be escaped as `\\`.
| Sequence | Matches | | Sequence | Matches |
| ---------------------- | -------------------------------------------------------------------------------- | | ---------------------- | ---------------------------------------------------------------------------------- |
| `.` | Any character except newline | | `.` | Any character except newline |
| `[xyz]` | Any character listed between the brackets (`x`, `y`, and `z` in this example) | | `[xyz]` | Any character listed between the brackets (`x`, `y`, and `z` in this example) |
| `[a-z]` | Any character between `a` and `z`, inclusive | | `[a-z]` | Any character between `a` and `z`, inclusive |
| `[^xyz]` | The opposite of `[xyz]` | | `[^xyz]` | The opposite of `[xyz]` |
| `\d` | ASCII digits (0 through 9, inclusive) | | `\d` | ASCII digits (0 through 9, inclusive) |
| `\D` | Anything except ASCII digits | | `\D` | Anything except ASCII digits |
| `\s` | ASCII spaces (space, tab, newline, carriage return, form feed) | | `\s` | ASCII spaces (space, tab, newline, carriage return, form feed) |
| `\S` | Anything except ASCII spaces | | `\S` | Anything except ASCII spaces |
| `\w` | The same as `[0-9A-Za-z_]` | | `\w` | The same as `[0-9A-Za-z_]` |
| `\W` | Anything except the characters matched by `\w` | | `\W` | Anything except the characters matched by `\w` |
| `[[:alnum:]]` | The same as `[0-9A-Za-z]` | | `[[:alnum:]]` | The same as `[0-9A-Za-z]` |
| `[[:alpha:]]` | The same as `[A-Za-z]` | | `[[:alpha:]]` | The same as `[A-Za-z]` |
| `[[:ascii:]]` | Any ASCII character | | `[[:ascii:]]` | Any ASCII character |
| `[[:blank:]]` | ASCII tab or space | | `[[:blank:]]` | ASCII tab or space |
| `[[:cntrl:]]` | ASCII/Unicode control characters | | `[[:cntrl:]]` | ASCII/Unicode control characters |
| `[[:digit:]]` | The same as `[0-9]` | | `[[:digit:]]` | The same as `[0-9]` |
| `[[:graph:]]` | All "graphical" (printable) ASCII characters | | `[[:graph:]]` | All "graphical" (printable) ASCII characters |
| `[[:lower:]]` | The same as `[a-z]` | | `[[:lower:]]` | The same as `[a-z]` |
| `[[:print:]]` | The same as `[[:graph:]]` | | `[[:print:]]` | The same as `[[:graph:]]` |
| `[[:punct:]]` | The same as ``[!-/:-@[-`{-~]`` | | `[[:punct:]]` | The same as ``[!-/:-@[-`{-~]`` |
| `[[:space:]]` | The same as `[\t\n\v\f\r ]` | | `[[:space:]]` | The same as `[\t\n\v\f\r ]` |
| `[[:upper:]]` | The same as `[A-Z]` | | `[[:upper:]]` | The same as `[A-Z]` |
| `[[:word:]]` | The same as `\w` | | `[[:word:]]` | The same as `\w` |
| `[[:xdigit:]]` | The same as `[0-9A-Fa-f]` | | `[[:xdigit:]]` | The same as `[0-9A-Fa-f]` |
| `\pN` | Unicode character class by using single-letter class names ("N" in this example) | | `\pN` | Unicode general category by using single-letter abbreviation ("N" in this example) |
| `\p{Greek}` | Unicode character class by unicode name ("Greek" in this example) | | `\p{Letter}` | Unicode general category by name ("Letter" in this example) |
| `\PN` | The opposite of `\pN` | | `\p{Greek}` | Unicode script by name ("Greek" in this example) |
| `\P{Greek}` | The opposite of `\p{Greek}` | | `\PN` | The opposite of `\pN` |
| `xy` | `x` followed immediately by `y` | | `\P{Letter}` | The opposite of `\p{Letter}` |
| `x&#124;y` | either `x` or `y`, preferring `x` | | `\P{Greek}` | The opposite of `\p{Greek}` |
| `x*` | zero or more `x`, preferring more | | `xy` | `x` followed immediately by `y` |
| `x*?` | zero or more `x`, preferring fewer | | `x&#124;y` | either `x` or `y`, preferring `x` |
| `x+` | one or more `x`, preferring more | | `x*` | zero or more `x`, preferring more |
| `x+?` | one or more `x`, preferring fewer | | `x*?` | zero or more `x`, preferring fewer |
| `x?` | zero or one `x`, preferring one | | `x+` | one or more `x`, preferring more |
| `x??` | zero or one `x`, preferring zero | | `x+?` | one or more `x`, preferring fewer |
| `x{n,m}` | between `n` and `m` repetitions of `x`, preferring more | | `x?` | zero or one `x`, preferring one |
| `x{n,m}?` | between `n` and `m` repetitions of `x`, preferring fewer | | `x??` | zero or one `x`, preferring zero |
| `x{n,}` | at least `n` repetitions of `x`, preferring more | | `x{n,m}` | between `n` and `m` repetitions of `x`, preferring more |
| `x{n,}?` | at least `n` repetitions of `x`, preferring fewer | | `x{n,m}?` | between `n` and `m` repetitions of `x`, preferring fewer |
| `x{n}` | exactly `n` repetitions of `x` | | `x{n,}` | at least `n` repetitions of `x`, preferring more |
| `(x)` | unnamed capture group for sub-pattern `x` | | `x{n,}?` | at least `n` repetitions of `x`, preferring fewer |
| `(?P<name>x)` | named capture group, named `name`, for sub-pattern `x` | | `x{n}` | exactly `n` repetitions of `x` |
| `(?:x)` | non-capturing sub-pattern `x` | | `(x)` | unnamed capture group for sub-pattern `x` |
| `\*` | Literal `*` for any punctuation character `*` | | `(?P<name>x)` | named capture group, named `name`, for sub-pattern `x` |
| `\Q...\E` | Literal `...` for any text `...` as long as it does not include literally `\E` | | `(?:x)` | non-capturing sub-pattern `x` |
| `\*` | Literal `*` for any punctuation character `*` |
| `\Q...\E` | Literal `...` for any text `...` as long as it does not include literally `\E` |
The Unicode property names for use with `\p` and `\P` are defined in:
- [General Category property names](https://www.unicode.org/reports/tr44/tr44-30.html#General_Category_Values)
- [Script property names](https://www.unicode.org/reports/tr24/tr24-34.html#Special_Explicit)
In addition to the above matching operators that consume the characters they In addition to the above matching operators that consume the characters they
match, there are some additional operators that _only_ match, but consume match, there are some additional operators that _only_ match, but consume