Skip to content

chore(terraform): update terraform modules to latest standards#124

Closed
jansdhillon wants to merge 2 commits intomainfrom
charmkeeper/terraform-fixes
Closed

chore(terraform): update terraform modules to latest standards#124
jansdhillon wants to merge 2 commits intomainfrom
charmkeeper/terraform-fixes

Conversation

@jansdhillon
Copy link
Copy Markdown
Contributor

Summary

This PR aligns the Terraform modules with the team's latest standards.

Note: This supersedes draft PR #123 which could not be updated due to a branch protection ruleset.

Changes

  • terraform/charm/versions.tf: Updated required_version from >= 1.10 to ~> 1.12 and juju provider to ~> 1.0
  • terraform/product/modules/landscape-scalable/versions.tf: Same version updates
  • terraform/.tflint.hcl: Added tflint config at terraform root with terraform_required_version rule enabled (as per standard)
  • renovate.json: Added with charmhub custom datasource for automated terraform revision tracking (renovate will auto-update charm revision numbers in .tftest.hcl files)
  • terraform/charm/tests/main.tftest.hcl and terraform/charm/tests/setup/main.tf: Added integration test setup for the charm module
  • terraform/product/modules/landscape-scalable/tests/main.tftest.hcl and tests/setup/main.tf: Added integration test setup for the product module
  • terraform/charm/outputs.tf: Copyright year kept as 2026 (correct)
  • terraform/charm/README.md and product README: Updated version constraint in auto-generated docs section
  • .github/workflows/test_terraform_modules.yaml: Added terraform integration tests workflow
  • .github/workflows/lint.yaml and unit-test.yaml: Updated terraform CI to use ~1.12 to match module's required_version

Testing

All mock-provider terraform tests pass locally with terraform 1.12:

Success! 16 passed, 0 failed.

This PR was opened by the charmkeeper agent.

jansdhillon and others added 2 commits April 24, 2026 15:49
- Update required_version to ~> 1.12 and juju provider to ~> 1.0
- Add terraform/.tflint.hcl at the terraform root with required_version rule
- Add renovate.json with charmhub custom datasource for automated revision tracking
- Add tftest setup modules for charm and product modules
- Fix copyright year typo in outputs.tf (2026 -> 2025)
- Update README docs sections to reflect new version constraints

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… version

- Revert outputs.tf copyright year to 2026 (was wrongly changed to 2025)
- Add missing .github/workflows/test_terraform_modules.yaml (requires workflow PAT scope)
- Update CI to use terraform ~1.12 to match required_version in modules

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jansdhillon
Copy link
Copy Markdown
Contributor Author

Superseded by #125 (needed a fresh branch due to repo ruleset requiring PRs for all branch updates).

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