com.pulumi.gcp.container.kotlin.AttachedClusterArgs.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.container.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.AttachedClusterArgs.builder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterAuthorizationArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterAuthorizationArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterBinaryAuthorizationArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterBinaryAuthorizationArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterFleetArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterFleetArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterLoggingConfigArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterLoggingConfigArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterMonitoringConfigArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterMonitoringConfigArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterOidcConfigArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterOidcConfigArgsBuilder
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterProxyConfigArgs
import com.pulumi.gcp.container.kotlin.inputs.AttachedClusterProxyConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An Anthos cluster running on customer owned infrastructure.
* To get more information about Cluster, see:
* * [API documentation](https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest)
* * How-to Guides
* * [API reference](https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest/v1/projects.locations.attachedClusters)
* * [Multicloud overview](https://cloud.google.com/anthos/clusters/docs/multi-cloud)
* ## Example Usage
* ### Container Attached Cluster Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const versions = project.then(project => gcp.container.getAttachedVersions({
* location: "us-west1",
* project: project.projectId,
* }));
* const primary = new gcp.container.AttachedCluster("primary", {
* name: "basic",
* location: "us-west1",
* project: project.then(project => project.projectId),
* description: "Test cluster",
* distribution: "aks",
* oidcConfig: {
* issuerUrl: "https://oidc.issuer.url",
* },
* platformVersion: versions.then(versions => versions.validVersions?.[0]),
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* versions = gcp.container.get_attached_versions(location="us-west1",
* project=project.project_id)
* primary = gcp.container.AttachedCluster("primary",
* name="basic",
* location="us-west1",
* project=project.project_id,
* description="Test cluster",
* distribution="aks",
* oidc_config=gcp.container.AttachedClusterOidcConfigArgs(
* issuer_url="https://oidc.issuer.url",
* ),
* platform_version=versions.valid_versions[0],
* fleet=gcp.container.AttachedClusterFleetArgs(
* project=f"projects/{project.number}",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var versions = Gcp.Container.GetAttachedVersions.Invoke(new()
* {
* Location = "us-west1",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* });
* var primary = new Gcp.Container.AttachedCluster("primary", new()
* {
* Name = "basic",
* Location = "us-west1",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* Description = "Test cluster",
* Distribution = "aks",
* OidcConfig = new Gcp.Container.Inputs.AttachedClusterOidcConfigArgs
* {
* IssuerUrl = "https://oidc.issuer.url",
* },
* PlatformVersion = versions.Apply(getAttachedVersionsResult => getAttachedVersionsResult.ValidVersions[0]),
* Fleet = new Gcp.Container.Inputs.AttachedClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* versions, err := container.GetAttachedVersions(ctx, &container.GetAttachedVersionsArgs{
* Location: "us-west1",
* Project: project.ProjectId,
* }, nil)
* if err != nil {
* return err
* }
* _, err = container.NewAttachedCluster(ctx, "primary", &container.AttachedClusterArgs{
* Name: pulumi.String("basic"),
* Location: pulumi.String("us-west1"),
* Project: pulumi.String(project.ProjectId),
* Description: pulumi.String("Test cluster"),
* Distribution: pulumi.String("aks"),
* OidcConfig: &container.AttachedClusterOidcConfigArgs{
* IssuerUrl: pulumi.String("https://oidc.issuer.url"),
* },
* PlatformVersion: pulumi.String(versions.ValidVersions[0]),
* Fleet: &container.AttachedClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* })
* 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.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.container.ContainerFunctions;
* import com.pulumi.gcp.container.inputs.GetAttachedVersionsArgs;
* import com.pulumi.gcp.container.AttachedCluster;
* import com.pulumi.gcp.container.AttachedClusterArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterOidcConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterFleetArgs;
* 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) {
* final var project = OrganizationsFunctions.getProject();
* final var versions = ContainerFunctions.getAttachedVersions(GetAttachedVersionsArgs.builder()
* .location("us-west1")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .build());
* var primary = new AttachedCluster("primary", AttachedClusterArgs.builder()
* .name("basic")
* .location("us-west1")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .description("Test cluster")
* .distribution("aks")
* .oidcConfig(AttachedClusterOidcConfigArgs.builder()
* .issuerUrl("https://oidc.issuer.url")
* .build())
* .platformVersion(versions.applyValue(getAttachedVersionsResult -> getAttachedVersionsResult.validVersions()[0]))
* .fleet(AttachedClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:container:AttachedCluster
* properties:
* name: basic
* location: us-west1
* project: ${project.projectId}
* description: Test cluster
* distribution: aks
* oidcConfig:
* issuerUrl: https://oidc.issuer.url
* platformVersion: ${versions.validVersions[0]}
* fleet:
* project: projects/${project.number}
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* versions:
* fn::invoke:
* Function: gcp:container:getAttachedVersions
* Arguments:
* location: us-west1
* project: ${project.projectId}
* ```
*
* ### Container Attached Cluster Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
* const project = gcp.organizations.getProject({});
* const versions = project.then(project => gcp.container.getAttachedVersions({
* location: "us-west1",
* project: project.projectId,
* }));
* const primary = new gcp.container.AttachedCluster("primary", {
* name: "basic",
* project: project.then(project => project.projectId),
* location: "us-west1",
* description: "Test cluster",
* distribution: "aks",
* annotations: {
* "label-one": "value-one",
* },
* authorization: {
* adminUsers: [
* "[email protected]",
* "[email protected]",
* ],
* adminGroups: [
* "[email protected]",
* "[email protected]",
* ],
* },
* oidcConfig: {
* issuerUrl: "https://oidc.issuer.url",
* jwks: std.base64encode({
* input: "{\"keys\":[{\"use\":\"sig\",\"kty\":\"RSA\",\"kid\":\"testid\",\"alg\":\"RS256\",\"n\":\"somedata\",\"e\":\"AQAB\"}]}",
* }).then(invoke => invoke.result),
* },
* platformVersion: versions.then(versions => versions.validVersions?.[0]),
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* loggingConfig: {
* componentConfig: {
* enableComponents: [
* "SYSTEM_COMPONENTS",
* "WORKLOADS",
* ],
* },
* },
* monitoringConfig: {
* managedPrometheusConfig: {
* enabled: true,
* },
* },
* binaryAuthorization: {
* evaluationMode: "PROJECT_SINGLETON_POLICY_ENFORCE",
* },
* proxyConfig: {
* kubernetesSecret: {
* name: "proxy-config",
* namespace: "default",
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* import pulumi_std as std
* project = gcp.organizations.get_project()
* versions = gcp.container.get_attached_versions(location="us-west1",
* project=project.project_id)
* primary = gcp.container.AttachedCluster("primary",
* name="basic",
* project=project.project_id,
* location="us-west1",
* description="Test cluster",
* distribution="aks",
* annotations={
* "label-one": "value-one",
* },
* authorization=gcp.container.AttachedClusterAuthorizationArgs(
* admin_users=[
* "[email protected]",
* "[email protected]",
* ],
* admin_groups=[
* "[email protected]",
* "[email protected]",
* ],
* ),
* oidc_config=gcp.container.AttachedClusterOidcConfigArgs(
* issuer_url="https://oidc.issuer.url",
* jwks=std.base64encode(input="{\"keys\":[{\"use\":\"sig\",\"kty\":\"RSA\",\"kid\":\"testid\",\"alg\":\"RS256\",\"n\":\"somedata\",\"e\":\"AQAB\"}]}").result,
* ),
* platform_version=versions.valid_versions[0],
* fleet=gcp.container.AttachedClusterFleetArgs(
* project=f"projects/{project.number}",
* ),
* logging_config=gcp.container.AttachedClusterLoggingConfigArgs(
* component_config=gcp.container.AttachedClusterLoggingConfigComponentConfigArgs(
* enable_components=[
* "SYSTEM_COMPONENTS",
* "WORKLOADS",
* ],
* ),
* ),
* monitoring_config=gcp.container.AttachedClusterMonitoringConfigArgs(
* managed_prometheus_config=gcp.container.AttachedClusterMonitoringConfigManagedPrometheusConfigArgs(
* enabled=True,
* ),
* ),
* binary_authorization=gcp.container.AttachedClusterBinaryAuthorizationArgs(
* evaluation_mode="PROJECT_SINGLETON_POLICY_ENFORCE",
* ),
* proxy_config=gcp.container.AttachedClusterProxyConfigArgs(
* kubernetes_secret=gcp.container.AttachedClusterProxyConfigKubernetesSecretArgs(
* name="proxy-config",
* namespace="default",
* ),
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* using Std = Pulumi.Std;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var versions = Gcp.Container.GetAttachedVersions.Invoke(new()
* {
* Location = "us-west1",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* });
* var primary = new Gcp.Container.AttachedCluster("primary", new()
* {
* Name = "basic",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* Location = "us-west1",
* Description = "Test cluster",
* Distribution = "aks",
* Annotations =
* {
* { "label-one", "value-one" },
* },
* Authorization = new Gcp.Container.Inputs.AttachedClusterAuthorizationArgs
* {
* AdminUsers = new[]
* {
* "[email protected]",
* "[email protected]",
* },
* AdminGroups = new[]
* {
* "[email protected]",
* "[email protected]",
* },
* },
* OidcConfig = new Gcp.Container.Inputs.AttachedClusterOidcConfigArgs
* {
* IssuerUrl = "https://oidc.issuer.url",
* Jwks = Std.Base64encode.Invoke(new()
* {
* Input = "{\"keys\":[{\"use\":\"sig\",\"kty\":\"RSA\",\"kid\":\"testid\",\"alg\":\"RS256\",\"n\":\"somedata\",\"e\":\"AQAB\"}]}",
* }).Apply(invoke => invoke.Result),
* },
* PlatformVersion = versions.Apply(getAttachedVersionsResult => getAttachedVersionsResult.ValidVersions[0]),
* Fleet = new Gcp.Container.Inputs.AttachedClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* LoggingConfig = new Gcp.Container.Inputs.AttachedClusterLoggingConfigArgs
* {
* ComponentConfig = new Gcp.Container.Inputs.AttachedClusterLoggingConfigComponentConfigArgs
* {
* EnableComponents = new[]
* {
* "SYSTEM_COMPONENTS",
* "WORKLOADS",
* },
* },
* },
* MonitoringConfig = new Gcp.Container.Inputs.AttachedClusterMonitoringConfigArgs
* {
* ManagedPrometheusConfig = new Gcp.Container.Inputs.AttachedClusterMonitoringConfigManagedPrometheusConfigArgs
* {
* Enabled = true,
* },
* },
* BinaryAuthorization = new Gcp.Container.Inputs.AttachedClusterBinaryAuthorizationArgs
* {
* EvaluationMode = "PROJECT_SINGLETON_POLICY_ENFORCE",
* },
* ProxyConfig = new Gcp.Container.Inputs.AttachedClusterProxyConfigArgs
* {
* KubernetesSecret = new Gcp.Container.Inputs.AttachedClusterProxyConfigKubernetesSecretArgs
* {
* Name = "proxy-config",
* Namespace = "default",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-std/sdk/go/std"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* versions, err := container.GetAttachedVersions(ctx, &container.GetAttachedVersionsArgs{
* Location: "us-west1",
* Project: project.ProjectId,
* }, nil)
* if err != nil {
* return err
* }
* invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
* Input: "{\"keys\":[{\"use\":\"sig\",\"kty\":\"RSA\",\"kid\":\"testid\",\"alg\":\"RS256\",\"n\":\"somedata\",\"e\":\"AQAB\"}]}",
* }, nil)
* if err != nil {
* return err
* }
* _, err = container.NewAttachedCluster(ctx, "primary", &container.AttachedClusterArgs{
* Name: pulumi.String("basic"),
* Project: pulumi.String(project.ProjectId),
* Location: pulumi.String("us-west1"),
* Description: pulumi.String("Test cluster"),
* Distribution: pulumi.String("aks"),
* Annotations: pulumi.StringMap{
* "label-one": pulumi.String("value-one"),
* },
* Authorization: &container.AttachedClusterAuthorizationArgs{
* AdminUsers: pulumi.StringArray{
* pulumi.String("[email protected]"),
* pulumi.String("[email protected]"),
* },
* AdminGroups: pulumi.StringArray{
* pulumi.String("[email protected]"),
* pulumi.String("[email protected]"),
* },
* },
* OidcConfig: &container.AttachedClusterOidcConfigArgs{
* IssuerUrl: pulumi.String("https://oidc.issuer.url"),
* Jwks: invokeBase64encode.Result,
* },
* PlatformVersion: pulumi.String(versions.ValidVersions[0]),
* Fleet: &container.AttachedClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* LoggingConfig: &container.AttachedClusterLoggingConfigArgs{
* ComponentConfig: &container.AttachedClusterLoggingConfigComponentConfigArgs{
* EnableComponents: pulumi.StringArray{
* pulumi.String("SYSTEM_COMPONENTS"),
* pulumi.String("WORKLOADS"),
* },
* },
* },
* MonitoringConfig: &container.AttachedClusterMonitoringConfigArgs{
* ManagedPrometheusConfig: &container.AttachedClusterMonitoringConfigManagedPrometheusConfigArgs{
* Enabled: pulumi.Bool(true),
* },
* },
* BinaryAuthorization: &container.AttachedClusterBinaryAuthorizationArgs{
* EvaluationMode: pulumi.String("PROJECT_SINGLETON_POLICY_ENFORCE"),
* },
* ProxyConfig: &container.AttachedClusterProxyConfigArgs{
* KubernetesSecret: &container.AttachedClusterProxyConfigKubernetesSecretArgs{
* Name: pulumi.String("proxy-config"),
* Namespace: pulumi.String("default"),
* },
* },
* })
* 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.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.container.ContainerFunctions;
* import com.pulumi.gcp.container.inputs.GetAttachedVersionsArgs;
* import com.pulumi.gcp.container.AttachedCluster;
* import com.pulumi.gcp.container.AttachedClusterArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterAuthorizationArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterOidcConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterFleetArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterLoggingConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterLoggingConfigComponentConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterMonitoringConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterMonitoringConfigManagedPrometheusConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterBinaryAuthorizationArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterProxyConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterProxyConfigKubernetesSecretArgs;
* 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) {
* final var project = OrganizationsFunctions.getProject();
* final var versions = ContainerFunctions.getAttachedVersions(GetAttachedVersionsArgs.builder()
* .location("us-west1")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .build());
* var primary = new AttachedCluster("primary", AttachedClusterArgs.builder()
* .name("basic")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .location("us-west1")
* .description("Test cluster")
* .distribution("aks")
* .annotations(Map.of("label-one", "value-one"))
* .authorization(AttachedClusterAuthorizationArgs.builder()
* .adminUsers(
* "[email protected]",
* "[email protected]")
* .adminGroups(
* "[email protected]",
* "[email protected]")
* .build())
* .oidcConfig(AttachedClusterOidcConfigArgs.builder()
* .issuerUrl("https://oidc.issuer.url")
* .jwks(StdFunctions.base64encode(Base64encodeArgs.builder()
* .input("{\"keys\":[{\"use\":\"sig\",\"kty\":\"RSA\",\"kid\":\"testid\",\"alg\":\"RS256\",\"n\":\"somedata\",\"e\":\"AQAB\"}]}")
* .build()).result())
* .build())
* .platformVersion(versions.applyValue(getAttachedVersionsResult -> getAttachedVersionsResult.validVersions()[0]))
* .fleet(AttachedClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .loggingConfig(AttachedClusterLoggingConfigArgs.builder()
* .componentConfig(AttachedClusterLoggingConfigComponentConfigArgs.builder()
* .enableComponents(
* "SYSTEM_COMPONENTS",
* "WORKLOADS")
* .build())
* .build())
* .monitoringConfig(AttachedClusterMonitoringConfigArgs.builder()
* .managedPrometheusConfig(AttachedClusterMonitoringConfigManagedPrometheusConfigArgs.builder()
* .enabled(true)
* .build())
* .build())
* .binaryAuthorization(AttachedClusterBinaryAuthorizationArgs.builder()
* .evaluationMode("PROJECT_SINGLETON_POLICY_ENFORCE")
* .build())
* .proxyConfig(AttachedClusterProxyConfigArgs.builder()
* .kubernetesSecret(AttachedClusterProxyConfigKubernetesSecretArgs.builder()
* .name("proxy-config")
* .namespace("default")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:container:AttachedCluster
* properties:
* name: basic
* project: ${project.projectId}
* location: us-west1
* description: Test cluster
* distribution: aks
* annotations:
* label-one: value-one
* authorization:
* adminUsers:
* - [email protected]
* - [email protected]
* adminGroups:
* - [email protected]
* - [email protected]
* oidcConfig:
* issuerUrl: https://oidc.issuer.url
* jwks:
* fn::invoke:
* Function: std:base64encode
* Arguments:
* input: '{"keys":[{"use":"sig","kty":"RSA","kid":"testid","alg":"RS256","n":"somedata","e":"AQAB"}]}'
* Return: result
* platformVersion: ${versions.validVersions[0]}
* fleet:
* project: projects/${project.number}
* loggingConfig:
* componentConfig:
* enableComponents:
* - SYSTEM_COMPONENTS
* - WORKLOADS
* monitoringConfig:
* managedPrometheusConfig:
* enabled: true
* binaryAuthorization:
* evaluationMode: PROJECT_SINGLETON_POLICY_ENFORCE
* proxyConfig:
* kubernetesSecret:
* name: proxy-config
* namespace: default
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* versions:
* fn::invoke:
* Function: gcp:container:getAttachedVersions
* Arguments:
* location: us-west1
* project: ${project.projectId}
* ```
*
* ### Container Attached Cluster Ignore Errors
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const versions = project.then(project => gcp.container.getAttachedVersions({
* location: "us-west1",
* project: project.projectId,
* }));
* const primary = new gcp.container.AttachedCluster("primary", {
* name: "basic",
* location: "us-west1",
* project: project.then(project => project.projectId),
* description: "Test cluster",
* distribution: "aks",
* oidcConfig: {
* issuerUrl: "https://oidc.issuer.url",
* },
* platformVersion: versions.then(versions => versions.validVersions?.[0]),
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* deletionPolicy: "DELETE_IGNORE_ERRORS",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* versions = gcp.container.get_attached_versions(location="us-west1",
* project=project.project_id)
* primary = gcp.container.AttachedCluster("primary",
* name="basic",
* location="us-west1",
* project=project.project_id,
* description="Test cluster",
* distribution="aks",
* oidc_config=gcp.container.AttachedClusterOidcConfigArgs(
* issuer_url="https://oidc.issuer.url",
* ),
* platform_version=versions.valid_versions[0],
* fleet=gcp.container.AttachedClusterFleetArgs(
* project=f"projects/{project.number}",
* ),
* deletion_policy="DELETE_IGNORE_ERRORS")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var versions = Gcp.Container.GetAttachedVersions.Invoke(new()
* {
* Location = "us-west1",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* });
* var primary = new Gcp.Container.AttachedCluster("primary", new()
* {
* Name = "basic",
* Location = "us-west1",
* Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
* Description = "Test cluster",
* Distribution = "aks",
* OidcConfig = new Gcp.Container.Inputs.AttachedClusterOidcConfigArgs
* {
* IssuerUrl = "https://oidc.issuer.url",
* },
* PlatformVersion = versions.Apply(getAttachedVersionsResult => getAttachedVersionsResult.ValidVersions[0]),
* Fleet = new Gcp.Container.Inputs.AttachedClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* DeletionPolicy = "DELETE_IGNORE_ERRORS",
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* versions, err := container.GetAttachedVersions(ctx, &container.GetAttachedVersionsArgs{
* Location: "us-west1",
* Project: project.ProjectId,
* }, nil)
* if err != nil {
* return err
* }
* _, err = container.NewAttachedCluster(ctx, "primary", &container.AttachedClusterArgs{
* Name: pulumi.String("basic"),
* Location: pulumi.String("us-west1"),
* Project: pulumi.String(project.ProjectId),
* Description: pulumi.String("Test cluster"),
* Distribution: pulumi.String("aks"),
* OidcConfig: &container.AttachedClusterOidcConfigArgs{
* IssuerUrl: pulumi.String("https://oidc.issuer.url"),
* },
* PlatformVersion: pulumi.String(versions.ValidVersions[0]),
* Fleet: &container.AttachedClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* DeletionPolicy: pulumi.String("DELETE_IGNORE_ERRORS"),
* })
* 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.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.container.ContainerFunctions;
* import com.pulumi.gcp.container.inputs.GetAttachedVersionsArgs;
* import com.pulumi.gcp.container.AttachedCluster;
* import com.pulumi.gcp.container.AttachedClusterArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterOidcConfigArgs;
* import com.pulumi.gcp.container.inputs.AttachedClusterFleetArgs;
* 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) {
* final var project = OrganizationsFunctions.getProject();
* final var versions = ContainerFunctions.getAttachedVersions(GetAttachedVersionsArgs.builder()
* .location("us-west1")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .build());
* var primary = new AttachedCluster("primary", AttachedClusterArgs.builder()
* .name("basic")
* .location("us-west1")
* .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
* .description("Test cluster")
* .distribution("aks")
* .oidcConfig(AttachedClusterOidcConfigArgs.builder()
* .issuerUrl("https://oidc.issuer.url")
* .build())
* .platformVersion(versions.applyValue(getAttachedVersionsResult -> getAttachedVersionsResult.validVersions()[0]))
* .fleet(AttachedClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .deletionPolicy("DELETE_IGNORE_ERRORS")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:container:AttachedCluster
* properties:
* name: basic
* location: us-west1
* project: ${project.projectId}
* description: Test cluster
* distribution: aks
* oidcConfig:
* issuerUrl: https://oidc.issuer.url
* platformVersion: ${versions.validVersions[0]}
* fleet:
* project: projects/${project.number}
* deletionPolicy: DELETE_IGNORE_ERRORS
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* versions:
* fn::invoke:
* Function: gcp:container:getAttachedVersions
* Arguments:
* location: us-west1
* project: ${project.projectId}
* ```
*
* ## Import
* Cluster can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/attachedClusters/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:container/attachedCluster:AttachedCluster default projects/{{project}}/locations/{{location}}/attachedClusters/{{name}}
* ```
* ```sh
* $ pulumi import gcp:container/attachedCluster:AttachedCluster default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:container/attachedCluster:AttachedCluster default {{location}}/{{name}}
* ```
* @property annotations Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of
* all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required),
* separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with
* alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. **Note**: This field is
* non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field
* 'effective_annotations' for all of the annotations present on the resource.
* @property authorization Configuration related to the cluster RBAC settings.
* @property binaryAuthorization Binary Authorization configuration.
* @property deletionPolicy Policy to determine what flags to send on delete.
* @property description A human readable description of this attached cluster. Cannot be longer than 255 UTF-8 encoded bytes.
* @property distribution The Kubernetes distribution of the underlying attached cluster. Supported values:
* "eks", "aks".
* @property fleet Fleet configuration.
* Structure is documented below.
* @property location The location for the resource
* @property loggingConfig Logging configuration.
* @property monitoringConfig Monitoring configuration.
* @property name The name of this resource.
* @property oidcConfig OIDC discovery information of the target cluster.
* Kubernetes Service Account (KSA) tokens are JWT tokens signed by the cluster
* API server. This fields indicates how GCP services
* validate KSA tokens in order to allow system workloads (such as GKE Connect
* and telemetry agents) to authenticate back to GCP.
* Both clusters with public and private issuer URLs are supported.
* Clusters with public issuers only need to specify the `issuer_url` field
* while clusters with private issuers need to provide both
* `issuer_url` and `jwks`.
* Structure is documented below.
* @property platformVersion The platform version for the cluster (e.g. `1.23.0-gke.1`).
* @property project
* @property proxyConfig Support for proxy configuration.
*/
public data class AttachedClusterArgs(
public val annotations: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy