Skip to content

CC008 Spec alignment#215

Merged
Batalex merged 15 commits intoterraform-cc008from
cc008/spec-alignment
Apr 27, 2026
Merged

CC008 Spec alignment#215
Batalex merged 15 commits intoterraform-cc008from
cc008/spec-alignment

Conversation

@Batalex
Copy link
Copy Markdown
Contributor

@Batalex Batalex commented Apr 17, 2026

This PR addresses the following, previously missing from #208:

  • deployed_at product output
  • swap-able external relations

Other changes:

  • We now use COS lite components from 2/stable instead of the dev/ track
  • We introduced tflint to lint the terraform modules. This PR removes some variables we might re-add later, that's fine.
  • The tox target for terraform-docs was renamed to tf-docs, shorter to type and more explicit

deployed_at

On the first apply, terraform output gives the same timestamp for both this field and updated_at. However, the terraform_data resource will make sure that the value is tracked in the terraform state and will never be updated. Therefore, subsequent terraform apply will leave this attribute untouched.

Component external relations

Relations with postgresql (x2), certificate provider, zookeeper and data-integrator are now following the framework defined in CC008 and should be easily swap-able for cross-model offers. However, this is not tested in CI since this would make our tests even more complex.
The result is a bit verbose, as I added some validation rules for each integration.
We also had to introduce a new component variable object_storage_interface since we cannot rely anymore exclusively on the object storage endpoint string value (undefined for a cross-model offer) to use the proper interface on the other end of the relation.

@Batalex Batalex self-assigned this Apr 17, 2026
@Batalex Batalex marked this pull request as ready for review April 17, 2026 15:32
@Batalex Batalex requested review from deusebio and welpaolo April 17, 2026 15:32
@Batalex Batalex force-pushed the cc008/spec-alignment branch from 752bf56 to 91d310d Compare April 21, 2026 14:07
Copy link
Copy Markdown
Contributor

@deusebio deusebio left a comment

Choose a reason for hiding this comment

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

The PR contains a number of sensible changes, that also trigger a few thoughts on my part.

I only have one major comment about the fact that it seems that we are not able to specify the revisions for a few charms that do not belong to the product. Also according to the spec, the product module should allow this for every charms that it bundles.

Comment thread .github/workflows/ci-checks.yaml Outdated
Comment thread terraform/charms/azure-storage-integrator/variables.tf
Comment thread terraform/products/charmed-spark-3.4/main.tf
Comment thread terraform/products/charmed-spark-3.5/outputs.tf
Comment thread terraform/products/charmed-spark-3.5/variables.tf
@Batalex Batalex marked this pull request as draft April 22, 2026 07:29
@Batalex Batalex force-pushed the cc008/spec-alignment branch from a8f261f to 8f8f912 Compare April 22, 2026 07:43
@Batalex Batalex force-pushed the cc008/spec-alignment branch from 8f8f912 to f8c20a9 Compare April 22, 2026 11:43
@Batalex Batalex marked this pull request as ready for review April 22, 2026 14:18
@Batalex Batalex requested a review from deusebio April 22, 2026 15:16
Copy link
Copy Markdown
Contributor

@deusebio deusebio left a comment

Choose a reason for hiding this comment

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

Looks really good! Great job Alex!

Copy link
Copy Markdown
Collaborator

@welpaolo welpaolo left a comment

Choose a reason for hiding this comment

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

LGTM

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cos_configuration"></a> [cos\_configuration](#input\_cos\_configuration) | n/a | <pre>object({<br/> app_name = optional(string, "cos-configuration")<br/> base = optional(string, "ubuntu@22.04")<br/> channel = optional(string, "1/stable")<br/> config = optional(map(string), {<br/> git_branch = "main"<br/> git_depth = 1<br/> git_repo = "https://github.com/canonical/spark-k8s-bundle"<br/> grafana_dashboards_path = "resources/grafana/"<br/> })<br/> constraints = optional(string, "arch=amd64")<br/> resources = optional(map(string), {})<br/> revision = optional(number)<br/> units = optional(number, 1)<br/> })</pre> | `{}` | no |
| <a name="input_cos_configuration"></a> [cos\_configuration](#input\_cos\_configuration) | n/a | <pre>object({<br/> app_name = optional(string, "cos-configuration")<br/> base = optional(string, "ubuntu@22.04")<br/> channel = optional(string, "1/stable")<br/> config = optional(map(string), {<br/> git_branch = "main"<br/> git_depth = 1<br/> git_repo = "https://github.com/canonical/spark-k8s-bundle"<br/> grafana_dashboards_path = "resources/grafana/"<br/> })<br/> constraints = optional(string, "arch=amd64")<br/> resources = optional(map(string), {})<br/> revision = optional(number, 65) # TODO<br/> units = optional(number, 1)<br/> })</pre> | `{}` | no |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It this TODO left on purpose here as well ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's automatically picked up by terraform-docs, it's quite odd indeed. Anyhow, it will go away once we settle on the design decision of where the revisions must be pinned and drop the TODO comment

@Batalex Batalex merged commit a9b32b1 into terraform-cc008 Apr 27, 2026
73 of 78 checks passed
@Batalex Batalex deleted the cc008/spec-alignment branch April 27, 2026 12:49
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.

3 participants