juju / terraform-provider-juju

A Terraform provider for Juju
Apache License 2.0
19 stars 32 forks source link

Terraform fails to find charm revision when upgrading #477

Closed arturo-seijas closed 1 month ago

arturo-seijas commented 1 month ago

Description

Terraform in unable to find a charm revision

module.saml-integrator.juju_application.saml_integrator: Modifying... [id=stg-saml-integrator-k8s-ps6:saml-integrator]
╷
│ Error: Client Error
│ 
│   with module.saml-integrator.juju_application.saml_integrator,
│   on ../../modules/saml-integrator/main.tf line 31, in resource "juju_application" "saml_integrator":
│   31: resource "juju_application" "saml_integrator" {
│ 
│ Unable to update application resource, got error: charm "ch:amd64/jammy/saml-integrator-48" not found (not found)

Urgency

Blocker for our release

Terraform Juju Provider version

0.10.1

Terraform version

v1.7.2-dev

Terraform Configuration(s)

No response

Reproduce / Test

On a model "testing" running the saml-integrator charm with revision 28, terraform apply

resource "juju_application" "saml_integrator" {
  name  = "saml-integrator"
  model = "testing"

  charm {
    name     = "saml-integrator"
    channel  = "latest/edge"
    revision = 48
  }

  config = {
    entity_id    = **REDACTED**
    fingerprint  = **REDACTED**
    metadata_url = **REDACTED**
  }

  units = 1
}

### Debug/Panic Output

```shell
module.saml-integrator.juju_application.saml_integrator: Modifying... [id=stg-saml-integrator-k8s-ps6:saml-integrator]
╷
│ Error: Client Error
│ 
│   with module.saml-integrator.juju_application.saml_integrator,
│   on ../../modules/saml-integrator/main.tf line 31, in resource "juju_application" "saml_integrator":
│   31: resource "juju_application" "saml_integrator" {
│ 
│ Unable to update application resource, got error: charm "ch:amd64/jammy/saml-integrator-48" not found (not found)


### Notes & References

https://matrix.to/#/!tGlkJIgTBsNijRGgvq:ubuntu.com/$p0f-R2RqTvTQRmNQfJId1QpD0dr_ZgImbwQovdzgeiU?via=ubuntu.com&via=matrix.org
hmlanigan commented 1 month ago

@arturo-seijas which version of juju is the controller running? Have you tried the new 0.12.0 release?

arturo-seijas commented 1 month ago

@arturo-seijas which version of juju is the controller running? Have you tried the new 0.12.0 release?

Works with 0.12.0. So I think we can close this issue