All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.googlenative.cloudfunctions.v2beta.inputs.SecretVolumeArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.googlenative.cloudfunctions.v2beta.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.googlenative.cloudfunctions.v2beta.inputs.SecretVersionArgs;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * 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.
 * 
 */
public final class SecretVolumeArgs extends com.pulumi.resources.ResourceArgs {

    public static final SecretVolumeArgs Empty = new SecretVolumeArgs();

    /**
     * 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
     * 
     */
    @Import(name="mountPath")
    private @Nullable Output mountPath;

    /**
     * @return 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
     * 
     */
    public Optional> mountPath() {
        return Optional.ofNullable(this.mountPath);
    }

    /**
     * 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.
     * 
     */
    @Import(name="project")
    private @Nullable Output project;

    /**
     * @return 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.
     * 
     */
    public Optional> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * Name of the secret in secret manager (not the full resource name).
     * 
     */
    @Import(name="secret")
    private @Nullable Output secret;

    /**
     * @return Name of the secret in secret manager (not the full resource name).
     * 
     */
    public Optional> secret() {
        return Optional.ofNullable(this.secret);
    }

    /**
     * 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.
     * 
     */
    @Import(name="versions")
    private @Nullable Output> versions;

    /**
     * @return 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.
     * 
     */
    public Optional>> versions() {
        return Optional.ofNullable(this.versions);
    }

    private SecretVolumeArgs() {}

    private SecretVolumeArgs(SecretVolumeArgs $) {
        this.mountPath = $.mountPath;
        this.project = $.project;
        this.secret = $.secret;
        this.versions = $.versions;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SecretVolumeArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SecretVolumeArgs $;

        public Builder() {
            $ = new SecretVolumeArgs();
        }

        public Builder(SecretVolumeArgs defaults) {
            $ = new SecretVolumeArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param mountPath 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
         * 
         * @return builder
         * 
         */
        public Builder mountPath(@Nullable Output mountPath) {
            $.mountPath = mountPath;
            return this;
        }

        /**
         * @param mountPath 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
         * 
         * @return builder
         * 
         */
        public Builder mountPath(String mountPath) {
            return mountPath(Output.of(mountPath));
        }

        /**
         * @param project 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.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output project) {
            $.project = project;
            return this;
        }

        /**
         * @param project 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.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param secret Name of the secret in secret manager (not the full resource name).
         * 
         * @return builder
         * 
         */
        public Builder secret(@Nullable Output secret) {
            $.secret = secret;
            return this;
        }

        /**
         * @param secret Name of the secret in secret manager (not the full resource name).
         * 
         * @return builder
         * 
         */
        public Builder secret(String secret) {
            return secret(Output.of(secret));
        }

        /**
         * @param versions 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.
         * 
         * @return builder
         * 
         */
        public Builder versions(@Nullable Output> versions) {
            $.versions = versions;
            return this;
        }

        /**
         * @param versions 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.
         * 
         * @return builder
         * 
         */
        public Builder versions(List versions) {
            return versions(Output.of(versions));
        }

        /**
         * @param versions 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.
         * 
         * @return builder
         * 
         */
        public Builder versions(SecretVersionArgs... versions) {
            return versions(List.of(versions));
        }

        public SecretVolumeArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy