Skip to content

Consuming same offer from multiple applications doesn't work on first apply #1308

Description

@dariofaccin

Description

We have a scenario in which we are creating a model A and creating an offer a.
We create a second model B and consume offer a to integrate in multiple applications app-1, app-2, app-3.
We expect the integrations to be present after the apply, but it randomly misses some of them.
From terraform state list they are present:

module.iam.module.iam_bundle.juju_integration.login_ui_public_route

And from terraform state show:

terraform state show module.iam.module.iam_bundle.juju_integration.hydra_public_route
# module.iam.module.iam_bundle.juju_integration.hydra_public_route:
resource "juju_integration" "hydra_public_route" {
    id         = "faeb9997-0df1-40d5-8bfd-e653de253b65:traefik-route:traefik-route:hydra:public-route"
    model_uuid = "faeb9997-0df1-40d5-8bfd-e653de253b65"

    application {
        endpoint = "public-route"
        name     = "hydra"
    }
    application {
        endpoint  = "traefik-route"
        offer_url = "admin/iam-core.traefik-route"
    }
}

It is not however showing up in juju status --relations.
If we try a second terraform apply, it recognizes they are missing and correctly consume it.

Urgency

Blocker for our release

Terraform Juju Provider version

1.5.6

Terraform version

v1.15.8

Juju version

3.6.25-genericlinux-amd64

Terraform Configuration(s)

As discussed in chat, we provide the link: https://github.com/canonical/charmed-kubeflow-solutions/tree/feat/iam-integration/terraform-refactoring/tests/kubeflow-ambient-iam

Reproduce / Test

terraform apply

Debug/Panic Output

Notes & References

Since the resource requirements are high, we can provide access to an AWS machine where the machine is deployed

Metadata

Metadata

Assignees

Labels

kind/bugindicates a bug in the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions