Lucky Get-Resource
Get the path to a Juju resource.
Usage
get-resource [FLAGS] [resource_name]
Positionals
Arg | Environment Variable | Description |
---|---|---|
<resource_name> | The name of the resource to get as defined in the metadata.yaml file |
Usage
This command is the direct equivalent to Juju's resource-get
command. Refer to that documentation for more information on how Juju resources work.
This command will exit non-zero if the resource has not been uploaded yet.
Example
Make sure a resource exists before getting the path to it:
if ! lucky get-resource resource-name; then
lucky set-status blocked "Need resource-name to be uploaded"
else
path_to_resource=$(lucky get-resource resource-name)
fi