com.pulumi.gitlab.kotlin.InstanceClusterArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-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.gitlab.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.InstanceClusterArgs.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.InstanceCluster` resource allows to manage the lifecycle of an instance cluster.
* > This is deprecated GitLab feature since 14.5
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_clusters.html)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* const bar = new gitlab.InstanceCluster("bar", {
* name: "bar-cluster",
* domain: "example.com",
* enabled: true,
* kubernetesApiUrl: "https://124.124.124",
* kubernetesToken: "some-token",
* kubernetesCaCert: "some-cert",
* kubernetesNamespace: "namespace",
* kubernetesAuthorizationType: "rbac",
* environmentScope: "*",
* managementProjectId: "123456",
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* bar = gitlab.InstanceCluster("bar",
* 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_namespace="namespace",
* 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 bar = new GitLab.InstanceCluster("bar", new()
* {
* Name = "bar-cluster",
* Domain = "example.com",
* Enabled = true,
* KubernetesApiUrl = "https://124.124.124",
* KubernetesToken = "some-token",
* KubernetesCaCert = "some-cert",
* KubernetesNamespace = "namespace",
* 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 {
* _, err := gitlab.NewInstanceCluster(ctx, "bar", &gitlab.InstanceClusterArgs{
* 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"),
* KubernetesNamespace: pulumi.String("namespace"),
* 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.InstanceCluster;
* import com.pulumi.gitlab.InstanceClusterArgs;
* 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 bar = new InstanceCluster("bar", InstanceClusterArgs.builder()
* .name("bar-cluster")
* .domain("example.com")
* .enabled(true)
* .kubernetesApiUrl("https://124.124.124")
* .kubernetesToken("some-token")
* .kubernetesCaCert("some-cert")
* .kubernetesNamespace("namespace")
* .kubernetesAuthorizationType("rbac")
* .environmentScope("*")
* .managementProjectId("123456")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* bar:
* type: gitlab:InstanceCluster
* properties:
* name: bar-cluster
* domain: example.com
* enabled: true
* kubernetesApiUrl: https://124.124.124
* kubernetesToken: some-token
* kubernetesCaCert: some-cert
* kubernetesNamespace: namespace
* kubernetesAuthorizationType: rbac
* environmentScope: '*'
* managementProjectId: '123456'
* ```
*
* ## Import
* GitLab instance clusters can be imported using a `clusterid`, e.g.
* ```sh
* $ pulumi import gitlab:index/instanceCluster:InstanceCluster bar 123
* ```
* @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 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 kubernetesNamespace The unique namespace related to the instance.
* @property kubernetesToken The token to authenticate against Kubernetes. This attribute cannot be read.
* @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 InstanceClusterArgs(
public val domain: Output? = null,
public val enabled: Output? = null,
public val environmentScope: Output? = null,
public val kubernetesApiUrl: Output? = null,
public val kubernetesAuthorizationType: Output? = null,
public val kubernetesCaCert: Output? = null,
public val kubernetesNamespace: 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.InstanceClusterArgs =
com.pulumi.gitlab.InstanceClusterArgs.builder()
.domain(domain?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.environmentScope(environmentScope?.applyValue({ args0 -> args0 }))
.kubernetesApiUrl(kubernetesApiUrl?.applyValue({ args0 -> args0 }))
.kubernetesAuthorizationType(kubernetesAuthorizationType?.applyValue({ args0 -> args0 }))
.kubernetesCaCert(kubernetesCaCert?.applyValue({ args0 -> args0 }))
.kubernetesNamespace(kubernetesNamespace?.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 [InstanceClusterArgs].
*/
@PulumiTagMarker
public class InstanceClusterArgsBuilder internal constructor() {
private var domain: Output? = null
private var enabled: Output? = null
private var environmentScope: Output? = null
private var kubernetesApiUrl: Output? = null
private var kubernetesAuthorizationType: Output? = null
private var kubernetesCaCert: Output? = null
private var kubernetesNamespace: 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("nqhmwwurxdriapqe")
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("kpcpcnuvovsmddjr")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value The associated environment to the cluster. Defaults to `*`.
*/
@JvmName("ahukmdwdunhbfihf")
public suspend fun environmentScope(`value`: Output) {
this.environmentScope = value
}
/**
* @param value The URL to access the Kubernetes API.
*/
@JvmName("qxbifiwkdwokbhhp")
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("yeektgsqsnirsset")
public suspend fun kubernetesAuthorizationType(`value`: Output) {
this.kubernetesAuthorizationType = value
}
/**
* @param value TLS certificate (needed if API is using a self-signed TLS certificate).
*/
@JvmName("edcuecrwgpvqwkxw")
public suspend fun kubernetesCaCert(`value`: Output) {
this.kubernetesCaCert = value
}
/**
* @param value The unique namespace related to the instance.
*/
@JvmName("ibbinvmflfbvytdf")
public suspend fun kubernetesNamespace(`value`: Output) {
this.kubernetesNamespace = value
}
/**
* @param value The token to authenticate against Kubernetes. This attribute cannot be read.
*/
@JvmName("gfruarlajemsrggj")
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("jutbboxlmduipjfm")
public suspend fun managed(`value`: Output) {
this.managed = value
}
/**
* @param value The ID of the management project for the cluster.
*/
@JvmName("aelomiqscwbvcsdj")
public suspend fun managementProjectId(`value`: Output) {
this.managementProjectId = value
}
/**
* @param value The name of cluster.
*/
@JvmName("fsiakvcaagxrnlmq")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The base domain of the cluster.
*/
@JvmName("tiiltvyvbobyhxvk")
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("yjtmhjphlxqtixfy")
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("fcgdacjrvbmaarpb")
public suspend fun environmentScope(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.environmentScope = mapped
}
/**
* @param value The URL to access the Kubernetes API.
*/
@JvmName("karkvsqtlcrfukir")
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("xpqweuogtdpnefht")
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("jtvewmswjqjfgedf")
public suspend fun kubernetesCaCert(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kubernetesCaCert = mapped
}
/**
* @param value The unique namespace related to the instance.
*/
@JvmName("cxequylauvuymgtf")
public suspend fun kubernetesNamespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kubernetesNamespace = mapped
}
/**
* @param value The token to authenticate against Kubernetes. This attribute cannot be read.
*/
@JvmName("bvpjhadidlnygdrb")
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("kmvnyiasohaiobyy")
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("agnsnaawsxhdulta")
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("olgnvntdcccftygr")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): InstanceClusterArgs = InstanceClusterArgs(
domain = domain,
enabled = enabled,
environmentScope = environmentScope,
kubernetesApiUrl = kubernetesApiUrl,
kubernetesAuthorizationType = kubernetesAuthorizationType,
kubernetesCaCert = kubernetesCaCert,
kubernetesNamespace = kubernetesNamespace,
kubernetesToken = kubernetesToken,
managed = managed,
managementProjectId = managementProjectId,
name = name,
)
}