Skip to content

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

Open
jansdhillon wants to merge 3 commits intomainfrom
charmkeeper/terraform-v2
Open

chore(terraform): update terraform modules to latest standards#125
jansdhillon wants to merge 3 commits intomainfrom
charmkeeper/terraform-v2

Conversation

@jansdhillon
Copy link
Copy Markdown
Contributor

Summary

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

Note: This supersedes draft PRs #123 and #124. Due to a repository ruleset requiring PRs for all branch updates, each fix required a new branch.

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
  • renovate.json: Added with charmhub custom datasource for automated terraform revision tracking
  • 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/: Added integration and mock test suite for the product module
  • terraform/charm/outputs.tf: Copyright year preserved as 2026
  • 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 CI to use terraform ~1.12 to match module required_version
  • terraform/charm/Makefile and terraform/product/Makefile: Updated unit test targets to filter to mock-only tests (integration tests in main.tftest.hcl require a Juju controller, handled by test_terraform_modules.yaml)

Testing

All mock-provider terraform tests pass:

Success! 14 passed, 0 failed.

This PR was opened by the charmkeeper agent.

jansdhillon and others added 3 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>
The main.tftest.hcl files require a real Juju controller and should only
run in the integration test workflow (test_terraform_modules.yaml with
lxd-controller: true). Update Makefile targets to filter to mock-only
test files for the unit test CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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