Skip to content

refactor(terraform): run deploy-cloud on the infra examples - #6767

Merged
dan-petty merged 8 commits into
mainfrom
refactor/6679-deploy-cloud-on-infra-modules
Nov 22, 2026
Merged

dan-petty merged 8 commits into
mainfrom
refactor/6679-deploy-cloud-on-infra-modules

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops tf deploy-cloud -p <provider> runs in an infra checkout: it
uses tf/examples/<provider> and its <provider>.tfvars.example, the
layout of dan-petty/infra (ADR 0032). When that folder does not exist,
the command exits 1 before any plan, also with --dry-run, and the
error says to run it in an infra checkout.

tf/aws, tf/azure, tf/gcp, tf/environments, tf/README.md and
the test that read tf/azure are gone, so no second copy stays live.
The azure-aks module of infra keeps the authorized API server ranges.
The tf/** route of the implement step goes, and the AGENTS.md row
becomes "change a manifest or the cluster". The repository pin test
leaves out the Terraform provider kind. README.md, three knowledge
base pages, docs/ROUTINE_TASKS.md and the command pages follow the
infra layout.

Closes #6679

Change: openspec/changes/archive/2026-11-22-6679-deploy-cloud-on-infra-modules/

@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/terraform OpenTofu modules and the infrastructure they declare labels Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review points for #6679 (not part of the squash message).

Person steps: none.

  1. Acceptance criterion 2 says that the dry run "prints the init and plan commands". deploy-cloud applies, so its dry run plans tofu init and tofu apply -var-file <checkout>/tf/examples/aws/aws.tfvars.example. The change keeps the apply step, because the issue changes only the folders. The infra tf/examples/README.md says that deploy-cloud "will" run tofu init and tofu plan with a copy of the values file. That sentence does not agree with the command, which runs init and apply with the example file itself when --var-file is not given.
  2. Proof of criterion 2 on the real system: an export of dan-petty/infra origin/main (git archive, then git init) as the working folder, then strace -f -e trace=connect,execve uv run --project <worktree> devops tf deploy-cloud -p aws --dry-run. It exited 0 and printed the plan for tf/examples/aws. The trace had 0 connect calls of any family and no tofu or terraform exec. The dry run starts no tool, so it needs no network block.
  3. tests/security/test_tf_azure_aks_security.py (AZU-0041) is deleted with tf/azure. The infra module tf/modules/azure-aks sets api_server_access_profile.authorized_ip_ranges = var.api_server_authorized_ip_ranges, and that variable has no default and a validation that needs at least one range.
  4. test_the_repository_has_at_least_one_pin_of_each_kind now leaves out the Terraform provider kind, because this repository has no .tf file. The fixture repository of tests/research/test_inventory.py still covers the Terraform pin reader.
  5. Criterion 4 (devops ci --check --only test,lint,typecheck,docs): the scoped rows, the covering test files and mypy on the changed modules passed locally. The full test and typecheck rows are the required CI checks of this pull request.

@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 14:11
@dan-petty
dan-petty merged commit 7344d29 into main Nov 22, 2026
30 checks passed
@dan-petty
dan-petty deleted the refactor/6679-deploy-cloud-on-infra-modules branch November 22, 2026 14:18
dan-petty pushed a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.194.1](v0.194.0...v0.194.1)
(2026-11-22)


### Code Refactoring

* **terraform:** run deploy-cloud on the infra examples
([#6767](#6767))
([7344d29](7344d29))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/terraform OpenTofu modules and the infrastructure they declare type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(tf): run deploy-cloud on the infra modules

1 participant