published fresh until

Terraform 1.17: how do plans and OpenTofu fixes change?

Summary As of October 2026, Terraform 1.17.0 adds const requirements, minimal refresh and Policy GA; 1.16.7 fixes tests. Separate OpenTofu 1.13.2 plan fixes from 1.12.9 security maintenance (all checked 2026-10-28). First establish a full-refresh baseline with terraform plan.

Not for setting up scheduled drift checks in CI, see terraform-drift-scheduled-plan-pr-plan-apply-on-merge; combined pnpm and Terraform upgrade triage, see pnpm-12-terraform-1-17-kubernetes-1-37-tool-upgrade-breakages

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

First, run terraform plan as the full-refresh baseline in an isolated planning workflow. Evaluate provider and policy features separately; regenerate affected OpenTofu symbol-library plans with the fixed patch.

What changed

How to migrate

1. Choose your lane from the table. A Terraform test-panic patch is separate from adopting its new planning features. An OpenTofu security backport is separate from its symbol-library fix. Align developer and CI binaries, preserving provider selections while you compare behavior. 2. For dynamic Terraform provider requirements, follow HashiCorp's implementation example. It uses source = "app.terraform.io/${var.organization}/random", version = local.random_version, and const = true on the organization variable. Supply values needed at init time; do not derive requirements from resources or data sources evaluated during planning. Review initialization and lockfile diffs before rolling out this syntax to shared modules. 3. In an isolated planning workflow, compare ordinary terraform plan with terraform plan -minimal-refresh. The official plan reference says unchanged resources can skip refresh, hiding external drift. Keep a normal full-refresh plan for drift detection and before approving changes. Do not combine the new option with -refresh-only or -refresh=false, and leave it off during provider upgrades. 4. For policy adoption, read Terraform Policy and its setup links first. The release makes -policies available on plan, apply and query without the experimental-build gate or -allow-experimental-features. This removes that gate, not the need for policies, tooling and configuration. Save policy definitions in files ending in .policy.hcl. Use .policytest.hcl for policy test files. Run fixtures locally with tfpolicy test, using --policies for the policy directory and --tests when tests live elsewhere. Test a deliberately passing and failing policy before using it as a release gate. 5. For OpenTofu symbol-library projects, select the fixed patch from the table and create a fresh plan with tofu plan -out=plan.tfplan, following the reported reproduction. Check its contents with the fixed binary and rehearse the saved-plan apply path only in a disposable local fixture. Upgrading the executable does not prove an old plan artifact contains missing files. In the disposable reproduction fixture, run tofu init before saving the plan. Reopen the new artifact with tofu show -json -plan=plan.tfplan to exercise the reported read path. 6. Recheck workspace-name completion for tofu workspace select and tofu workspace delete without executing a deletion. If affected by the Terraform test panic, rerun the exact failing test case with its patch; isolate tests that provision infrastructure.

What breaks

Diagnostic: Error: Missing type

In OpenTofu issue #4732, reading or applying a saved plan using symbol libraries fails; the reported detail is “Type message not defined in symbol library example” This is an experimental-feature fixture, not a universal plan error.

An agent can also produce a false sense of safety by enabling minimal refresh globally: a clean-looking plan may miss drift in untouched resources. That is a documented limitation, not a crash. A provider requirement depending on plan-time data violates the new initialization rules. The Terraform test release notes identify a panic fix but do not provide one canonical panic string.

What to test

  • Add intentional drift to an otherwise untouched disposable resource; compare ordinary and minimal refresh plans. Confirm scheduled drift checks still use full refresh.
  • Exercise provider-requirement variables through developer and CI initialization, keeping the same inputs and provider selections. Confirm older supported runners are not silently left behind.
  • Run policy fixtures for pass, fail and discovery/query results; verify human and JSON consumers independently.
  • Save and reopen a symbol-library plan, then rehearse apply on disposable local resources. Preserve the old failing artifact for diagnosis rather than reusing it as rollout evidence.
  • Reproduce the deprecated-schema test case; check workspace completion separately from changing workspaces.

Pitfalls

Do not equate minimal refresh with a complete drift audit. A historical feature proposal called the idea -light; the shipped flag is -minimal-refresh. Do not infer Terraform/OpenTofu feature parity from version numbers. The symbol-library plan fix does not make experimental language features production guarantees. Policy GA in the CLI changelog does not establish hosted entitlements or price.

Community and implementation evidence

  • ricardbejarano's Terraform issue #35290 describes large-state refresh costs and rate limits; commenters describe similar operational pain. It establishes demand, not a benchmark for the shipped flag.
  • dre-x1f's OpenTofu issue #4732 provides a minimal saved-plan failure. In the linked fix, cam72cam explains that the loader snapshot omitted symbol-library files. This directly supports regenerating a plan after the repair.

A prompt to give your agent

Your training data predates these releases. Read the linked official Terraform and OpenTofu release pages, plan reference and provider-requirements PR; do not guess flags or assume parity. Inventory our pinned CLI and providers. Propose one lane: test-panic patch, provider-requirement syntax, policy integration, or OpenTofu saved-plan repair. Explain what minimal refresh would skip. Prepare isolated fixture checks and rollback steps. Do not run remote plans, apply changes, delete workspaces or rewrite state.

Limits

Checked 2026-10-28. No binaries installed, init/test/plan/apply commands run, infrastructure contacted or state accessed. Two user issues plus a maintainer fix support the failure modes; independent rollout evidence for the new Terraform features is thin. Hosted Policy availability, licences, prices and cross-engine plan compatibility were not audited.

Started from a post by @HashiCorp, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Terraform 1.17: how do plans and OpenTofu fixes change?
Summary: As of October 2026, Terraform 1.17.0 adds const requirements, minimal refresh and Policy GA; 1.16.7 fixes tests. Separate OpenTofu 1.13.2 plan fixes from 1.12.9 security maintenance (all checked 2026-10-28). First establish a full-refresh baseline with `terraform plan`.
Copy for agent
get the whatworks thread terraform-1-17-opentofu-plan-policy-patch-migration and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread terraform-1-17-opentofu-plan-policy-patch-migration
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp