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

com.pulumi.gcp.cloudrun.kotlin.inputs.ServiceTemplateSpecVolumeSecretArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudrun.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecVolumeSecretArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property defaultMode Mode bits to use on created files by default. Must be a value between 0000
 * and 0777. Defaults to 0644. Directories within the path are not affected by
 * this setting. This might be in conflict with other options that affect the
 * file mode, like fsGroup, and the result can be other mode bits set.
 * @property items If unspecified, the volume will expose a file whose name is the
 * secret_name.
 * If specified, the key will be used as the version to fetch from Cloud
 * Secret Manager and the path will be the name of the file exposed in the
 * volume. When items are defined, they must specify a key and a path.
 * Structure is documented below.
 * @property secretName The name of the secret in Cloud Secret Manager. By default, the secret
 * is assumed to be in the same project.
 * If the secret is in another project, you must define an alias.
 * An alias definition has the form:
 * {alias}:projects/{project-id|project-number}/secrets/{secret-name}.
 * If multiple alias definitions are needed, they must be separated by
 * commas.
 * The alias definitions must be set on the run.googleapis.com/secrets
 * annotation.
 */
public data class ServiceTemplateSpecVolumeSecretArgs(
    public val defaultMode: Output? = null,
    public val items: Output>? = null,
    public val secretName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecVolumeSecretArgs =
        com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecVolumeSecretArgs.builder()
            .defaultMode(defaultMode?.applyValue({ args0 -> args0 }))
            .items(items?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .secretName(secretName.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceTemplateSpecVolumeSecretArgs].
 */
@PulumiTagMarker
public class ServiceTemplateSpecVolumeSecretArgsBuilder internal constructor() {
    private var defaultMode: Output? = null

    private var items: Output>? = null

    private var secretName: Output? = null

    /**
     * @param value Mode bits to use on created files by default. Must be a value between 0000
     * and 0777. Defaults to 0644. Directories within the path are not affected by
     * this setting. This might be in conflict with other options that affect the
     * file mode, like fsGroup, and the result can be other mode bits set.
     */
    @JvmName("syuwagbnkahsflwa")
    public suspend fun defaultMode(`value`: Output) {
        this.defaultMode = value
    }

    /**
     * @param value If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("xvhixbeihmucbdfw")
    public suspend fun items(`value`: Output>) {
        this.items = value
    }

    @JvmName("kogcpqcsycehaihg")
    public suspend fun items(vararg values: Output) {
        this.items = Output.all(values.asList())
    }

    /**
     * @param values If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("pmsffckhiidymirv")
    public suspend fun items(values: List>) {
        this.items = Output.all(values)
    }

    /**
     * @param value The name of the secret in Cloud Secret Manager. By default, the secret
     * is assumed to be in the same project.
     * If the secret is in another project, you must define an alias.
     * An alias definition has the form:
     * {alias}:projects/{project-id|project-number}/secrets/{secret-name}.
     * If multiple alias definitions are needed, they must be separated by
     * commas.
     * The alias definitions must be set on the run.googleapis.com/secrets
     * annotation.
     */
    @JvmName("lqfhmlesmhgoyaop")
    public suspend fun secretName(`value`: Output) {
        this.secretName = value
    }

    /**
     * @param value Mode bits to use on created files by default. Must be a value between 0000
     * and 0777. Defaults to 0644. Directories within the path are not affected by
     * this setting. This might be in conflict with other options that affect the
     * file mode, like fsGroup, and the result can be other mode bits set.
     */
    @JvmName("iteompaftdivyohc")
    public suspend fun defaultMode(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultMode = mapped
    }

    /**
     * @param value If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("wqbhydpomqcpjmfa")
    public suspend fun items(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.items = mapped
    }

    /**
     * @param argument If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("hnebkwxoflxoxnen")
    public suspend fun items(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecVolumeSecretItemArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param argument If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("hpdlqufmrdnugtjk")
    public suspend fun items(vararg argument: suspend ServiceTemplateSpecVolumeSecretItemArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecVolumeSecretItemArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param argument If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("silwchnbexfdhswq")
    public suspend fun items(argument: suspend ServiceTemplateSpecVolumeSecretItemArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecVolumeSecretItemArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param values If unspecified, the volume will expose a file whose name is the
     * secret_name.
     * If specified, the key will be used as the version to fetch from Cloud
     * Secret Manager and the path will be the name of the file exposed in the
     * volume. When items are defined, they must specify a key and a path.
     * Structure is documented below.
     */
    @JvmName("jpyannpnvunetlvf")
    public suspend fun items(vararg values: ServiceTemplateSpecVolumeSecretItemArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.items = mapped
    }

    /**
     * @param value The name of the secret in Cloud Secret Manager. By default, the secret
     * is assumed to be in the same project.
     * If the secret is in another project, you must define an alias.
     * An alias definition has the form:
     * {alias}:projects/{project-id|project-number}/secrets/{secret-name}.
     * If multiple alias definitions are needed, they must be separated by
     * commas.
     * The alias definitions must be set on the run.googleapis.com/secrets
     * annotation.
     */
    @JvmName("ydoigchmowifuwgx")
    public suspend fun secretName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretName = mapped
    }

    internal fun build(): ServiceTemplateSpecVolumeSecretArgs = ServiceTemplateSpecVolumeSecretArgs(
        defaultMode = defaultMode,
        items = items,
        secretName = secretName ?: throw PulumiNullFieldException("secretName"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy