Attached Cluster Args
An Anthos cluster running on customer owned infrastructure. To get more information about Cluster, see:
How-to Guides
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
Properties
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.
Configuration related to the cluster RBAC settings. Structure is documented below.
Binary Authorization configuration. Structure is documented below.
Policy to determine what flags to send on delete.
A human readable description of this attached cluster. Cannot be longer than 255 UTF-8 encoded bytes.
The Kubernetes distribution of the underlying attached cluster. Supported values: "eks", "aks".
Fleet configuration. Structure is documented below.
Logging configuration. Structure is documented below.
Monitoring configuration. Structure is documented below.
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.
The platform version for the cluster (e.g. 1.23.0-gke.1
).