Skip to content
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

Changing charm base should be replace? #635

Open
hloeung opened this issue Nov 25, 2024 · 0 comments
Open

Changing charm base should be replace? #635

hloeung opened this issue Nov 25, 2024 · 0 comments
Labels
kind/bug indicates a bug in the project state/untriaged untriaged bug report

Comments

@hloeung
Copy link

hloeung commented Nov 25, 2024

Description

When the charm base is changed, it triggers a change which then applies successfully, but isn't actually changed and causes a loop in our Flux CI/CD system constantly trying to apply this change.

| 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:
|
|   # module.canonical_k8s.juju_application.k8s_control will be updated in-place
|   ~ resource "juju_application" "k8s_control" {
|         id          = "stg-mcarvalhor-1:k8s-control"
|         name        = "k8s-control"
|       + principal   = (known after apply)
|       + storage     = (known after apply)
|         # (6 unchanged attributes hidden)
|
|       ~ charm {
|           ~ base     = "[email protected]" -> "[email protected]"
|             name     = "k8s"
|             # (3 unchanged attributes hidden)
|         }
|
|         # (1 unchanged block hidden)
|     }
|
|   # module.canonical_k8s.juju_application.k8s_worker will be updated in-place
|   ~ resource "juju_application" "k8s_worker" {
|         id          = "stg-mcarvalhor-1:k8s-worker"
|         name        = "k8s-worker"
|       + principal   = (known after apply)
|       + storage     = (known after apply)
|         # (6 unchanged attributes hidden)
|
|       ~ charm {
|           ~ base     = "[email protected]" -> "[email protected]"
|             name     = "k8s-worker"
|             # (3 unchanged attributes hidden)
|         }
|     }
|
| Plan: 0 to add, 2 to change, 0 to destroy.

Changing a charm's base should perhaps trigger a replacement instead?

Urgency

Casually reporting

Terraform Juju Provider version

0.15.0

Terraform version

v1.9.8-dev

Juju version

3.5.4

Terraform Configuration(s)

resource "juju_application" "ntp" {
  name  = "ntp"
  model = local.juju_model_name

  charm {
    name     = "chrony"
    channel  = "latest/edge"
    revision = 35
    base     = "[email protected]"
  }

  expose {}
}

Reproduce / Test

terraform init
terraform apply
(update charm bases from `[email protected]` to `[email protected]`)
terraform apply

Debug/Panic Output

No response

Notes & References

No response

@hloeung hloeung added kind/bug indicates a bug in the project state/untriaged untriaged bug report labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug indicates a bug in the project state/untriaged untriaged bug report
Projects
None yet
Development

No branches or pull requests

1 participant