chore(terraform): add tests for product module (charmkeeper)#117
Open
chore(terraform): add tests for product module (charmkeeper)#117
Conversation
CVE-2026-25679 and CVE-2026-27142 are Go stdlib vulnerabilities fixed in Go 1.25.8/1.26.1. The pebble binary hasn't been rebuilt with the patched Go version yet. Ignoring temporarily until pebble is updated. Co-authored-by: Copilot <[email protected]>
swetha1654
approved these changes
Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Terraform test coverage for the terraform/product module and wires it into the existing CI Terraform module test workflow, using a plan-based test run to avoid requiring a second controller in CI.
Changes:
- Added a Terraform test setup module that creates two Juju models and outputs their UUIDs/users.
- Added a
terraform testsuite for the product module that runscommand = planand performs a basic output assertion. - Updated CI to include
terraform/productin the Terraform directories under test (plus minor.trivyignoreupdates).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
terraform/product/tests/setup/main.tf |
Test setup module that creates two Juju models and outputs UUID/user values for downstream test runs. |
terraform/product/tests/main.tftest.hcl |
Product module terraform test definition using plan and a basic output assertion. |
.github/workflows/test_terraform_modules.yaml |
Adds terraform/product to the CI workflow’s Terraform test matrix. |
.trivyignore |
Adds additional CVE IDs to ignore list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Copyright 2025 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
|
|
||
| provider "juju" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds missing test coverage for the
terraform/productmodule.Changes
terraform/product/tests/setup/main.tf: creates two Juju models (K8s + DB) and outputs their UUIDs and usernamesterraform/product/tests/main.tftest.hcl: validates the full opencti product stack usingcommand = plan(cross-controller deployment spanning K8s + LXD)terraform/producttoterraform-directoriesNote on
command = planThe product module spans two Juju controllers (K8s + LXD). Using
command = planvalidates the full module structure, variable definitions, and planned outputs without requiring a second LXD controller in CI.This PR was automatically generated by charmkeeper.