Open kian99 opened 7 months ago
@kian99 thanks for opening this, can you please give a reproducer with a minimal plan required to reproduce the issue? Thanks!
@kian99 have you tried making the offer from a different controller a data source in your plan? As well, the offer should be represented in the juju_integration as "offer_url" not an "application".
For example:
data "juju_offer" "a" {
url = "admin/modela.myconsumedapplication"
}
resource "juju_integration" "my-app_consumed-app" {
model = var.juju_model_name
application {
name = juju_application.my-app.name
}
application {
offer_url = data.juju_offer.a.url
}
}
Description
The Juju TF provider currently doesn't support cross-controller relations because it can only speak to 1 controller at a given time. To workaround this issue it was hoped to manually run a
juju consume <offer-url> <application-name>
and then perform an integration in the provider between an application and the consumed offer. The consumed offer becomes a SAAS in the Juju model which we can then try and relate to.The above fails with error details described below. Using the Juju CLI it is possible to relate a local application to a SAAS offer.
Urgency
Casually reporting
Terraform Juju Provider version
0.10.1
Terraform version
v1.7.5
Terraform Configuration(s)
Reproduce / Test
Debug/Panic Output
Notes & References
I believe the issue comes about because of this line in
CreateIntegration
which waits for the desired applications to become available which underneath calls client.ApplicationsInfo. Because the consumed application is a SAAS, I believe it is never returned in the call toclient.ApplicationsInfo
and that is why we get the error "the applications were not available to be integrated".I'm not sure what the best resolution is for this but some ideas I've thought up are: