AttachedClusterArgs

data class AttachedClusterArgs(val annotations: Output<Map<String, String>>? = null, val authorization: Output<AttachedClusterAuthorizationArgs>? = null, val binaryAuthorization: Output<AttachedClusterBinaryAuthorizationArgs>? = null, val deletionPolicy: Output<String>? = null, val description: Output<String>? = null, val distribution: Output<String>? = null, val fleet: Output<AttachedClusterFleetArgs>? = null, val location: Output<String>? = null, val loggingConfig: Output<AttachedClusterLoggingConfigArgs>? = null, val monitoringConfig: Output<AttachedClusterMonitoringConfigArgs>? = null, val name: Output<String>? = null, val oidcConfig: Output<AttachedClusterOidcConfigArgs>? = null, val platformVersion: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<AttachedClusterArgs>

An Anthos cluster running on customer owned infrastructure. To get more information about Cluster, see:

Example Usage

Container Attached Cluster Basic

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()
.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());
}
}

Container Attached Cluster Ignore Errors

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()
.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());
}
}

Import

Cluster can be imported using any of these accepted formats

$ pulumi import gcp:container/attachedCluster:AttachedCluster default projects/{{project}}/locations/{{location}}/attachedClusters/{{name}}
$ pulumi import gcp:container/attachedCluster:AttachedCluster default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:container/attachedCluster:AttachedCluster default {{location}}/{{name}}

Constructors

Link copied to clipboard
constructor(annotations: Output<Map<String, String>>? = null, authorization: Output<AttachedClusterAuthorizationArgs>? = null, binaryAuthorization: Output<AttachedClusterBinaryAuthorizationArgs>? = null, deletionPolicy: Output<String>? = null, description: Output<String>? = null, distribution: Output<String>? = null, fleet: Output<AttachedClusterFleetArgs>? = null, location: Output<String>? = null, loggingConfig: Output<AttachedClusterLoggingConfigArgs>? = null, monitoringConfig: Output<AttachedClusterMonitoringConfigArgs>? = null, name: Output<String>? = null, oidcConfig: Output<AttachedClusterOidcConfigArgs>? = null, platformVersion: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>? = null

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.

Link copied to clipboard

Configuration related to the cluster RBAC settings. Structure is documented below.

Link copied to clipboard

Binary Authorization configuration. Structure is documented below.

Link copied to clipboard
val deletionPolicy: Output<String>? = null

Policy to determine what flags to send on delete.

Link copied to clipboard
val description: Output<String>? = null

A human readable description of this attached cluster. Cannot be longer than 255 UTF-8 encoded bytes.

Link copied to clipboard
val distribution: Output<String>? = null

The Kubernetes distribution of the underlying attached cluster. Supported values: "eks", "aks".

Link copied to clipboard
val fleet: Output<AttachedClusterFleetArgs>? = null

Fleet configuration. Structure is documented below.

Link copied to clipboard
val location: Output<String>? = null

The location for the resource

Link copied to clipboard

Logging configuration. Structure is documented below.

Link copied to clipboard

Monitoring configuration. Structure is documented below.

Link copied to clipboard
val name: Output<String>? = null

The name of this resource.

Link copied to clipboard

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.

Link copied to clipboard
val platformVersion: Output<String>? = null

The platform version for the cluster (e.g. 1.23.0-gke.1).

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Functions

Link copied to clipboard
open override fun toJava(): AttachedClusterArgs