AttachedCluster

class AttachedCluster : KotlinCustomResource

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}}

Properties

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

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 clusterRegion: Output<String>

Output only. The region where this cluster runs. For EKS clusters, this is an AWS region. For AKS clusters, this is an Azure region.

Link copied to clipboard
val createTime: Output<String>

Output only. The time at which this cluster was created.

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

Policy to determine what flags to send on delete.

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

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>

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

Link copied to clipboard

A set of errors found in the cluster. Structure is documented below.

Link copied to clipboard

Fleet configuration. Structure is documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The Kubernetes version of the cluster.

Link copied to clipboard
val location: Output<String>

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>

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>

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

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val reconciling: Output<Boolean>

If set, there are currently changes in flight to the cluster.

Link copied to clipboard
val state: Output<String>

The current state of the cluster. Possible values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING, ERROR, DEGRADED

Link copied to clipboard
val uid: Output<String>

A globally unique identifier for the cluster.

Link copied to clipboard
val updateTime: Output<String>

The time at which this cluster was last updated.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Workload Identity settings. Structure is documented below.