Here is a model with offers for cross model relations.
Exporting the bundle results in remote-hash references that are not directly deployable.
This breaks the ability to quickly export-bundle and redeploy the bundle with an overlay or to easily redeploy a failed node.
--
juju export-bundle
series: focal
saas:
remote-17339a12214341b98de08e15707402d7: {}
applications:
prometheus:
charm: cs:prometheus2
channel: stable
revision: 25
resources:
core: 0
prometheus: 0
num_units: 1
to:
- "0"
machines:
"0":
constraints: tags=hyper-compute spaces=oam-space
relations:
- - prometheus:target
- remote-17339a12214341b98de08e15707402d7:kube-api-endpoint
- - prometheus:manual-jobs
- remote-17339a12214341b98de08e15707402d7:prometheus
--- # overlay.yaml
applications:
prometheus:
offers:
prometheus-jobs:
endpoints:
- manual-jobs
acl:
admin: admin
prometheus-target:
endpoints:
- target
acl:
admin: admin
Attempting to directly deploy this bundle without hand editting results in deploy failing.
juju deploy ./bundle.yaml
Located charm "prometheus2" in charm-store, revision 25
Executing changes:
consume offer remote-d5344dbccd4145b28f815963700038ec at
ERROR cannot deploy bundle: application offer URL is missing model
This is occurring on the offering model because juju creates (hidden) placeholders for the consuming apps that are related. Exporting and redeploying should ignore these, since they will be recreated as needed when the client side connects. Redeploying over the top of the same model *should* be ok as well, but would need some validation to ensure all corner cases are covered.