Skip to content

helper/resource: Add new StateStore test mode for smoke testing Terraform state storage#591

Merged
austinvalle merged 20 commits intomainfrom
av/state-store
Jan 27, 2026
Merged

helper/resource: Add new StateStore test mode for smoke testing Terraform state storage#591
austinvalle merged 20 commits intomainfrom
av/state-store

Conversation

@austinvalle
Copy link
Member

@austinvalle austinvalle commented Jan 9, 2026

Related Issue

Ref: hashicorp/terraform-plugin-go#563
Ref: hashicorp/terraform-plugin-go#594
Ref: hashicorp/terraform-exec#556

Description

This PR introduces a new StateStore test mode that can be used to smoke test the state storage being used by Terraform. It runs a variety of Terraform commands to achieve this and is based off of the existing acceptance tests for backends in Terraform core: https://github.com/hashicorp/terraform/blob/main/internal/backend/testing.go

The StateStore mode does not test locking, there will be a follow-up PR for that functionality and it will be triggered with a different field as not all state store implementations support locking.

Note

The helper/resource/statestore/statestore_test.go tests I have been running locally with the latest main commit for Terraform, built with experiments enabled: go install -ldflags="-X main.experimentsAllowed=yes" .

I'm assuming we'll get an alpha snapshot from TF Core sometime soon, which we can then add to our CI and re-run.... but everything is working on my local ATM 😄

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

No

@austinvalle austinvalle added this to the v1.15.0 milestone Jan 9, 2026
@austinvalle austinvalle added the enhancement New feature or request label Jan 9, 2026
@austinvalle austinvalle requested a review from a team as a code owner January 9, 2026 22:09
austinvalle and others added 6 commits January 16, 2026 17:20
Bumps the github-actions group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-go` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@4dc6199...7a3fe6c)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Contributor

@SBGoods SBGoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test assertions for the smoke tests look reasonable to me 👍🏾

@austinvalle austinvalle merged commit 08dd5f0 into main Jan 27, 2026
44 checks passed
@austinvalle austinvalle deleted the av/state-store branch January 27, 2026 21:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants