Skip to content

fix(tfe-v2): accept colon-form key:value cloud-block tags#518

Merged
mattrobinsonsre merged 2 commits into
mainfrom
fix/cloud-block-colon-tags
Jun 17, 2026
Merged

fix(tfe-v2): accept colon-form key:value cloud-block tags#518
mattrobinsonsre merged 2 commits into
mainfrom
fix/cloud-block-colon-tags

Conversation

@mattrobinsonsre

@mattrobinsonsre mattrobinsonsre commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Lets you select Terrapod workspaces by an exact label key+value from the cloud block with OpenTofu, and clears a newly-disclosed listener-image CVE that was blocking CI.

Colon-form cloud-block tags

OpenTofu (verified on v1.12.2) only supports the set-of-string form of cloud { workspaces { tags = [...] } }; the Terraform 1.10+ map form is rejected at config-validation (set of string required) — tofu's own schema, before any API call. Since = is not a legal tag character, the portable way to select by exact label key+value is the colon form, e.g. tags = ["repo:web-app"].

Terrapod's search[tags] parser only split tokens on =, so a key:value token was treated as a bare key and matched nothing. _parse_tag_filters now splits each list-form token on the first : or = so both map to an exact key=value label filter. Bare tags and the = form (go-tfe / direct callers) are unchanged.

Bundled security fix

The listener image pinned cryptography <48.0.0 (→ 47.0.0), which a newly-published HIGH advisory (GHSA-537c-gmf6-5ccf) flags — fixed in 48.0.1. Raised the listener floor to >=48.0.1 (api/runner/migrations already get 48.x via the main pyproject).

OpenTofu's `cloud { workspaces { tags = [...] } }` only supports the
set-of-string form; the Terraform 1.10+ map form (`tags = { k = "v" }`)
is rejected with "set of string required". Since `=` isn't a legal tag
character, the portable way to select workspaces by an exact label
key+value is the colon form, e.g. `tags = ["repo:tf-aws-core"]`.

The `search[tags]` parser only split tokens on `=`, so a `key:value`
token was treated as a bare key and never matched. Split list-form
tokens on the first `:` or `=` so both map to an exact `key=value`
label filter. The `=` form (go-tfe / direct callers) is unchanged.

Adds parser tests for the colon form, mixed colon/equals/bare tokens,
hyphenated values, and empty-key skipping; updates the migration doc.
@mattrobinsonsre mattrobinsonsre enabled auto-merge (squash) June 17, 2026 10:14
The listener image pinned cryptography <48.0.0, so it resolved to 47.0.0,
which a newly-published HIGH advisory (GHSA-537c-gmf6-5ccf, vulnerable
OpenSSL bundled in the cryptography wheels) flags — fixed in 48.0.1. The
main pyproject already allows <49.0.0 (api/runner/migrations get 48.x and
pass the scan); only the listener's separate cap blocked the fix. Raise
its floor to 48.0.1 to clear the listener image Trivy scan.
@mattrobinsonsre mattrobinsonsre merged commit 9367885 into main Jun 17, 2026
51 checks passed
@mattrobinsonsre mattrobinsonsre deleted the fix/cloud-block-colon-tags branch June 17, 2026 10:24
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