com.pulumi.gitlab.kotlin.ProjectClusterArgs.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.ProjectClusterArgs.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.ProjectCluster` resource allows to manage the lifecycle of a project cluster.
* > This is deprecated GitLab feature since 14.5
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_clusters.html)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* const foo = new gitlab.Project("foo", {name: "foo-project"});
* const bar = new gitlab.ProjectCluster("bar", {
* project: foo.id,
* 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
* foo = gitlab.Project("foo", name="foo-project")
* bar = gitlab.ProjectCluster("bar",
* project=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_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 foo = new GitLab.Project("foo", new()
* {
* Name = "foo-project",
* });
* var bar = new GitLab.ProjectCluster("bar", new()
* {
* Project = foo.Id,
* 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 {
* foo, err := gitlab.NewProject(ctx, "foo", &gitlab.ProjectArgs{
* Name: pulumi.String("foo-project"),
* })
* if err != nil {
* return err
* }
* _, err = gitlab.NewProjectCluster(ctx, "bar", &gitlab.ProjectClusterArgs{
* Project: 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"),
* 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.Project;
* import com.pulumi.gitlab.ProjectArgs;
* import com.pulumi.gitlab.ProjectCluster;
* import com.pulumi.gitlab.ProjectClusterArgs;
* 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 Project("foo", ProjectArgs.builder()
* .name("foo-project")
* .build());
* var bar = new ProjectCluster("bar", ProjectClusterArgs.builder()
* .project(foo.id())
* .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:
* foo:
* type: gitlab:Project
* properties:
* name: foo-project
* bar:
* type: gitlab:ProjectCluster
* properties:
* project: ${foo.id}
* 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
* Starting in Terraform v1.5.0 you can use an import block to import `gitlab_project_cluster`. For example:
* terraform
* import {
* to = gitlab_project_cluster.example
* id = "see CLI command below for ID"
* }
* Import using the CLI is supported using the following syntax:
* GitLab project clusters can be imported using an id made up of `projectid:clusterid`, e.g.
* ```sh
* $ pulumi import gitlab:index/projectCluster:ProjectCluster 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 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 project.
* @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.
* @property project The id of the project to add the cluster to.
*/
public data class ProjectClusterArgs(
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,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.ProjectClusterArgs =
com.pulumi.gitlab.ProjectClusterArgs.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 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ProjectClusterArgs].
*/
@PulumiTagMarker
public class ProjectClusterArgsBuilder 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
private var project: Output? = null
/**
* @param value The base domain of the cluster.
*/
@JvmName("pooakfeagjrnlqmd")
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("vpgoewxaphjeulcd")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value The associated environment to the cluster. Defaults to `*`.
*/
@JvmName("dkctrdvjfrajmknr")
public suspend fun environmentScope(`value`: Output) {
this.environmentScope = value
}
/**
* @param value The URL to access the Kubernetes API.
*/
@JvmName("gexhpckyqjbwbnol")
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("swxhprhmtaxcmmyk")
public suspend fun kubernetesAuthorizationType(`value`: Output) {
this.kubernetesAuthorizationType = value
}
/**
* @param value TLS certificate (needed if API is using a self-signed TLS certificate).
*/
@JvmName("xibuuvqfqevnlsrk")
public suspend fun kubernetesCaCert(`value`: Output) {
this.kubernetesCaCert = value
}
/**
* @param value The unique namespace related to the project.
*/
@JvmName("umldbyanlgbcmqov")
public suspend fun kubernetesNamespace(`value`: Output) {
this.kubernetesNamespace = value
}
/**
* @param value The token to authenticate against Kubernetes.
*/
@JvmName("qndklwumamplkrau")
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("fquvaufdnvlpgwgi")
public suspend fun managed(`value`: Output) {
this.managed = value
}
/**
* @param value The ID of the management project for the cluster.
*/
@JvmName("wpyjfqxdthdltrsx")
public suspend fun managementProjectId(`value`: Output) {
this.managementProjectId = value
}
/**
* @param value The name of cluster.
*/
@JvmName("nykoyxvpwswphexl")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The id of the project to add the cluster to.
*/
@JvmName("cpsndvcxqvxonaco")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The base domain of the cluster.
*/
@JvmName("quwwmjdhqgrsokfp")
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("fqkkaqccxluclfwy")
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("ydfsqxtxlqfdoevt")
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("fpikfuccxdnnpblr")
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("ubxcorycpxwdlisp")
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("wsnevxitahvmjngj")
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 project.
*/
@JvmName("rjogrfvjtxxuwnuf")
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.
*/
@JvmName("kpvlfojsaejyddee")
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("lucmqjpchvljwwmw")
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("guumgkrtxpvhhnra")
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("jfcynqrljvlnufbf")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The id of the project to add the cluster to.
*/
@JvmName("rdgbiglaxxnxrger")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): ProjectClusterArgs = ProjectClusterArgs(
domain = domain,
enabled = enabled,
environmentScope = environmentScope,
kubernetesApiUrl = kubernetesApiUrl,
kubernetesAuthorizationType = kubernetesAuthorizationType,
kubernetesCaCert = kubernetesCaCert,
kubernetesNamespace = kubernetesNamespace,
kubernetesToken = kubernetesToken,
managed = managed,
managementProjectId = managementProjectId,
name = name,
project = project,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy