Repository navigation
chore: migrate terraform modules to CC008 #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
seb4stien
wants to merge
4
commits into
main
Choose a base branch
from
chore/terraform-cc008-migration-charmkeeper
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f715a3e
Re-verified end-to-end: CC008 checker 4/4 pass, `terraform fmt`/`tfli…
seb4stien 73f098c
Merge branch 'main' into chore/terraform-cc008-migration-charmkeeper
seb4stien fa76d62
Remove unecessary things
seb4stien 3d18fb8
feat(terraform): derive product charm channels from risk variable
seb4stien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright 2026 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
|
|
||
| name: Update Terraform documentation | ||
|
|
||
| # Keep the `paths` filters below and the `terraform-directory` input in sync with | ||
| # the directories where the Terraform modules live. | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '**/terraform/**' | ||
| - '.github/workflows/generate_terraform_docs.yaml' | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '**/terraform/**' | ||
| - '.github/workflows/generate_terraform_docs.yaml' | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| terraform-docs: | ||
| name: Update Terraform documentation | ||
| uses: canonical/operator-workflows/.github/workflows/generate_terraform_docs.yaml@030c5b20a0bb880dcf1ed326bff0fc16b6eb6ac1 # main | ||
| secrets: inherit | ||
| with: | ||
| terraform-directory: terraform/charm/haproxy,terraform/charm/haproxy_ddos_protection_configurator,terraform/charm/haproxy_spoe_auth,terraform/product |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Copyright 2026 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
|
|
||
| name: Terraform modules compliance | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - '**/terraform/**' | ||
| - '.github/workflows/terraform_modules_compliance.yaml' | ||
|
|
||
| jobs: | ||
| terraform-compliance: | ||
| uses: canonical/operator-workflows/.github/workflows/terraform_modules_compliance.yaml@030c5b20a0bb880dcf1ed326bff0fc16b6eb6ac1 # main | ||
| with: | ||
| terraform-directories: '["terraform/charm/haproxy", "terraform/charm/haproxy_ddos_protection_configurator", "terraform/charm/haproxy_spoe_auth", "terraform/product"]' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Copyright 2026 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
|
|
||
| name: Terraform modules release | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - '**/terraform/**' | ||
| - '.github/workflows/terraform_modules_release.yaml' | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '**/terraform/**' | ||
| - '.github/workflows/terraform_modules_release.yaml' | ||
|
|
||
| jobs: | ||
| terraform: | ||
| uses: canonical/operator-workflows/.github/workflows/terraform_modules_release.yaml@030c5b20a0bb880dcf1ed326bff0fc16b6eb6ac1 # main | ||
| permissions: | ||
| contents: write |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| version_schema: 2 | ||
|
|
||
| changes: | ||
| - title: Migrated Terraform modules to the CC008 Charm Terraform Standards | ||
| author: copilot | ||
| type: minor | ||
| description: > | ||
| All Terraform modules under `terraform/` (the `haproxy`, | ||
| `haproxy-ddos-protection-configurator` and `haproxy-spoe-auth` charm | ||
| modules, and the product module) were migrated to the CC008 Charm | ||
| Terraform Standards. Charm module `base` and `constraints` variables | ||
| now default to `null` instead of a fixed value, and `app_name`, | ||
| `channel` and `model_uuid` are no longer nullable. The product module | ||
| gained a new `risk` input variable. CI now runs the CC008 compliance | ||
| checker and releases Terraform modules with `tf-X.Y.Z` tags via the | ||
| canonical/operator-workflows reusable workflows. | ||
| urls: | ||
| pr: | ||
| - "" | ||
| related_doc: | ||
| related_issue: | ||
| visibility: internal | ||
| highlight: false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1 |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Copyright 2025 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
|
|
||
| locals { | ||
| use_hacluster = var.hacluster != null | ||
| use_keepalived = var.keepalived != null | ||
|
|
||
| # Product owns each charm's track; `risk` selects the channel risk solution-wide. | ||
| haproxy_channel = "2.8/${var.risk}" | ||
| hacluster_channel = "2.4/${var.risk}" | ||
| keepalived_channel = "latest/${var.risk}" | ||
| grafana_agent_channel = "2/${var.risk}" | ||
| haproxy_ddos_protection_configurator_channel = "latest/${var.risk}" | ||
| haproxy_spoe_auth_channel = "latest/${var.risk}" | ||
| oauth_external_idp_integrator_channel = "latest/${var.risk}" | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.