Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions terraform/cos-lite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is a Terraform module facilitating the deployment of the COS Lite solution,
| Name | Version |
|------|---------|
| <a name="provider_juju"></a> [juju](#provider\_juju) | ~> 1.0 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |

## Modules

Expand Down
27 changes: 27 additions & 0 deletions terraform/cos-lite/upgrades.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -------------- # Replace triggers -------------- #

# -- Grafana -- #

# [application] Removed the litestream-image resource
# Given a Juju bug, we need to trigger application replacement, otherwise the upgrade will fail
# https://github.com/juju/juju/issues/21648
# https://github.com/juju/juju/issues/22071
resource "terraform_data" "grafana_litestream_resource" {
triggers_replace = contains(keys(data.juju_charm.grafana_info.resources), "litestream-image")
}

# [integration] Ingress interface changed
# The ingress endpoint interface changes from traefik_route to ingress_per_app so we need to
# trigger integration replacement, otherwise the upgrade will fail
# https://github.com/canonical/observability-stack/issues/165
resource "terraform_data" "grafana_ingress_interface" {
triggers_replace = lookup(data.juju_charm.grafana_info.requires, "ingress", "")
}

# -------------- # CharmHub API -------------- #

data "juju_charm" "grafana_info" {
charm = "grafana-k8s"
channel = var.channel
base = "ubuntu@24.04"
Comment thread
MichaelThamm marked this conversation as resolved.
}
1 change: 1 addition & 0 deletions terraform/cos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is a Terraform module facilitating the deployment of the COS solution, usin
| Name | Version |
|------|---------|
| <a name="provider_juju"></a> [juju](#provider\_juju) | ~> 1.0 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |

## Modules

Expand Down
27 changes: 27 additions & 0 deletions terraform/cos/upgrades.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -------------- # Replace triggers -------------- #

# -- Grafana -- #

# [application] Removed the litestream-image resource
# Given a Juju bug, we need to trigger application replacement, otherwise the upgrade will fail
# https://github.com/juju/juju/issues/21648
# https://github.com/juju/juju/issues/22071
resource "terraform_data" "grafana_litestream_resource" {
triggers_replace = contains(keys(data.juju_charm.grafana_info.resources), "litestream-image")
}

# [integration] Ingress interface changed
# The ingress endpoint interface changes from traefik_route to ingress_per_app so we need to
# trigger integration replacement, otherwise the upgrade will fail
# https://github.com/canonical/observability-stack/issues/165
resource "terraform_data" "grafana_ingress_interface" {
triggers_replace = lookup(data.juju_charm.grafana_info.requires, "ingress", "")
}

# -------------- # CharmHub API -------------- #

data "juju_charm" "grafana_info" {
charm = "grafana-k8s"
channel = var.channel
base = "ubuntu@24.04"
}
Loading