#[non_exhaustive]pub struct SecretVolume {
pub mount_path: String,
pub project_id: String,
pub secret: String,
pub versions: Vec<SecretVersion>,
/* private fields */
}
Expand description
Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.mount_path: String
The path within the container to mount the secret volume. For example,
setting the mount_path as /etc/secrets
would mount the secret value files
under the /etc/secrets
directory. This directory will also be completely
shadowed and unavailable to mount any other secrets.
Recommended mount path: /etc/secrets
project_id: String
Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.
secret: String
Name of the secret in secret manager (not the full resource name).
versions: Vec<SecretVersion>
List of secret versions to mount for this secret. If empty, the latest
version of the secret will be made available in a file named after the
secret under the mount point.
Implementations§
Source§impl SecretVolume
impl SecretVolume
pub fn new() -> Self
Sourcepub fn set_mount_path<T: Into<String>>(self, v: T) -> Self
pub fn set_mount_path<T: Into<String>>(self, v: T) -> Self
Sets the value of mount_path.
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sets the value of project_id.
Sourcepub fn set_secret<T: Into<String>>(self, v: T) -> Self
pub fn set_secret<T: Into<String>>(self, v: T) -> Self
Sets the value of secret.
Sourcepub fn set_versions<T, V>(self, v: T) -> Self
pub fn set_versions<T, V>(self, v: T) -> Self
Sets the value of versions.
Trait Implementations§
Source§impl Clone for SecretVolume
impl Clone for SecretVolume
Source§fn clone(&self) -> SecretVolume
fn clone(&self) -> SecretVolume
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more