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

com.pulumi.gitlab.kotlin.GroupClusterArgs.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.4.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gitlab.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.GroupClusterArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The `gitlab.GroupCluster` resource allows to manage the lifecycle of a group cluster.
 * > This is deprecated GitLab feature since 14.5
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_clusters.html)
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gitlab from "@pulumi/gitlab";
 * const foo = new gitlab.Group("foo", {
 *     name: "foo-group",
 *     path: "foo-path",
 * });
 * const bar = new gitlab.GroupCluster("bar", {
 *     group: foo.id,
 *     name: "bar-cluster",
 *     domain: "example.com",
 *     enabled: true,
 *     kubernetesApiUrl: "https://124.124.124",
 *     kubernetesToken: "some-token",
 *     kubernetesCaCert: "some-cert",
 *     kubernetesAuthorizationType: "rbac",
 *     environmentScope: "*",
 *     managementProjectId: "123456",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gitlab as gitlab
 * foo = gitlab.Group("foo",
 *     name="foo-group",
 *     path="foo-path")
 * bar = gitlab.GroupCluster("bar",
 *     group=foo.id,
 *     name="bar-cluster",
 *     domain="example.com",
 *     enabled=True,
 *     kubernetes_api_url="https://124.124.124",
 *     kubernetes_token="some-token",
 *     kubernetes_ca_cert="some-cert",
 *     kubernetes_authorization_type="rbac",
 *     environment_scope="*",
 *     management_project_id="123456")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using GitLab = Pulumi.GitLab;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foo = new GitLab.Group("foo", new()
 *     {
 *         Name = "foo-group",
 *         Path = "foo-path",
 *     });
 *     var bar = new GitLab.GroupCluster("bar", new()
 *     {
 *         Group = foo.Id,
 *         Name = "bar-cluster",
 *         Domain = "example.com",
 *         Enabled = true,
 *         KubernetesApiUrl = "https://124.124.124",
 *         KubernetesToken = "some-token",
 *         KubernetesCaCert = "some-cert",
 *         KubernetesAuthorizationType = "rbac",
 *         EnvironmentScope = "*",
 *         ManagementProjectId = "123456",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		foo, err := gitlab.NewGroup(ctx, "foo", &gitlab.GroupArgs{
 * 			Name: pulumi.String("foo-group"),
 * 			Path: pulumi.String("foo-path"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gitlab.NewGroupCluster(ctx, "bar", &gitlab.GroupClusterArgs{
 * 			Group:                       foo.ID(),
 * 			Name:                        pulumi.String("bar-cluster"),
 * 			Domain:                      pulumi.String("example.com"),
 * 			Enabled:                     pulumi.Bool(true),
 * 			KubernetesApiUrl:            pulumi.String("https://124.124.124"),
 * 			KubernetesToken:             pulumi.String("some-token"),
 * 			KubernetesCaCert:            pulumi.String("some-cert"),
 * 			KubernetesAuthorizationType: pulumi.String("rbac"),
 * 			EnvironmentScope:            pulumi.String("*"),
 * 			ManagementProjectId:         pulumi.String("123456"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gitlab.Group;
 * import com.pulumi.gitlab.GroupArgs;
 * import com.pulumi.gitlab.GroupCluster;
 * import com.pulumi.gitlab.GroupClusterArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var foo = new Group("foo", GroupArgs.builder()
 *             .name("foo-group")
 *             .path("foo-path")
 *             .build());
 *         var bar = new GroupCluster("bar", GroupClusterArgs.builder()
 *             .group(foo.id())
 *             .name("bar-cluster")
 *             .domain("example.com")
 *             .enabled(true)
 *             .kubernetesApiUrl("https://124.124.124")
 *             .kubernetesToken("some-token")
 *             .kubernetesCaCert("some-cert")
 *             .kubernetesAuthorizationType("rbac")
 *             .environmentScope("*")
 *             .managementProjectId("123456")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foo:
 *     type: gitlab:Group
 *     properties:
 *       name: foo-group
 *       path: foo-path
 *   bar:
 *     type: gitlab:GroupCluster
 *     properties:
 *       group: ${foo.id}
 *       name: bar-cluster
 *       domain: example.com
 *       enabled: true
 *       kubernetesApiUrl: https://124.124.124
 *       kubernetesToken: some-token
 *       kubernetesCaCert: some-cert
 *       kubernetesAuthorizationType: rbac
 *       environmentScope: '*'
 *       managementProjectId: '123456'
 * ```
 * 
 * ## Import
 * Starting in Terraform v1.5.0 you can use an import block to import `gitlab_group_cluster`. For example:
 * terraform
 * import {
 *   to = gitlab_group_cluster.example
 *   id = "see CLI command below for ID"
 * }
 * Import using the CLI is supported using the following syntax:
 * GitLab group clusters can be imported using an id made up of `groupid:clusterid`, e.g.
 * ```sh
 * $ pulumi import gitlab:index/groupCluster:GroupCluster bar 123:321
 * ```
 * @property domain The base domain of the cluster.
 * @property enabled Determines if cluster is active or not. Defaults to `true`. This attribute cannot be read.
 * @property environmentScope The associated environment to the cluster. Defaults to `*`.
 * @property group The id of the group to add the cluster to.
 * @property kubernetesApiUrl The URL to access the Kubernetes API.
 * @property kubernetesAuthorizationType The cluster authorization type. Valid values are `rbac`, `abac`, `unknown_authorization`. Defaults to `rbac`.
 * @property kubernetesCaCert TLS certificate (needed if API is using a self-signed TLS certificate).
 * @property kubernetesToken The token to authenticate against Kubernetes.
 * @property managed Determines if cluster is managed by gitlab or not. Defaults to `true`. This attribute cannot be read.
 * @property managementProjectId The ID of the management project for the cluster.
 * @property name The name of cluster.
 */
public data class GroupClusterArgs(
    public val domain: Output? = null,
    public val enabled: Output? = null,
    public val environmentScope: Output? = null,
    public val group: Output? = null,
    public val kubernetesApiUrl: Output? = null,
    public val kubernetesAuthorizationType: Output? = null,
    public val kubernetesCaCert: Output? = null,
    public val kubernetesToken: Output? = null,
    public val managed: Output? = null,
    public val managementProjectId: Output? = null,
    public val name: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.GroupClusterArgs =
        com.pulumi.gitlab.GroupClusterArgs.builder()
            .domain(domain?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .environmentScope(environmentScope?.applyValue({ args0 -> args0 }))
            .group(group?.applyValue({ args0 -> args0 }))
            .kubernetesApiUrl(kubernetesApiUrl?.applyValue({ args0 -> args0 }))
            .kubernetesAuthorizationType(kubernetesAuthorizationType?.applyValue({ args0 -> args0 }))
            .kubernetesCaCert(kubernetesCaCert?.applyValue({ args0 -> args0 }))
            .kubernetesToken(kubernetesToken?.applyValue({ args0 -> args0 }))
            .managed(managed?.applyValue({ args0 -> args0 }))
            .managementProjectId(managementProjectId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupClusterArgs].
 */
@PulumiTagMarker
public class GroupClusterArgsBuilder internal constructor() {
    private var domain: Output? = null

    private var enabled: Output? = null

    private var environmentScope: Output? = null

    private var group: Output? = null

    private var kubernetesApiUrl: Output? = null

    private var kubernetesAuthorizationType: Output? = null

    private var kubernetesCaCert: Output? = null

    private var kubernetesToken: Output? = null

    private var managed: Output? = null

    private var managementProjectId: Output? = null

    private var name: Output? = null

    /**
     * @param value The base domain of the cluster.
     */
    @JvmName("mevfofhnhwjybsux")
    public suspend fun domain(`value`: Output) {
        this.domain = value
    }

    /**
     * @param value Determines if cluster is active or not. Defaults to `true`. This attribute cannot be read.
     */
    @JvmName("qkheexuptpanunbv")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The associated environment to the cluster. Defaults to `*`.
     */
    @JvmName("ctaqxlyoafsfjmum")
    public suspend fun environmentScope(`value`: Output) {
        this.environmentScope = value
    }

    /**
     * @param value The id of the group to add the cluster to.
     */
    @JvmName("oghepxtyrvhomdra")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value The URL to access the Kubernetes API.
     */
    @JvmName("ewlqpnsqbtsmfmax")
    public suspend fun kubernetesApiUrl(`value`: Output) {
        this.kubernetesApiUrl = value
    }

    /**
     * @param value The cluster authorization type. Valid values are `rbac`, `abac`, `unknown_authorization`. Defaults to `rbac`.
     */
    @JvmName("gbjmvadoaybtldkg")
    public suspend fun kubernetesAuthorizationType(`value`: Output) {
        this.kubernetesAuthorizationType = value
    }

    /**
     * @param value TLS certificate (needed if API is using a self-signed TLS certificate).
     */
    @JvmName("utwgkoevvhevidht")
    public suspend fun kubernetesCaCert(`value`: Output) {
        this.kubernetesCaCert = value
    }

    /**
     * @param value The token to authenticate against Kubernetes.
     */
    @JvmName("ornjoroyatyeqwtg")
    public suspend fun kubernetesToken(`value`: Output) {
        this.kubernetesToken = value
    }

    /**
     * @param value Determines if cluster is managed by gitlab or not. Defaults to `true`. This attribute cannot be read.
     */
    @JvmName("gyumpwgtlvlmgqyv")
    public suspend fun managed(`value`: Output) {
        this.managed = value
    }

    /**
     * @param value The ID of the management project for the cluster.
     */
    @JvmName("yjmwbnuvluoldxew")
    public suspend fun managementProjectId(`value`: Output) {
        this.managementProjectId = value
    }

    /**
     * @param value The name of cluster.
     */
    @JvmName("ipnxwfeylwkgamgb")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The base domain of the cluster.
     */
    @JvmName("ylhwixbxeasbyaqq")
    public suspend fun domain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domain = mapped
    }

    /**
     * @param value Determines if cluster is active or not. Defaults to `true`. This attribute cannot be read.
     */
    @JvmName("qvjfqapnrdetrqxg")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The associated environment to the cluster. Defaults to `*`.
     */
    @JvmName("jkudjrogxhaghgja")
    public suspend fun environmentScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentScope = mapped
    }

    /**
     * @param value The id of the group to add the cluster to.
     */
    @JvmName("uovytvkdritgcxfl")
    public suspend fun group(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value The URL to access the Kubernetes API.
     */
    @JvmName("tggecayetdojnxiw")
    public suspend fun kubernetesApiUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kubernetesApiUrl = mapped
    }

    /**
     * @param value The cluster authorization type. Valid values are `rbac`, `abac`, `unknown_authorization`. Defaults to `rbac`.
     */
    @JvmName("gwifgtfsvijinhep")
    public suspend fun kubernetesAuthorizationType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kubernetesAuthorizationType = mapped
    }

    /**
     * @param value TLS certificate (needed if API is using a self-signed TLS certificate).
     */
    @JvmName("vqsgrbliqxagnbdm")
    public suspend fun kubernetesCaCert(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kubernetesCaCert = mapped
    }

    /**
     * @param value The token to authenticate against Kubernetes.
     */
    @JvmName("xcgckphfbkwspqxn")
    public suspend fun kubernetesToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kubernetesToken = mapped
    }

    /**
     * @param value Determines if cluster is managed by gitlab or not. Defaults to `true`. This attribute cannot be read.
     */
    @JvmName("qwixfucwqnvjjclp")
    public suspend fun managed(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managed = mapped
    }

    /**
     * @param value The ID of the management project for the cluster.
     */
    @JvmName("cxxouqngropvxpof")
    public suspend fun managementProjectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managementProjectId = mapped
    }

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

    internal fun build(): GroupClusterArgs = GroupClusterArgs(
        domain = domain,
        enabled = enabled,
        environmentScope = environmentScope,
        group = group,
        kubernetesApiUrl = kubernetesApiUrl,
        kubernetesAuthorizationType = kubernetesAuthorizationType,
        kubernetesCaCert = kubernetesCaCert,
        kubernetesToken = kubernetesToken,
        managed = managed,
        managementProjectId = managementProjectId,
        name = name,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy