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

com.pulumi.awsnative.eks.kotlin.ClusterArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.eks.kotlin

import com.pulumi.awsnative.eks.ClusterArgs.builder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterAccessConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterAccessConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterEncryptionConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterEncryptionConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterKubernetesNetworkConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterKubernetesNetworkConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterOutpostConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterOutpostConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterResourcesVpcConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterResourcesVpcConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterUpgradePolicyArgs
import com.pulumi.awsnative.eks.kotlin.inputs.ClusterUpgradePolicyArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.LoggingArgs
import com.pulumi.awsnative.eks.kotlin.inputs.LoggingArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * An object representing an Amazon EKS cluster.
 * @property accessConfig The access configuration for the cluster.
 * @property bootstrapSelfManagedAddons Set this value to false to avoid creating the default networking addons when the cluster is created.
 * @property encryptionConfig The encryption configuration for the cluster.
 * @property kubernetesNetworkConfig The Kubernetes network configuration for the cluster.
 * @property logging The logging configuration for your cluster.
 * @property name The unique name to give to your cluster.
 * @property outpostConfig An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost. This object isn't available for clusters on the AWS cloud.
 * @property resourcesVpcConfig The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Considerations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the *Amazon EKS User Guide* . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.
 * @property roleArn The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
 * @property tags An array of key-value pairs to apply to this resource.
 * @property upgradePolicy
 * @property version The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used.
 */
public data class ClusterArgs(
    public val accessConfig: Output? = null,
    public val bootstrapSelfManagedAddons: Output? = null,
    public val encryptionConfig: Output>? = null,
    public val kubernetesNetworkConfig: Output? = null,
    public val logging: Output? = null,
    public val name: Output? = null,
    public val outpostConfig: Output? = null,
    public val resourcesVpcConfig: Output? = null,
    public val roleArn: Output? = null,
    public val tags: Output>? = null,
    public val upgradePolicy: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.eks.ClusterArgs =
        com.pulumi.awsnative.eks.ClusterArgs.builder()
            .accessConfig(accessConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bootstrapSelfManagedAddons(bootstrapSelfManagedAddons?.applyValue({ args0 -> args0 }))
            .encryptionConfig(
                encryptionConfig?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .kubernetesNetworkConfig(
                kubernetesNetworkConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .logging(logging?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .outpostConfig(outpostConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourcesVpcConfig(
                resourcesVpcConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .upgradePolicy(upgradePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterArgs].
 */
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
    private var accessConfig: Output? = null

    private var bootstrapSelfManagedAddons: Output? = null

    private var encryptionConfig: Output>? = null

    private var kubernetesNetworkConfig: Output? = null

    private var logging: Output? = null

    private var name: Output? = null

    private var outpostConfig: Output? = null

    private var resourcesVpcConfig: Output? = null

    private var roleArn: Output? = null

    private var tags: Output>? = null

    private var upgradePolicy: Output? = null

    private var version: Output? = null

    /**
     * @param value The access configuration for the cluster.
     */
    @JvmName("gxsjvcfkkaqdhfwd")
    public suspend fun accessConfig(`value`: Output) {
        this.accessConfig = value
    }

    /**
     * @param value Set this value to false to avoid creating the default networking addons when the cluster is created.
     */
    @JvmName("fhlevjevbnptyeti")
    public suspend fun bootstrapSelfManagedAddons(`value`: Output) {
        this.bootstrapSelfManagedAddons = value
    }

    /**
     * @param value The encryption configuration for the cluster.
     */
    @JvmName("vfweliwmxdcojqyi")
    public suspend fun encryptionConfig(`value`: Output>) {
        this.encryptionConfig = value
    }

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

    /**
     * @param values The encryption configuration for the cluster.
     */
    @JvmName("ootmxppojeqpepjn")
    public suspend fun encryptionConfig(values: List>) {
        this.encryptionConfig = Output.all(values)
    }

    /**
     * @param value The Kubernetes network configuration for the cluster.
     */
    @JvmName("ocbohyaeqiynggde")
    public suspend fun kubernetesNetworkConfig(`value`: Output) {
        this.kubernetesNetworkConfig = value
    }

    /**
     * @param value The logging configuration for your cluster.
     */
    @JvmName("hgkvvykupxsojynf")
    public suspend fun logging(`value`: Output) {
        this.logging = value
    }

    /**
     * @param value The unique name to give to your cluster.
     */
    @JvmName("jcgvvksxybsqkykp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost. This object isn't available for clusters on the AWS cloud.
     */
    @JvmName("kbfmkuqmiayvmviy")
    public suspend fun outpostConfig(`value`: Output) {
        this.outpostConfig = value
    }

    /**
     * @param value The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Considerations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the *Amazon EKS User Guide* . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.
     */
    @JvmName("pdcpucnfhoamndrl")
    public suspend fun resourcesVpcConfig(`value`: Output) {
        this.resourcesVpcConfig = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
     */
    @JvmName("kbsuclkjnnmigoob")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("ssmudvbsdoxqxojd")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("tbnemmpgnmdofedl")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("ruwdlvbtqnaehrhv")
    public suspend fun upgradePolicy(`value`: Output) {
        this.upgradePolicy = value
    }

    /**
     * @param value The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used.
     */
    @JvmName("jykvrqbakfpotjka")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value The access configuration for the cluster.
     */
    @JvmName("gksyesafknlutini")
    public suspend fun accessConfig(`value`: ClusterAccessConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessConfig = mapped
    }

    /**
     * @param argument The access configuration for the cluster.
     */
    @JvmName("ksgfcepolflfcnth")
    public suspend fun accessConfig(argument: suspend ClusterAccessConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterAccessConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.accessConfig = mapped
    }

    /**
     * @param value Set this value to false to avoid creating the default networking addons when the cluster is created.
     */
    @JvmName("cvqjagwvxtujcoyy")
    public suspend fun bootstrapSelfManagedAddons(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bootstrapSelfManagedAddons = mapped
    }

    /**
     * @param value The encryption configuration for the cluster.
     */
    @JvmName("xnsmbeuibmuismrv")
    public suspend fun encryptionConfig(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionConfig = mapped
    }

    /**
     * @param argument The encryption configuration for the cluster.
     */
    @JvmName("xvngarwhxbuvdned")
    public suspend fun encryptionConfig(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterEncryptionConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.encryptionConfig = mapped
    }

    /**
     * @param argument The encryption configuration for the cluster.
     */
    @JvmName("kdkvjjvbussxajbr")
    public suspend fun encryptionConfig(vararg argument: suspend ClusterEncryptionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterEncryptionConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.encryptionConfig = mapped
    }

    /**
     * @param argument The encryption configuration for the cluster.
     */
    @JvmName("yyfdrnovxsqrqpwe")
    public suspend fun encryptionConfig(argument: suspend ClusterEncryptionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterEncryptionConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.encryptionConfig = mapped
    }

    /**
     * @param values The encryption configuration for the cluster.
     */
    @JvmName("gkwkpadcmatpvacv")
    public suspend fun encryptionConfig(vararg values: ClusterEncryptionConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryptionConfig = mapped
    }

    /**
     * @param value The Kubernetes network configuration for the cluster.
     */
    @JvmName("trduyncjppqmuhqu")
    public suspend fun kubernetesNetworkConfig(`value`: ClusterKubernetesNetworkConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kubernetesNetworkConfig = mapped
    }

    /**
     * @param argument The Kubernetes network configuration for the cluster.
     */
    @JvmName("kffsjillvvnvcido")
    public suspend fun kubernetesNetworkConfig(argument: suspend ClusterKubernetesNetworkConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterKubernetesNetworkConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.kubernetesNetworkConfig = mapped
    }

    /**
     * @param value The logging configuration for your cluster.
     */
    @JvmName("jggcccsohgbyucav")
    public suspend fun logging(`value`: LoggingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logging = mapped
    }

    /**
     * @param argument The logging configuration for your cluster.
     */
    @JvmName("nuodrdpyrrqreimu")
    public suspend fun logging(argument: suspend LoggingArgsBuilder.() -> Unit) {
        val toBeMapped = LoggingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.logging = mapped
    }

    /**
     * @param value The unique name to give to your cluster.
     */
    @JvmName("mupfuwxongmltnuy")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost. This object isn't available for clusters on the AWS cloud.
     */
    @JvmName("aughkdxuvaayjktx")
    public suspend fun outpostConfig(`value`: ClusterOutpostConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outpostConfig = mapped
    }

    /**
     * @param argument An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost. This object isn't available for clusters on the AWS cloud.
     */
    @JvmName("phgthmuoxlffkckp")
    public suspend fun outpostConfig(argument: suspend ClusterOutpostConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterOutpostConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.outpostConfig = mapped
    }

    /**
     * @param value The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Considerations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the *Amazon EKS User Guide* . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.
     */
    @JvmName("sgegiirmejapmgon")
    public suspend fun resourcesVpcConfig(`value`: ClusterResourcesVpcConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcesVpcConfig = mapped
    }

    /**
     * @param argument The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Considerations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the *Amazon EKS User Guide* . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.
     */
    @JvmName("rxvbujwexqnsfyyo")
    public suspend fun resourcesVpcConfig(argument: suspend ClusterResourcesVpcConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterResourcesVpcConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resourcesVpcConfig = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
     */
    @JvmName("hfqsebmlhjftpaxp")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("cyivbtugoehgebbg")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("pbkxltjgtwjengyw")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("qfjjxmpuadnjcsko")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("qslounswwtkmscrj")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("brkxpdrukrellkmu")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value
     */
    @JvmName("xlxvwvtggopacyrn")
    public suspend fun upgradePolicy(`value`: ClusterUpgradePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.upgradePolicy = mapped
    }

    /**
     * @param argument
     */
    @JvmName("cguhrvdhbbkwxkkf")
    public suspend fun upgradePolicy(argument: suspend ClusterUpgradePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterUpgradePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.upgradePolicy = mapped
    }

    /**
     * @param value The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used.
     */
    @JvmName("rmxvmgtskkufyuyn")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): ClusterArgs = ClusterArgs(
        accessConfig = accessConfig,
        bootstrapSelfManagedAddons = bootstrapSelfManagedAddons,
        encryptionConfig = encryptionConfig,
        kubernetesNetworkConfig = kubernetesNetworkConfig,
        logging = logging,
        name = name,
        outpostConfig = outpostConfig,
        resourcesVpcConfig = resourcesVpcConfig,
        roleArn = roleArn,
        tags = tags,
        upgradePolicy = upgradePolicy,
        version = version,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy