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

juju_integration fails with Client Error #562

Open
sed-i opened this issue Sep 3, 2024 · 0 comments
Open

juju_integration fails with Client Error #562

sed-i opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
area/integration kind/bug indicates a bug in the project priority/normal normal priority

Comments

@sed-i
Copy link

sed-i commented Sep 3, 2024

Description

After tofu apply-ing the following main.tf, both apps are deployed fine, but the integration is missing.

OpenTofu errors out with:

│ Error: Client Error
│ 
│   with juju_model.mimir,
│   on main.tf line 3, in resource "juju_model" "mimir":
│    3: resource "juju_model" "mimir" {
│ 
│ Unable to create model, got error: failed to open kubernetes client: annotations
│ map[controller.juju.is/id:42cd3f3c-17be-4786-811a-527bc80d653b
│ model.juju.is/id:5774314d-07cc-4cf9-841d-31c2c9bbb722] for namespace "mimir2" not valid must
│ include map[controller.juju.is/id:42cd3f3c-17be-4786-811a-527bc80d653b
│ model.juju.is/id:3fc1ee22-0502-4aca-8aaa-3fc3acdfc02c] (not valid)

Following up with a manual juju relate worker1 coord1 works fine.

Urgency

Casually reporting

Terraform Juju Provider version

0.13.0

Terraform version

OpenTofu v1.8.1

Juju version

3.5.3
Microk8s v1.29.8

Terraform Configuration(s)

provider "juju" {}

resource "juju_model" "mimir" {
  name = "mimir2"

  cloud {
    name   = "microk8s"
  }
}

resource "juju_application" "worker1" {
  name  = "worker1"
  model = "mimir2"
  trust = true

  charm {
    name    = "mimir-worker-k8s"
    channel = "latest/edge"
  }
  units = 3
}

resource "juju_application" "coord1" {
  name  = "coord1"
  model = "mimir2"
  trust = true

  charm {
    name    = "mimir-coordinator-k8s"
    channel = "latest/edge"
  }
  units = 1
}

resource "juju_integration" "worker_to_coordinator" {
  model = juju_model.mimir.name

  application {
    name     = juju_application.coord1.name
    endpoint = "mimir-cluster"
  }

  application {
    name     = juju_application.worker1.name
    endpoint = "mimir-cluster"
  }
}

Reproduce / Test

tofu init && tofu plan && tofu apply

Debug/Panic Output

No response

Notes & References

Getting the same error with Terraform v1.9.5.

@Aflynn50 Aflynn50 added area/integration kind/bug indicates a bug in the project labels Sep 5, 2024
@jack-w-shaw jack-w-shaw self-assigned this Sep 5, 2024
@Aflynn50 Aflynn50 added the priority/normal normal priority label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/integration kind/bug indicates a bug in the project priority/normal normal priority
Projects
None yet
Development

No branches or pull requests

3 participants