Skip to content

chore(terraform): add tests for product module (charmkeeper)#117

Open
seb4stien wants to merge 3 commits intomainfrom
charmkeeper/terraform
Open

chore(terraform): add tests for product module (charmkeeper)#117
seb4stien wants to merge 3 commits intomainfrom
charmkeeper/terraform

Conversation

@seb4stien
Copy link
Contributor

Summary

Adds missing test coverage for the terraform/product module.

Changes

  • Created terraform/product/tests/setup/main.tf: creates two Juju models (K8s + DB) and outputs their UUIDs and usernames
  • Created terraform/product/tests/main.tftest.hcl: validates the full opencti product stack using command = plan (cross-controller deployment spanning K8s + LXD)
  • Updated CI workflow: added terraform/product to terraform-directories

Note on command = plan

The product module spans two Juju controllers (K8s + LXD). Using command = plan validates the full module structure, variable definitions, and planned outputs without requiring a second LXD controller in CI.

This PR was automatically generated by charmkeeper.

seb4stien and others added 2 commits March 11, 2026 15:08
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]>
@seb4stien seb4stien marked this pull request as ready for review March 12, 2026 17:12
@seb4stien seb4stien requested a review from a team as a code owner March 12, 2026 17:12
@swetha1654 swetha1654 requested a review from Copilot March 13, 2026 12:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test suite for the product module that runs command = plan and performs a basic output assertion.
  • Updated CI to include terraform/product in the Terraform directories under test (plus minor .trivyignore updates).

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" {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants