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

com.pulumi.gcp.cloudbuild.kotlin.inputs.TriggerBuildSecretArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudbuild.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSecretArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property kmsKeyName Cloud KMS key name to use to decrypt these envs.
 * @property secretEnv Map of environment variable name to its encrypted value.
 * Secret environment variables must be unique across all of a build's secrets,
 * and must be used by at least one build step. Values can be at most 64 KB in size.
 * There can be at most 100 secret values across all of a build's secrets.
 */
public data class TriggerBuildSecretArgs(
    public val kmsKeyName: Output,
    public val secretEnv: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSecretArgs =
        com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSecretArgs.builder()
            .kmsKeyName(kmsKeyName.applyValue({ args0 -> args0 }))
            .secretEnv(
                secretEnv?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [TriggerBuildSecretArgs].
 */
@PulumiTagMarker
public class TriggerBuildSecretArgsBuilder internal constructor() {
    private var kmsKeyName: Output? = null

    private var secretEnv: Output>? = null

    /**
     * @param value Cloud KMS key name to use to decrypt these envs.
     */
    @JvmName("dvmsypxakysvdeso")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value Map of environment variable name to its encrypted value.
     * Secret environment variables must be unique across all of a build's secrets,
     * and must be used by at least one build step. Values can be at most 64 KB in size.
     * There can be at most 100 secret values across all of a build's secrets.
     */
    @JvmName("xupwefghtlplatul")
    public suspend fun secretEnv(`value`: Output>) {
        this.secretEnv = value
    }

    /**
     * @param value Cloud KMS key name to use to decrypt these envs.
     */
    @JvmName("sefivpgfvjywaogw")
    public suspend fun kmsKeyName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    /**
     * @param value Map of environment variable name to its encrypted value.
     * Secret environment variables must be unique across all of a build's secrets,
     * and must be used by at least one build step. Values can be at most 64 KB in size.
     * There can be at most 100 secret values across all of a build's secrets.
     */
    @JvmName("nwkfymmpwttntlns")
    public suspend fun secretEnv(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretEnv = mapped
    }

    /**
     * @param values Map of environment variable name to its encrypted value.
     * Secret environment variables must be unique across all of a build's secrets,
     * and must be used by at least one build step. Values can be at most 64 KB in size.
     * There can be at most 100 secret values across all of a build's secrets.
     */
    @JvmName("mtrksfnwpqrebjlx")
    public fun secretEnv(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretEnv = mapped
    }

    internal fun build(): TriggerBuildSecretArgs = TriggerBuildSecretArgs(
        kmsKeyName = kmsKeyName ?: throw PulumiNullFieldException("kmsKeyName"),
        secretEnv = secretEnv,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy