github Backblaze/terraform-provider-b2 v0.15.0

one hour ago

Changed

  • SSE-C key changes are detected using a computed SHA-256 key_fingerprint; raw secret_b64 is cleared from resource state. Once a fingerprint exists, changing the key or key ID replaces the file version. Refresh derives a fingerprint from any legacy secret_b64 still in state, so a changed key or key ID can replace the file version on the next plan; only state with neither a fingerprint nor a stored secret (for example an imported file version) cannot detect rotations until a deliberate replacement establishes a baseline. On upgrade, review terraform plan; confirm the local source is available before using terraform apply -replace=<resource address> to opt in. Consider create_before_destroy to upload the replacement before deleting the old version. Treat existing state backups and saved plans as sensitive.
  • Breaking change: Mark b2_bucket_file_signed_url.signed_url as sensitive. Terraform outputs that expose this attribute must declare sensitive = true. Terraform state still stores the value in plaintext.
  • Breaking change: The id of b2_bucket_file_signed_url no longer holds the signed URL; read signed_url instead. Its non-credential ID is <bucket_id>/<file_name>/<duration>.
  • Breaking change: b2_bucket_files now bounds listings with max_results (default 10000, maximum 100000), and a read that matches more entries fails instead of returning a listing. Earlier versions had no limit, so a configuration that reads a larger folder (for example 15000 file versions) now fails every terraform plan and refresh after upgrade. Set max_results high enough to cover the folder (up to 100000) or narrow folder_name.
  • Breaking change: b2_bucket_file_version now compares the local source content with the stored B2 checksum during planning and replaces the file version (delete and re-upload) when they differ, for example when a generated file is rewritten at the same path. Earlier versions showed an empty plan for such changes. Expect new replacement plans on upgrade; comparison is skipped when no usable checksum or readable regular source file is available. Consider create_before_destroy to upload the replacement before deleting the old version.
  • A failed call to the Python bindings now returns the operation and the reported error (for example unauthorized) instead of the helper's full Python traceback.

Fixed

  • Preserve application-key replacement plans when bucket restrictions change, including narrowing access; suppress only equivalent bucket-alias migration values.
  • Derive b2_bucket_file and b2_bucket_files data-source IDs from bucket and path instead of provider credentials. IDs change on the next refresh.
  • Advertise the provider registry address in debug reattach configuration.
  • Restrict extracted bindings executables to owner-only permissions.
  • Preserve the exact embedded bindings bytes when extracting the executable.
  • Synchronize all access to the cached bindings executable path.
  • Explain bindings execution failures caused by permissions, noexec temporary directories, or an incompatible executable format.
  • Decode binding input and encode output as UTF-8 regardless of the system locale.
  • Remove extracted bindings after provider tests and when extraction fails.
  • Report the bucket name and original error when a failed bucket update cannot be rolled back.
  • Treat deletion of an already-deleted bucket as a successful no-op.
  • Stop the bindings process and its workers when an operation is canceled, and preserve cancellation and deadline errors.
  • Remove externally deleted b2_bucket_file_version versions from state during refresh while preserving other API errors.
  • Return folder prefixes instead of nested files in non-recursive b2_bucket_files listings.
  • Allow default_retention mode none to clear bucket default retention without a perpetual Terraform diff; reject a retention period with mode none
  • Populate the deprecated allowed.bucket_id and allowed.bucket_name fields of b2_account_info from the first allowed bucket.
  • Default omitted duration in b2_bucket_file_signed_url to 86400 seconds (one day) instead of sending zero seconds
  • Length-validation errors now report the field's length instead of its value.

Security

  • Redact sensitive values from debug logs and returned Python bindings errors, and redact signed URLs and webhook custom header values from debug logs. Debug logs retain the full redacted bindings stderr; only the returned Terraform error is reduced.
  • Upgrade golang.org/x/net to v0.62.0 (GO-2026-6860, GO-2026-6866)
  • Upgrade the Go toolchain and CI/release builds to Go 1.26.11 to fix a reachable net/http vulnerability (GO-2026-6859)

Infrastructure

  • Run acceptance tests against the pinned B2 Simulator in pull-request and release CI, and run real-B2 acceptance tests weekly or on manual dispatch; the live run fails when its credentials are missing, and a failed scheduled run opens or updates an issue.
  • Require a successful real-B2 acceptance run on the tagged commit before publishing a release.
  • Run acceptance tests per platform, fail CI when any acceptance job is skipped, and move the macOS jobs from the retired macOS 14 runners to macos-15 and macos-15-intel.
  • Make the examples self-contained and add an offline validation target.
  • Verify the Simulator checkout in the test job against SIMULATOR_REVISION and fail early when the Simulator deploy key is missing, restoring the CI policy tests.
  • Run the Python bindings tests and the default-retention round-trip acceptance test against a local b2-simulator (backblaze-labs/b2-simulator, B2_SIMULATOR_DIR) instead of b2sdk's in-process RawSimulator; the retention test's cleanup advances the simulator's virtual clock instead of editing stored retention.
  • Strengthen data-source acceptance test assertions to compare collection counts and concrete values (bucket IDs, capabilities, options, file-version collections) instead of absent root keys.
  • Allow offline CI runs without a packaged bindings fixture while requiring it in the provider CI.
  • Pin Python build dependencies, run Python bindings tests in CI, and validate SDK harness rows without relying on their order or count.
  • Gate tagged releases on CI, restrict workflow token permissions, and pin actions to commits.
  • Add regression tests for known defects. Tests for defects that are still present are excluded from make test and run with make test-known-defects (Go, build tag knowndefect) or python -m pytest python-bindings/tests -m known_defect --runxfail (Python)
  • Add Security (govulncheck via make vulncheck) and CodeQL (Go) GitHub Actions workflows for static security analysis
  • The repository-owned upload.stall resilience check now stalls the upload for 130 s instead of 60 s, just above the 128 s upload timeout of the pinned b2sdk, so the client abandons the stalled request, gets a new upload URL and retries
  • Remove the auth.clock_expiry resilience check from the repository-owned .sdkharness registry: no provider operation outlives its own authorization, because every operation runs as a fresh process with in-memory account info

Don't miss a new terraform-provider-b2 release

NewReleases is sending notifications on new releases.