Skip to content

ci(iac): fix invalid workflow file and broken vultr template - #798

Merged
Vonng merged 2 commits into
mainfrom
ci/fix-iac-workflow
Nov 9, 2026
Merged

Vonng merged 2 commits into
mainfrom
ci/fix-iac-workflow

Conversation

@Vonng

@Vonng Vonng commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

IaC Templates (.github/workflows/iac.yml) has failed with zero jobs on every run since it was added on 2026-08-24 (22 runs, e.g. 42531350496). GitHub rejected the file at parse time, which also made it ignore the paths: filter and fire on every push.

1. Invalid workflow file (root cause)

Both jobs set TF_PLUGIN_CACHE_DIR: ${{ runner.temp }}/... in job-level env. The runner context is not available in jobs.<id>.env, so the whole workflow was rejected. The cache step now exports TF_PLUGIN_CACHE_DIR=${RUNNER_TEMP}/... through $GITHUB_ENV instead.

2. Missing .opentofu-version

setup-opentofu read tofu_version_file: .opentofu-version, but that file was removed in e55612e. Pin tofu_version: 1.12.6 inline (the removed file's value, same style as terraform_version in the compat job) and drop it from the path filters.

3. terraform/spec/vultr.tf no longer validates

vultr/vultr provider v2.33.0 removed vultr_vpc2 and the instance vpc2_ids argument (vultr/terraform-provider-vultr#760). The template's ~> 2.0 constraint resolves to 2.33.x, so a fresh init failed. Switch to vultr_vpc (v4_subnet / v4_subnet_mask) + vpc_ids, same 10.10.10.0/24 subnet.

Test plan

  • actionlint v1.7.12 (with shellcheck): 0 errors on all workflows
  • ./terraform/check validate locally: 15/15 templates pass with OpenTofu 1.12.6 and Terraform 1.15.2
  • Both IaC Templates jobs pass on this PR
  • Vultr template not exercised with a real apply; existing stacks re-applying will replace the VPC resource

🤖 Generated with Claude Code

Vonng and others added 2 commits November 9, 2026 06:50
iac.yml has failed with zero jobs on every run since it was added:
GitHub rejected the file because job-level env used ${{ runner.temp }},
and the runner context is not available in jobs.<id>.env. Export
TF_PLUGIN_CACHE_DIR from the cache step via $GITHUB_ENV instead.

Also pin tofu_version inline: .opentofu-version was removed in e55612e,
so setup-opentofu would fail right after the parse error is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vultr/vultr provider v2.33.0 removed the legacy vultr_vpc2 resource and
the instance vpc2_ids argument (vultr/terraform-provider-vultr#760).
The template's "~> 2.0" constraint resolves to 2.33.x, so a fresh init
failed validation. Switch to vultr_vpc / vpc_ids with the same subnet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vonng
Vonng merged commit 8297843 into main Nov 9, 2026
4 checks passed
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