Skip to content

Support for loading file resources by filename #867

Description

@lucistanescu

Requirements

Referencing Matrix conversation: https://matrix.to/#/!xzmWHtGpPfVCXKivIh:ubuntu.com/$Pcyf0Dv5amrKGRLYbUagW1ObipX-CFfOcjhLj1jnUQ4?via=ubuntu.com&via=matrix.org&via=canonical.com

Juju supports specifying a file resource by filename: `juju deploy --resource foo=./bar.moo my-charm`. This seemed appropriate for passing a rather large file to a charm, instead of using configuration options.

However, the juju terraform provider does not support that, requiring a revision to be specified. Is it possible to add support for specifying a file resource by filename?

On the other hand, having the contents of the file as part of the terraform state is useful, as the remote state would be updated whenever the file contents change.

Urgency

It would save from a weird workaround

Notes & References

I've also found the following PR: #493. @hmlanigan mentioned that:

We will only be allowing revision number and oci-image information be used. We will not support custom files to be uploaded.

and

It also muddies the water around uploading file resources which we do not intend to support.

This suggests that this functionality may not be intended. Is that indeed the case? What is the right approach for the problem I had described previously (passing a rather large configuration file to the charm from the terraform plan).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featuresuggests new feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions