Update terraform module#590
Open
Thanhphan1147 wants to merge 8 commits into
Open
Conversation
6 tasks
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.
What this PR does
Adds non-breaking outputs/inputs to the Terraform modules to align with CC008 (Charm Terraform Standards). No existing interface changes:
haproxy,haproxy_spoe_auth,haproxy_ddos_protection_configurator): add theapplicationoutput exposing the deployedjuju_applicationobject.modelsoutput (model UUID + deployed components) and themetadataoutput (version), plus a newmetadata_versioninput.terraform/tests/main.tftest.hcl.All changes are additive — existing
app_name,provides, andrequiresoutputs are unchanged.Why we need it
CC008 mandates an
applicationoutput for charm modules andmodels/metadataoutputs for product modules. These additions improve module consumability (cross-module wiring, deployment metadata) while remaining backward compatible.Test plan
terraform fmt -check -recursive— passesterraform validateon all four modules (charm/haproxy,charm/haproxy_spoe_auth,charm/haproxy_ddos_protection_configurator,product) —Success!tflint— runs in CI (test_terraform_files.yaml)terraform testassertions formodels/metadatarun in CI (test_terraform_module.yaml, needs a Juju controller)Review focus
terraform/product/outputs.tf—models.componentsreferences the new charmapplicationoutputs and merges thefor_eachspoe-auth/oauth applications.metadatais intentionally version-only (no timestamps) to avoid plan/apply churn.Potential breaking changes
None — all changes are additive. Deferred to a future major-bump PR: converting
provides/requirestomap(object)withkind/name/endpoint(and cross-controllercontrollerfield).Checklist
terraform fmtpasses andtflintreports no errorsterraform-docsworkflowdocs/changelog.mdwith user-relevant changesno-release-note