com.pulumi.gcp.cloudfunctions.kotlin.inputs.FunctionSecretEnvironmentVariableArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.cloudfunctions.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudfunctions.inputs.FunctionSecretEnvironmentVariableArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property key Name of the environment variable.
* @property projectId Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
* @property secret ID of the secret in secret manager (not the full resource name).
* @property version Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
*/
public data class FunctionSecretEnvironmentVariableArgs(
public val key: Output,
public val projectId: Output? = null,
public val secret: Output,
public val version: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.cloudfunctions.inputs.FunctionSecretEnvironmentVariableArgs = com.pulumi.gcp.cloudfunctions.inputs.FunctionSecretEnvironmentVariableArgs.builder()
.key(key.applyValue({ args0 -> args0 }))
.projectId(projectId?.applyValue({ args0 -> args0 }))
.secret(secret.applyValue({ args0 -> args0 }))
.version(version.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [FunctionSecretEnvironmentVariableArgs].
*/
@PulumiTagMarker
public class FunctionSecretEnvironmentVariableArgsBuilder internal constructor() {
private var key: Output? = null
private var projectId: Output? = null
private var secret: Output? = null
private var version: Output? = null
/**
* @param value Name of the environment variable.
*/
@JvmName("rvuohpkcqlyjnjvo")
public suspend fun key(`value`: Output) {
this.key = value
}
/**
* @param value Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
*/
@JvmName("nwniwxnvfvxsrnbq")
public suspend fun projectId(`value`: Output) {
this.projectId = value
}
/**
* @param value ID of the secret in secret manager (not the full resource name).
*/
@JvmName("psfaxwrqlqefrmvo")
public suspend fun secret(`value`: Output) {
this.secret = value
}
/**
* @param value Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
*/
@JvmName("picmmudiogupcttr")
public suspend fun version(`value`: Output) {
this.version = value
}
/**
* @param value Name of the environment variable.
*/
@JvmName("hlrlcltkuytdklxg")
public suspend fun key(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.key = mapped
}
/**
* @param value Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
*/
@JvmName("rkefcuyyyvpoemrf")
public suspend fun projectId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.projectId = mapped
}
/**
* @param value ID of the secret in secret manager (not the full resource name).
*/
@JvmName("qvfvvnuhysbrrqlm")
public suspend fun secret(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.secret = mapped
}
/**
* @param value Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
*/
@JvmName("hvlsrgcmirxicnlw")
public suspend fun version(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.version = mapped
}
internal fun build(): FunctionSecretEnvironmentVariableArgs =
FunctionSecretEnvironmentVariableArgs(
key = key ?: throw PulumiNullFieldException("key"),
projectId = projectId,
secret = secret ?: throw PulumiNullFieldException("secret"),
version = version ?: throw PulumiNullFieldException("version"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy