Skip to content

fix(examples): pin the complete example to the published provider version - #24

Merged
vmvarela merged 1 commit into
masterfrom
fix/example-pin-published-version
Oct 23, 2026
Merged

vmvarela merged 1 commit into
masterfrom
fix/example-pin-published-version

Conversation

@vmvarela

Copy link
Copy Markdown
Owner

What

  • examples/complete/main.tf pins vmvarela/github-enterprise to = 0.1.0, the version published in the Terraform Registry.
  • scripts/smoke_package.py derives the version constraint from the example by pattern instead of matching a hard-coded string.
  • docs/guides/releases.md verifies the published 0.1.0 artifacts in its console example.

Why

The example pinned = 0.1.0-rc.1. That tag and release were removed before 0.1.0 was published, so the documented example no longer initialized:

Error: Failed to query available provider packages
vmvarela/github-enterprise: no available releases match the given constraints

The packaging smoke test passed only because it rewrote the constraint to the version under test, which hid the stale pin; it also had to be edited by hand on every release.

How tested

  • terraform init and terraform validate in a copy of examples/complete against the public registry: vmvarela/github-enterprise v0.1.0 installed with a valid signature (key ID 284588A61CDA90B9) alongside integrations/github v6.13.0, configuration valid.
  • The substitution pattern matches exactly one constraint and rewrites it for arbitrary versions (checked with 0.1.0 and 0.2.3); python3 -m py_compile scripts/smoke_package.py.
  • terraform fmt -check -recursive examples, make docs with no generated diff, go vet ./..., git diff --check.
  • Not run locally: make package-check requires Linux, so the package CI job is the only valid signal for it.

Remaining work

Live acceptance against a dedicated test enterprise (#6) is still pending, and the provider is not yet listed in the OpenTofu Registry.

Refs #6

…sion

The example pinned = 0.1.0-rc.1, a version that no longer exists now that 0.1.0 is published, so terraform init failed with "no available releases match the given constraints". The packaging smoke test only kept working because it rewrote that pin to the version under test, which made the stale constraint invisible. Pin the published version and derive the smoke-test constraint by pattern so a release no longer needs a source edit.
@vmvarela
vmvarela merged commit 4f38755 into master Oct 23, 2026
3 checks passed
@vmvarela
vmvarela deleted the fix/example-pin-published-version branch October 23, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant