Improve support for external files in the bundle

Bug #1964616 reported by Heitor
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

It would be very handy to have charms configuration options as a separate file from the bundle file.

Juju supports a `include-file` directive, but it is limited to reading the contents as a string with a `\n` at the end, with errors when a charm expect an int for example:

```
$ cat bundle.yaml
applications:
  grafana:
    charm: grafana
    options:
      port: include-file://config

$ cat config
1234

$ juju deploy --verbose ./bundle.yaml
Executing changes:
- upload charm grafana from charm-hub with architecture=amd64
- set application options for grafana
  setting options:
    port: "1234\n"
Deploy of bundle completed.
```

Grafana errors out.

Another limitation is that this is not possible:
```
$ cat bundle.yaml
applications:
  grafana:
    charm: grafana
    options: include-file://config

$ cat config
port: 1234
anonymous: true

$ juju deploy ./bundle.yaml
ERROR cannot deploy bundle: cannot unmarshal bundle contents: unmarshal document 0: yaml: unmarshal errors:
  line 3: cannot unmarshal !!str `include...` into map[string]interface {}
```

Initial discussion on:
https://discourse.charmhub.io/t/how-to-manage-a-charm-bundle/1058/12

Tags: bundles
summary: - add support for external files in the bundle
+ Improve support for external files in the bundle
Ian Booth (wallyworld)
Changed in juju:
importance: Undecided → Wishlist
status: New → Triaged
milestone: none → 2.9.28
Changed in juju:
milestone: 2.9.28 → 2.9.29
Revision history for this message
Ian Booth (wallyworld) wrote :

We don't plan on working on this in the next milestone so will remove from the milestone for now.

Changed in juju:
milestone: 2.9.29 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.