com.pulumi.gcp.edgecontainer.kotlin.Cluster.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.edgecontainer.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterAuthorization
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterControlPlane
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterControlPlaneEncryption
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterFleet
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterMaintenanceEvent
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterMaintenancePolicy
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterNetworking
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterSystemAddonsConfig
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterAuthorization.Companion.toKotlin as clusterAuthorizationToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterControlPlane.Companion.toKotlin as clusterControlPlaneToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterControlPlaneEncryption.Companion.toKotlin as clusterControlPlaneEncryptionToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterFleet.Companion.toKotlin as clusterFleetToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterMaintenanceEvent.Companion.toKotlin as clusterMaintenanceEventToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterMaintenancePolicy.Companion.toKotlin as clusterMaintenancePolicyToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterNetworking.Companion.toKotlin as clusterNetworkingToKotlin
import com.pulumi.gcp.edgecontainer.kotlin.outputs.ClusterSystemAddonsConfig.Companion.toKotlin as clusterSystemAddonsConfigToKotlin
/**
* Builder for [Cluster].
*/
@PulumiTagMarker
public class ClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: ClusterArgs = ClusterArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ClusterArgsBuilder.() -> Unit) {
val builder = ClusterArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Cluster {
val builtJavaResource = com.pulumi.gcp.edgecontainer.Cluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Cluster(builtJavaResource)
}
}
/**
* Cluster contains information about a Google Distributed Cloud Edge Kubernetes cluster.
* To get more information about Cluster, see:
* * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.clusters)
* * How-to Guides
* * [Create and manage clusters](https://cloud.google.com/distributed-cloud/edge/latest/docs/clusters)
* ## Example Usage
* ### Edgecontainer Cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const _default = new gcp.edgecontainer.Cluster("default", {
* name: "basic-cluster",
* location: "us-central1",
* authorization: {
* adminUsers: {
* username: "[email protected]",
* },
* },
* networking: {
* clusterIpv4CidrBlocks: ["10.0.0.0/16"],
* servicesIpv4CidrBlocks: ["10.1.0.0/16"],
* },
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* labels: {
* my_key: "my_val",
* other_key: "other_val",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* default = gcp.edgecontainer.Cluster("default",
* name="basic-cluster",
* location="us-central1",
* authorization=gcp.edgecontainer.ClusterAuthorizationArgs(
* admin_users=gcp.edgecontainer.ClusterAuthorizationAdminUsersArgs(
* username="[email protected]",
* ),
* ),
* networking=gcp.edgecontainer.ClusterNetworkingArgs(
* cluster_ipv4_cidr_blocks=["10.0.0.0/16"],
* services_ipv4_cidr_blocks=["10.1.0.0/16"],
* ),
* fleet=gcp.edgecontainer.ClusterFleetArgs(
* project=f"projects/{project.number}",
* ),
* labels={
* "my_key": "my_val",
* "other_key": "other_val",
* })
* ```
* ```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 @default = new Gcp.EdgeContainer.Cluster("default", new()
* {
* Name = "basic-cluster",
* Location = "us-central1",
* Authorization = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationArgs
* {
* AdminUsers = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationAdminUsersArgs
* {
* Username = "[email protected]",
* },
* },
* Networking = new Gcp.EdgeContainer.Inputs.ClusterNetworkingArgs
* {
* ClusterIpv4CidrBlocks = new[]
* {
* "10.0.0.0/16",
* },
* ServicesIpv4CidrBlocks = new[]
* {
* "10.1.0.0/16",
* },
* },
* Fleet = new Gcp.EdgeContainer.Inputs.ClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* Labels =
* {
* { "my_key", "my_val" },
* { "other_key", "other_val" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/edgecontainer"
* "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
* }
* _, err = edgecontainer.NewCluster(ctx, "default", &edgecontainer.ClusterArgs{
* Name: pulumi.String("basic-cluster"),
* Location: pulumi.String("us-central1"),
* Authorization: &edgecontainer.ClusterAuthorizationArgs{
* AdminUsers: &edgecontainer.ClusterAuthorizationAdminUsersArgs{
* Username: pulumi.String("[email protected]"),
* },
* },
* Networking: &edgecontainer.ClusterNetworkingArgs{
* ClusterIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* ServicesIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.1.0.0/16"),
* },
* },
* Fleet: &edgecontainer.ClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* Labels: pulumi.StringMap{
* "my_key": pulumi.String("my_val"),
* "other_key": pulumi.String("other_val"),
* },
* })
* 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.edgecontainer.Cluster;
* import com.pulumi.gcp.edgecontainer.ClusterArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationAdminUsersArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterNetworkingArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterFleetArgs;
* 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();
* var default_ = new Cluster("default", ClusterArgs.builder()
* .name("basic-cluster")
* .location("us-central1")
* .authorization(ClusterAuthorizationArgs.builder()
* .adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
* .username("[email protected]")
* .build())
* .build())
* .networking(ClusterNetworkingArgs.builder()
* .clusterIpv4CidrBlocks("10.0.0.0/16")
* .servicesIpv4CidrBlocks("10.1.0.0/16")
* .build())
* .fleet(ClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .labels(Map.ofEntries(
* Map.entry("my_key", "my_val"),
* Map.entry("other_key", "other_val")
* ))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:edgecontainer:Cluster
* properties:
* name: basic-cluster
* location: us-central1
* authorization:
* adminUsers:
* username: [email protected]
* networking:
* clusterIpv4CidrBlocks:
* - 10.0.0.0/16
* servicesIpv4CidrBlocks:
* - 10.1.0.0/16
* fleet:
* project: projects/${project.number}
* labels:
* my_key: my_val
* other_key: other_val
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ### Edgecontainer Cluster With Maintenance Window
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const _default = new gcp.edgecontainer.Cluster("default", {
* name: "cluster-with-maintenance",
* location: "us-central1",
* authorization: {
* adminUsers: {
* username: "[email protected]",
* },
* },
* networking: {
* clusterIpv4CidrBlocks: ["10.0.0.0/16"],
* servicesIpv4CidrBlocks: ["10.1.0.0/16"],
* },
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* maintenancePolicy: {
* window: {
* recurringWindow: {
* window: {
* startTime: "2023-01-01T08:00:00Z",
* endTime: "2023-01-01T17:00:00Z",
* },
* recurrence: "FREQ=WEEKLY;BYDAY=SA",
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* default = gcp.edgecontainer.Cluster("default",
* name="cluster-with-maintenance",
* location="us-central1",
* authorization=gcp.edgecontainer.ClusterAuthorizationArgs(
* admin_users=gcp.edgecontainer.ClusterAuthorizationAdminUsersArgs(
* username="[email protected]",
* ),
* ),
* networking=gcp.edgecontainer.ClusterNetworkingArgs(
* cluster_ipv4_cidr_blocks=["10.0.0.0/16"],
* services_ipv4_cidr_blocks=["10.1.0.0/16"],
* ),
* fleet=gcp.edgecontainer.ClusterFleetArgs(
* project=f"projects/{project.number}",
* ),
* maintenance_policy=gcp.edgecontainer.ClusterMaintenancePolicyArgs(
* window=gcp.edgecontainer.ClusterMaintenancePolicyWindowArgs(
* recurring_window=gcp.edgecontainer.ClusterMaintenancePolicyWindowRecurringWindowArgs(
* window=gcp.edgecontainer.ClusterMaintenancePolicyWindowRecurringWindowWindowArgs(
* start_time="2023-01-01T08:00:00Z",
* end_time="2023-01-01T17:00:00Z",
* ),
* recurrence="FREQ=WEEKLY;BYDAY=SA",
* ),
* ),
* ))
* ```
* ```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 @default = new Gcp.EdgeContainer.Cluster("default", new()
* {
* Name = "cluster-with-maintenance",
* Location = "us-central1",
* Authorization = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationArgs
* {
* AdminUsers = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationAdminUsersArgs
* {
* Username = "[email protected]",
* },
* },
* Networking = new Gcp.EdgeContainer.Inputs.ClusterNetworkingArgs
* {
* ClusterIpv4CidrBlocks = new[]
* {
* "10.0.0.0/16",
* },
* ServicesIpv4CidrBlocks = new[]
* {
* "10.1.0.0/16",
* },
* },
* Fleet = new Gcp.EdgeContainer.Inputs.ClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* MaintenancePolicy = new Gcp.EdgeContainer.Inputs.ClusterMaintenancePolicyArgs
* {
* Window = new Gcp.EdgeContainer.Inputs.ClusterMaintenancePolicyWindowArgs
* {
* RecurringWindow = new Gcp.EdgeContainer.Inputs.ClusterMaintenancePolicyWindowRecurringWindowArgs
* {
* Window = new Gcp.EdgeContainer.Inputs.ClusterMaintenancePolicyWindowRecurringWindowWindowArgs
* {
* StartTime = "2023-01-01T08:00:00Z",
* EndTime = "2023-01-01T17:00:00Z",
* },
* Recurrence = "FREQ=WEEKLY;BYDAY=SA",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/edgecontainer"
* "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
* }
* _, err = edgecontainer.NewCluster(ctx, "default", &edgecontainer.ClusterArgs{
* Name: pulumi.String("cluster-with-maintenance"),
* Location: pulumi.String("us-central1"),
* Authorization: &edgecontainer.ClusterAuthorizationArgs{
* AdminUsers: &edgecontainer.ClusterAuthorizationAdminUsersArgs{
* Username: pulumi.String("[email protected]"),
* },
* },
* Networking: &edgecontainer.ClusterNetworkingArgs{
* ClusterIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* ServicesIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.1.0.0/16"),
* },
* },
* Fleet: &edgecontainer.ClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* MaintenancePolicy: &edgecontainer.ClusterMaintenancePolicyArgs{
* Window: &edgecontainer.ClusterMaintenancePolicyWindowArgs{
* RecurringWindow: &edgecontainer.ClusterMaintenancePolicyWindowRecurringWindowArgs{
* Window: &edgecontainer.ClusterMaintenancePolicyWindowRecurringWindowWindowArgs{
* StartTime: pulumi.String("2023-01-01T08:00:00Z"),
* EndTime: pulumi.String("2023-01-01T17:00:00Z"),
* },
* Recurrence: pulumi.String("FREQ=WEEKLY;BYDAY=SA"),
* },
* },
* },
* })
* 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.edgecontainer.Cluster;
* import com.pulumi.gcp.edgecontainer.ClusterArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationAdminUsersArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterNetworkingArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterFleetArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterMaintenancePolicyArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterMaintenancePolicyWindowArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterMaintenancePolicyWindowRecurringWindowArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterMaintenancePolicyWindowRecurringWindowWindowArgs;
* 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();
* var default_ = new Cluster("default", ClusterArgs.builder()
* .name("cluster-with-maintenance")
* .location("us-central1")
* .authorization(ClusterAuthorizationArgs.builder()
* .adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
* .username("[email protected]")
* .build())
* .build())
* .networking(ClusterNetworkingArgs.builder()
* .clusterIpv4CidrBlocks("10.0.0.0/16")
* .servicesIpv4CidrBlocks("10.1.0.0/16")
* .build())
* .fleet(ClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .maintenancePolicy(ClusterMaintenancePolicyArgs.builder()
* .window(ClusterMaintenancePolicyWindowArgs.builder()
* .recurringWindow(ClusterMaintenancePolicyWindowRecurringWindowArgs.builder()
* .window(ClusterMaintenancePolicyWindowRecurringWindowWindowArgs.builder()
* .startTime("2023-01-01T08:00:00Z")
* .endTime("2023-01-01T17:00:00Z")
* .build())
* .recurrence("FREQ=WEEKLY;BYDAY=SA")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:edgecontainer:Cluster
* properties:
* name: cluster-with-maintenance
* location: us-central1
* authorization:
* adminUsers:
* username: [email protected]
* networking:
* clusterIpv4CidrBlocks:
* - 10.0.0.0/16
* servicesIpv4CidrBlocks:
* - 10.1.0.0/16
* fleet:
* project: projects/${project.number}
* maintenancePolicy:
* window:
* recurringWindow:
* window:
* startTime: 2023-01-01T08:00:00Z
* endTime: 2023-01-01T17:00:00Z
* recurrence: FREQ=WEEKLY;BYDAY=SA
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ### Edgecontainer Local Control Plane Cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const _default = new gcp.edgecontainer.Cluster("default", {
* name: "local-control-plane-cluster",
* location: "us-central1",
* authorization: {
* adminUsers: {
* username: "[email protected]",
* },
* },
* networking: {
* clusterIpv4CidrBlocks: ["10.0.0.0/16"],
* servicesIpv4CidrBlocks: ["10.1.0.0/16"],
* },
* fleet: {
* project: project.then(project => `projects/${project.number}`),
* },
* externalLoadBalancerIpv4AddressPools: ["10.100.0.0-10.100.0.10"],
* controlPlane: {
* local: {
* nodeLocation: "us-central1-edge-example-edgesite",
* nodeCount: 1,
* machineFilter: "machine-name",
* sharedDeploymentPolicy: "ALLOWED",
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* default = gcp.edgecontainer.Cluster("default",
* name="local-control-plane-cluster",
* location="us-central1",
* authorization=gcp.edgecontainer.ClusterAuthorizationArgs(
* admin_users=gcp.edgecontainer.ClusterAuthorizationAdminUsersArgs(
* username="[email protected]",
* ),
* ),
* networking=gcp.edgecontainer.ClusterNetworkingArgs(
* cluster_ipv4_cidr_blocks=["10.0.0.0/16"],
* services_ipv4_cidr_blocks=["10.1.0.0/16"],
* ),
* fleet=gcp.edgecontainer.ClusterFleetArgs(
* project=f"projects/{project.number}",
* ),
* external_load_balancer_ipv4_address_pools=["10.100.0.0-10.100.0.10"],
* control_plane=gcp.edgecontainer.ClusterControlPlaneArgs(
* local=gcp.edgecontainer.ClusterControlPlaneLocalArgs(
* node_location="us-central1-edge-example-edgesite",
* node_count=1,
* machine_filter="machine-name",
* shared_deployment_policy="ALLOWED",
* ),
* ))
* ```
* ```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 @default = new Gcp.EdgeContainer.Cluster("default", new()
* {
* Name = "local-control-plane-cluster",
* Location = "us-central1",
* Authorization = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationArgs
* {
* AdminUsers = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationAdminUsersArgs
* {
* Username = "[email protected]",
* },
* },
* Networking = new Gcp.EdgeContainer.Inputs.ClusterNetworkingArgs
* {
* ClusterIpv4CidrBlocks = new[]
* {
* "10.0.0.0/16",
* },
* ServicesIpv4CidrBlocks = new[]
* {
* "10.1.0.0/16",
* },
* },
* Fleet = new Gcp.EdgeContainer.Inputs.ClusterFleetArgs
* {
* Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
* },
* ExternalLoadBalancerIpv4AddressPools = new[]
* {
* "10.100.0.0-10.100.0.10",
* },
* ControlPlane = new Gcp.EdgeContainer.Inputs.ClusterControlPlaneArgs
* {
* Local = new Gcp.EdgeContainer.Inputs.ClusterControlPlaneLocalArgs
* {
* NodeLocation = "us-central1-edge-example-edgesite",
* NodeCount = 1,
* MachineFilter = "machine-name",
* SharedDeploymentPolicy = "ALLOWED",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/edgecontainer"
* "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
* }
* _, err = edgecontainer.NewCluster(ctx, "default", &edgecontainer.ClusterArgs{
* Name: pulumi.String("local-control-plane-cluster"),
* Location: pulumi.String("us-central1"),
* Authorization: &edgecontainer.ClusterAuthorizationArgs{
* AdminUsers: &edgecontainer.ClusterAuthorizationAdminUsersArgs{
* Username: pulumi.String("[email protected]"),
* },
* },
* Networking: &edgecontainer.ClusterNetworkingArgs{
* ClusterIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* ServicesIpv4CidrBlocks: pulumi.StringArray{
* pulumi.String("10.1.0.0/16"),
* },
* },
* Fleet: &edgecontainer.ClusterFleetArgs{
* Project: pulumi.String(fmt.Sprintf("projects/%v", project.Number)),
* },
* ExternalLoadBalancerIpv4AddressPools: pulumi.StringArray{
* pulumi.String("10.100.0.0-10.100.0.10"),
* },
* ControlPlane: &edgecontainer.ClusterControlPlaneArgs{
* Local: &edgecontainer.ClusterControlPlaneLocalArgs{
* NodeLocation: pulumi.String("us-central1-edge-example-edgesite"),
* NodeCount: pulumi.Int(1),
* MachineFilter: pulumi.String("machine-name"),
* SharedDeploymentPolicy: pulumi.String("ALLOWED"),
* },
* },
* })
* 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.edgecontainer.Cluster;
* import com.pulumi.gcp.edgecontainer.ClusterArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationAdminUsersArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterNetworkingArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterFleetArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterControlPlaneArgs;
* import com.pulumi.gcp.edgecontainer.inputs.ClusterControlPlaneLocalArgs;
* 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();
* var default_ = new Cluster("default", ClusterArgs.builder()
* .name("local-control-plane-cluster")
* .location("us-central1")
* .authorization(ClusterAuthorizationArgs.builder()
* .adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
* .username("[email protected]")
* .build())
* .build())
* .networking(ClusterNetworkingArgs.builder()
* .clusterIpv4CidrBlocks("10.0.0.0/16")
* .servicesIpv4CidrBlocks("10.1.0.0/16")
* .build())
* .fleet(ClusterFleetArgs.builder()
* .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build())
* .externalLoadBalancerIpv4AddressPools("10.100.0.0-10.100.0.10")
* .controlPlane(ClusterControlPlaneArgs.builder()
* .local(ClusterControlPlaneLocalArgs.builder()
* .nodeLocation("us-central1-edge-example-edgesite")
* .nodeCount(1)
* .machineFilter("machine-name")
* .sharedDeploymentPolicy("ALLOWED")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:edgecontainer:Cluster
* properties:
* name: local-control-plane-cluster
* location: us-central1
* authorization:
* adminUsers:
* username: [email protected]
* networking:
* clusterIpv4CidrBlocks:
* - 10.0.0.0/16
* servicesIpv4CidrBlocks:
* - 10.1.0.0/16
* fleet:
* project: projects/${project.number}
* externalLoadBalancerIpv4AddressPools:
* - 10.100.0.0-10.100.0.10
* controlPlane:
* local:
* nodeLocation: us-central1-edge-example-edgesite
* nodeCount: 1
* machineFilter: machine-name
* sharedDeploymentPolicy: ALLOWED
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ## Import
* Cluster can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/clusters/{{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:edgecontainer/cluster:Cluster default projects/{{project}}/locations/{{location}}/clusters/{{name}}
* ```
* ```sh
* $ pulumi import gcp:edgecontainer/cluster:Cluster default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:edgecontainer/cluster:Cluster default {{location}}/{{name}}
* ```
*/
public class Cluster internal constructor(
override val javaResource: com.pulumi.gcp.edgecontainer.Cluster,
) : KotlinCustomResource(javaResource, ClusterMapper) {
/**
* RBAC policy that will be applied and managed by GEC.
* Structure is documented below.
*/
public val authorization: Output
get() = javaResource.authorization().applyValue({ args0 ->
args0.let({ args0 ->
clusterAuthorizationToKotlin(args0)
})
})
/**
* The PEM-encoded public certificate of the cluster's CA.
* **Note**: This property is sensitive and will not be displayed in the plan.
*/
public val clusterCaCertificate: Output
get() = javaResource.clusterCaCertificate().applyValue({ args0 -> args0 })
/**
* The configuration of the cluster control plane.
*/
public val controlPlane: Output?
get() = javaResource.controlPlane().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterControlPlaneToKotlin(args0)
})
}).orElse(null)
})
/**
* Remote control plane disk encryption options. This field is only used when enabling CMEK support.
*/
public val controlPlaneEncryption: Output
get() = javaResource.controlPlaneEncryption().applyValue({ args0 ->
args0.let({ args0 ->
clusterControlPlaneEncryptionToKotlin(args0)
})
})
/**
* The control plane release version.
*/
public val controlPlaneVersion: Output
get() = javaResource.controlPlaneVersion().applyValue({ args0 -> args0 })
/**
* (Output)
* The time when the maintenance event request was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* The default maximum number of pods per node used if a maximum value is not specified explicitly for a node pool in this
* cluster. If unspecified, the Kubernetes default value will be used.
*/
public val defaultMaxPodsPerNode: Output
get() = javaResource.defaultMaxPodsPerNode().applyValue({ args0 -> args0 })
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy