You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a custom image for an application, subsequent calls to terraform plan will always propose to upgrade the image, even though the application is already running it.
tf apply
Terraform used the selected providers to generate the following execution plan. Resource actions
are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# juju_application.history_server will be created
+ resource "juju_application""history_server" {
+ constraints = "arch=amd64"
+ id = (known after apply)
+ model = "spark"
+ name = "history-server"
+ placement = (known after apply)
+ principal = (known after apply)
+ resources = {
+ "spark-history-server-image" = "ghcr.io/canonical/charmed-spark@sha256:1d9949dc7266d814e6483f8d9ffafeff32f66bb9939e0ab29ccfd9d5003a583a"
}
+ storage = (known after apply)
+ trust = false
+ units = 1
+ charm {
+ base = (known after apply)
+ channel = "3.4/edge"
+ name = "spark-history-server-k8s"
+ revision = 37
+ series = (known after apply)
}
}
# juju_model.spark will be created
+ resource "juju_model""spark" {
+ credential = (known after apply)
+ id = (known after apply)
+ name = "spark"
+ type = (known after apply)
+ uuid = (known after apply)
}
Plan: 2 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
juju_model.spark: Creating...
juju_model.spark: Creation complete after 0s [id=4fc17aec-5851-4135-8ec3-761cebe8ec01]
juju_application.history_server: Creating...
juju_application.history_server: Creation complete after 1s [id=spark:history-server]
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
tf plan
juju_model.spark: Refreshing state... [id=4fc17aec-5851-4135-8ec3-761cebe8ec01]
juju_application.history_server: Refreshing state... [id=spark:history-server]
Terraform used the selected providers to generate the following execution plan. Resource actions
are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# juju_application.history_server will be updated in-place~ resource "juju_application""history_server" {
id = "spark:history-server"
name = "history-server"
+ principal = (known after apply)
~ resources = {
~"spark-history-server-image" = "0" ->"ghcr.io/canonical/charmed-spark@sha256:1d9949dc7266d814e6483f8d9ffafeff32f66bb9939e0ab29ccfd9d5003a583a"
}
+ storage = (known after apply)
# (5 unchanged attributes hidden)# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take
exactly these actions if you run "terraform apply" now.
The image seems correctly written in the state file, so the issue might be when the diff is computed:
terraform state show -state=terraform.tfstate juju_application.history_server
# juju_application.history_server:
resource "juju_application" "history_server" {
constraints = "arch=amd64"
id = "spark:history-server"
model = "spark"
name = "history-server"
placement = ""
resources = {
"spark-history-server-image" = "ghcr.io/canonical/charmed-spark@sha256:1d9949dc7266d814e6483f8d9ffafeff32f66bb9939e0ab29ccfd9d5003a583a"
}
trust = false
units = 1
charm {
base = "[email protected]"
channel = "3.4/edge"
name = "spark-history-server-k8s"
revision = 37
series = "jammy"
}
}
The text was updated successfully, but these errors were encountered:
Hi @Batalex, thanks for reporting the bug. I've managed to reproduce the issue locally.
Unfortunately it doesn't seem to me an easy fix, I'll discuss with my colleagues to find a solution for it.
I'll update here as soon as I have any news.
Description
When defining a custom image for an application, subsequent calls to
terraform plan
will always propose to upgrade the image, even though the application is already running it.Urgency
Casually reporting
Terraform Juju Provider version
0.15.1,0.16.0
Terraform version
1.10.5
Juju version
3.6.2
Terraform Configuration(s)
Reproduce / Test
Debug/Panic Output
The image seems correctly written in the state file, so the issue might be when the diff is computed:
The text was updated successfully, but these errors were encountered: