Hook command 'secret-grant'

The information in this doc is based on Juju version 3.5.6, and may not accurately reflect other versions of Juju.

Summary

Grant access to a secret.

Usage

secret-grant [options] <ID>

Options

Flag Default Usage
-r, --relation the relation with which to associate the grant
--unit the unit to grant access

Details

Grant access to view the value of a specified secret. Access is granted in the context of a relation - unless revoked earlier, once the relation is removed, so too is the access grant.

By default, all units of the related application are granted access. Optionally specify a unit name to limit access to just that unit.

Examples:

secret-grant secret:9m4e2mr0ui3e8a215n4g -r 0 --unit mediawiki/6
secret-grant secret:9m4e2mr0ui3e8a215n4g --relation db:2