Sarah French
eab282f617
test: Add http backend locking test ( #38192 )
...
* test: Update TestHTTPBackend so it can be created with pre-existing lock info inside it. This will be used for tests that want to assert the lock info returned with lock errors.
* test: Add a test asserting data returned in lock errors from the http backend.
* chore: Replace use of `io/ioutil` in http backend
* chore: Update changelog entry to link to the original PR https://github.com/hashicorp/terraform/pull/38144
* test: Improve test code comments
2026-02-18 18:51:43 +00:00
Nicholas Ngai
5e4cfd42fa
backend/http: Return existing lock info from backend on conflict ( #38144 )
...
* Return existing lock info from http state backend on conflict
* Remove info from LockError if failed to read or unmarshal
* Add change to .changes
2026-02-18 17:00:54 +00:00
hc-github-team-tf-core
d92915a29a
Prepare before 1.15.0-alpha20260218 release ( #38191 )
build / Build for windows_amd64 (push) Blocked by required conditions
build / Build for freebsd_arm (push) Blocked by required conditions
build / Build for linux_arm (push) Blocked by required conditions
build / Build for darwin_arm64 (push) Blocked by required conditions
build / Build for linux_arm64 (push) Blocked by required conditions
build / Build for windows_arm64 (push) Blocked by required conditions
build / Build Docker image for linux_386 (push) Blocked by required conditions
build / Build Docker image for linux_amd64 (push) Blocked by required conditions
build / Build Docker image for linux_arm (push) Blocked by required conditions
build / Build Docker image for linux_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_386 (push) Blocked by required conditions
build / Build e2etest for windows_386 (push) Blocked by required conditions
build / Build e2etest for darwin_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_amd64 (push) Blocked by required conditions
build / Build e2etest for windows_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_arm (push) Blocked by required conditions
build / Build e2etest for darwin_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_arm64 (push) Blocked by required conditions
build / Run e2e test for linux_386 (push) Blocked by required conditions
build / Run e2e test for windows_386 (push) Blocked by required conditions
build / Run e2e test for darwin_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_amd64 (push) Blocked by required conditions
build / Run e2e test for windows_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_arm (push) Blocked by required conditions
build / Run e2e test for linux_arm64 (push) Blocked by required conditions
build / Run terraform-exec test for linux amd64 (push) Blocked by required conditions
Quick Checks / Unit Tests (push) Waiting to run
Quick Checks / Race Tests (push) Waiting to run
Quick Checks / End-to-end Tests (push) Waiting to run
Quick Checks / Code Consistency Checks (push) Waiting to run
2026-02-18 14:11:52 +00:00
Sarah French
ee3190aab4
fix: Add check that we're able to run the e2e.GoBuild method in TestPrimary_stateStore_unmanaged_separatePlan ( #38190 )
...
This change should hopefully address E2E failures that are happening on main. It's hard to test that as the failures are platform specific and neither my laptop nor the runner for tests on PRs matches the failing platforms.
2026-02-18 14:42:41 +01:00
Sarah French
3db7c751a8
PSS: Fix use of reattached providers in init, enable use of reattached providers during plan-apply workflow ( #38182 )
...
* refactor: Check that the state storage provider is present when beginning to initialise a state store for use in a non-init command. Ensure reattached providers can be used.
Previously we passed all required providers into backend options to be used within `stateStoreConfig`, which is invoked via (Meta).Backend. The new approach enforces that the provider is present while assembling the backend options passed to (Meta).Backend from (Meta).backend, which is non-init specific. As this code is defending against users running non-init commands before an init, this place feels appropriate and isn't able to impact the init command.
* fix: Reattached PSS providers should return early when checking locks, and an empty locks file is only bad if there isn't a reattached PSS provider
* test: Assert that running init with reattached PSS provider is ok, via an E2E test that uses the reattach feature.
* fix: Allow builtin or reattached providers to be used for state stores when generating a plan file
* test: Expand E2E test to show using a reattached provider can be used for a workflow of init, plan with -out, and apply.
* chore: Replace 'io/ioutil' and format code in unmanaged e2e tests
2026-02-18 11:53:15 +00:00
Daniel Schmidt
d4d46b38a2
remove unused Meta.variableArgs
2026-02-18 12:47:12 +01:00
Daniel Schmidt
de068da2ab
refactor addVarsFromFile to use return value
2026-02-18 12:47:12 +01:00
Daniel Schmidt
b003de9c1f
remove unused function
2026-02-18 12:47:12 +01:00
Daniel Schmidt
93f4c1b9b4
remove copied default value
2026-02-18 12:47:12 +01:00
Daniel Schmidt
fd8d61ac9b
use pre-existing loaders where possible
2026-02-18 12:47:12 +01:00
Daniel Schmidt
4e921a8eae
move CollectValuesFromTests to arguments package
...
This keeps the CollectValues and CollectValuesFromTests implementations
together.
2026-02-18 12:47:12 +01:00
Daniel Schmidt
26124c0dde
removed unused collectVariableValues
2026-02-18 12:47:12 +01:00
Daniel Schmidt
1190b52995
use centralized arguments collection in test
2026-02-18 12:47:12 +01:00
Daniel Schmidt
065794ba8b
use centralized arguments collection in console
2026-02-18 12:47:12 +01:00
Daniel Schmidt
f6a3f271be
refactor console command to use arguments
2026-02-18 12:47:12 +01:00
Daniel Schmidt
3dce16079c
use centralized arguments collection in import
2026-02-18 12:47:12 +01:00
Daniel Schmidt
b883c69e3b
use centralized arguments collection in refresh
2026-02-18 12:47:12 +01:00
Daniel Schmidt
e9922645d7
use centralized arguments collection in query
2026-02-18 12:47:12 +01:00
Daniel Schmidt
a5b4ed33d5
use centralized arguments collection in plan
2026-02-18 12:47:12 +01:00
Daniel Schmidt
dc0fee96ef
use centralized arguments collection in apply
2026-02-18 12:47:12 +01:00
Daniel Schmidt
8faccde780
implement centralized variable collection
2026-02-18 12:47:12 +01:00
Daniel Schmidt
026c935961
move UnparsedVariableValue from backendrun to arguments
...
This prevents a cyclic dependency and also makes sense semantically.
The arguments package will collect the unparsed variable values and
the backendrun helpers will work to collect the values and transform
them into terraform.InputValue.
2026-02-18 12:47:12 +01:00
Daniel Schmidt
90eae782bf
move vars handling into own file
2026-02-18 12:47:12 +01:00
Varun Chawla
a5aa6cc5b7
states: fix RootOutputValuesEqual comparing s2 to itself ( #38181 )
...
* states: fix RootOutputValuesEqual comparing s2 to itself
RootOutputValuesEqual had a copy-paste bug where it iterated over
s2.RootOutputValues instead of s.RootOutputValues, effectively
comparing s2 against itself rather than comparing the receiver (s)
against the argument (s2). This meant the function would always
return true as long as both states had the same number of output
values, regardless of whether the actual values differed.
This bug was introduced in #37886 and affects refresh-only plan mode,
where RootOutputValuesEqual is used to determine if root output values
changed during refresh, which controls whether the plan is considered
applyable.
* add changelog entry for RootOutputValuesEqual fix
* Update changelog wording per reviewer suggestion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:15:37 +00:00
Daniel Banck
8ab5ded5b9
Merge pull request #38146 from hashicorp/dbanck/variable-const-attribute
...
Add `const` attribute to variable blocks
2026-02-18 11:37:30 +01:00
Sarah French
817ed318db
chore: Update go version from 1.25 to 1.25.7 ( #38185 )
...
build / Build for windows_amd64 (push) Blocked by required conditions
build / Build for freebsd_arm (push) Blocked by required conditions
build / Build for linux_arm (push) Blocked by required conditions
build / Build for darwin_arm64 (push) Blocked by required conditions
build / Build for linux_arm64 (push) Blocked by required conditions
build / Build for windows_arm64 (push) Blocked by required conditions
build / Build Docker image for linux_386 (push) Blocked by required conditions
build / Build Docker image for linux_amd64 (push) Blocked by required conditions
build / Build Docker image for linux_arm (push) Blocked by required conditions
build / Build Docker image for linux_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_386 (push) Blocked by required conditions
build / Build e2etest for windows_386 (push) Blocked by required conditions
build / Build e2etest for darwin_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_amd64 (push) Blocked by required conditions
build / Build e2etest for windows_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_arm (push) Blocked by required conditions
build / Build e2etest for darwin_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_arm64 (push) Blocked by required conditions
build / Run e2e test for linux_386 (push) Blocked by required conditions
build / Run e2e test for windows_386 (push) Blocked by required conditions
build / Run e2e test for darwin_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_amd64 (push) Blocked by required conditions
build / Run e2e test for windows_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_arm (push) Blocked by required conditions
build / Run e2e test for linux_arm64 (push) Blocked by required conditions
build / Run terraform-exec test for linux amd64 (push) Blocked by required conditions
Quick Checks / Unit Tests (push) Waiting to run
Quick Checks / Race Tests (push) Waiting to run
Quick Checks / End-to-end Tests (push) Waiting to run
Quick Checks / Code Consistency Checks (push) Waiting to run
* chore: Update go version from 1.25 to 1.25.7
* chore: make syncdeps
2026-02-17 17:09:45 +00:00
Daniel Banck
cbc30de3ed
Merge pull request #38186 from hashicorp/modernize-commands-to-use-arguments
...
Refactoring: Modernize various commands to use arguments
2026-02-17 17:19:15 +01:00
Daniel Schmidt
6103cfe834
Merge branch 'main' into modernize-commands-to-use-arguments
2026-02-17 16:43:17 +01:00
Radek Simko
94c0d62368
Add .git-blame-ignore-revs with copyright header commits
2026-02-17 15:18:28 +00:00
Daniel Schmidt
81b328f924
update copyright headers
2026-02-17 15:56:24 +01:00
Daniel Schmidt
d09d5ea60f
remove now unused method
2026-02-17 15:55:45 +01:00
Daniel Schmidt
592d0fe4dd
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
5e51b831be
refactor state-replace-provider command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
32fb18572d
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
89bea5de5b
refactor state-rm command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
c66d0d72c1
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
442126553b
refactor state-push command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
b9f6f14003
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
9f3c282096
refactor state-mv command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
52bbc57c62
refactor state-pull command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
acb6ed3f22
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
f7cde006ff
refactor state-show command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
da74b59ea1
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
3dbfbe5dc9
refactor state-list command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
af7783eb62
refactor providers lock command argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
c7729926fa
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:45 +01:00
Daniel Schmidt
0066780049
refactor providers mirror command argument parsing
2026-02-17 15:55:36 +01:00
Daniel Schmidt
c15f0409ed
don't explicitly specify defaults in argument parsing
2026-02-17 15:55:36 +01:00
Daniel Schmidt
0c384e8cd8
refactor providers schema command argument parsing
2026-02-17 15:55:36 +01:00
Daniel Schmidt
6f32f249f7
refactor providers command argument parsing
2026-02-17 15:55:36 +01:00