chore(terraform): add tests for product module (charmkeeper)#368
Open
chore(terraform): add tests for product module (charmkeeper)#368
Conversation
…rors The product module deploys wazuh-indexer which requires juju-external-hostname to expose applications. Switching to plan-only validation avoids this constraint while still verifying the Terraform configuration is correct. Co-authored-by: Copilot <[email protected]>
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]>
Contributor
Unused entries in .trivyignoreImage: ghcr.io/canonical/wazuh-server:39b46e797369c8ef10bcf67b0f3c6b7e575a5e63-_1.0_amd64 The following CVEs are in |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Terraform test coverage for the terraform/product module by introducing a test setup module and a Terraform test definition, and wires the product module into the CI Terraform module test workflow.
Changes:
- Added a test setup module that creates three Juju models (server/indexer/dashboard) and outputs their UUIDs/names.
- Added a
main.tftest.hclthat exercises the product module with pinned charm revisions (Renovate directives included). - Updated the Terraform modules CI workflow to include
terraform/productin the tested directories (and updated.trivyignorewith new CVE entries).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
terraform/product/tests/setup/main.tf |
Creates Juju models needed to run product-module tests and outputs identifiers for downstream runs. |
terraform/product/tests/main.tftest.hcl |
Defines the Terraform test runs and variables for deploying/planning the Wazuh product stack. |
.github/workflows/test_terraform_modules.yaml |
Expands CI coverage to include terraform/product in module test runs. |
.trivyignore |
Adds additional CVE ignore entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+24
| run "basic_deploy" { | ||
| command = plan | ||
|
|
||
| variables { | ||
| server_model_uuid = run.setup_tests.server_model_uuid |
Comment on lines
16
to
+18
| with: | ||
| k8s-controller: true | ||
| terraform-directories: '["terraform/charm"]' | ||
| terraform-directories: '["terraform/charm", "terraform/product"]' |
Comment on lines
+20
to
+22
| run "basic_deploy" { | ||
| command = plan | ||
|
|
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: sets up three Juju models (server, indexer, dashboard) and outputs all required UUIDs and model namesterraform/product/tests/main.tftest.hcl: deploys the full wazuh product stack with renovate directives on every revision linelxd-controller: trueandterraform/producttoterraform-directoriesThis PR was automatically generated by charmkeeper.