Skip to content

feat: ADR - TF tagging#435

Closed
MichaelThamm wants to merge 3 commits intomainfrom
feat/adr-tf-tagging
Closed

feat: ADR - TF tagging#435
MichaelThamm wants to merge 3 commits intomainfrom
feat/adr-tf-tagging

Conversation

@MichaelThamm
Copy link
Copy Markdown
Contributor

@MichaelThamm MichaelThamm commented Apr 10, 2026

@MichaelThamm MichaelThamm requested a review from a team as a code owner April 10, 2026 20:37
Comment thread decision-records/2026-04-02--terraform-module-tagging.md Outdated
Comment thread decision-records/2026-04-02--terraform-module-tagging.md Outdated
Comment thread decision-records/2026-04-02--terraform-module-tagging.md Outdated
Comment thread decision-records/2026-04-02--terraform-module-tagging.md
|---|---|---|---|---|
| `3.6.7` | `3.6` | `26.04` | | `1.0.0` |
| | | | A TF endpoint added to track `3.6` | `1.1.0` |
| | | | A TF endpoint added to previous track e.g., `2.9` | `n-1.n+1.0` or `n.n+1.0` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the ambiguity in the tag? Can we swap this with a concrete number like the other examples?

Copy link
Copy Markdown
Contributor Author

@MichaelThamm MichaelThamm Apr 14, 2026

Choose a reason for hiding this comment

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

❗️Some issues with our approach

A tag is based on a commit on track/0 and we are now on track/1, but we never had to make any TF changes until track/2 is released. Now we bump the major to e.g. 1.0.0 and this tag is based on a commit on track/2. However, now we want to go back and add an endpoint to the 0.x.x TF module, but I don't know which track to tag a commit from.

Solution idea: we can use branches named after major TF tag versions to avoid outdated TF in older branches.


If we have charms in a product that do not have breaking changes, then they have minor bumps per cycle. What do we do with the product version to stay up-to-date with docs? The concern Luca brought up is that we will not be able to version our stack docs separately from the i.e., we have a core mapping conflict between TF modules vs. RTD.

We might have a workaround if we name tracks after major.minor of the product tf module
Then you'd have separate docs every time we change the charm channels (likely every 6 months); the downside is of course that if most documentation stays the same, we need to backport docs changes, but that's probably fine


### Shortcomings of our decision
- ❗️Tags are opaque to charm-tracks e.g., `1.0.0` is specific to track `2`.
- A user needs to search release notes / module docs to understand what tracks are allowed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that the validation on tracks also implies users can't deploy chosen version of the workloads besides the few combinations that we explicitly allow.

If we have:

  • 1.0.0 with Loki 2.9 and Grafana 10
  • 2.0.0 with Loki 3.6 and Grafana 12

If a user wants to deploy Loki 3.6 with Grafana 10, they'll have to fork our Terraform module and write their own; I would add that here.

Copy link
Copy Markdown
Contributor Author

@MichaelThamm MichaelThamm Apr 14, 2026

Choose a reason for hiding this comment

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

This is not necessarily true. The bumping of applications/components within COS (likely every cycle) may not require a major change in the product module. E.g., this is also possible if we did not break the product API:

  • 1.0.0 with Loki 2.9 and Grafana 10
  • 1.1.0 with Loki 3.6 and Grafana 12

Regardless, the user can still override the channel for a specific application if they choose to. E.g.,

module "cos" {
  source = 1.1.0
  grafana = {channel = 10.1/stable}
}

@lucabello
Copy link
Copy Markdown
Contributor

@lucabello lucabello closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants