NodePoolArgs

data class NodePoolArgs(val cluster: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val localDiskEncryption: Output<NodePoolLocalDiskEncryptionArgs>? = null, val location: Output<String>? = null, val machineFilter: Output<String>? = null, val name: Output<String>? = null, val nodeConfig: Output<NodePoolNodeConfigArgs>? = null, val nodeCount: Output<Int>? = null, val nodeLocation: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<NodePoolArgs>

"A set of Kubernetes nodes in a cluster with common configuration and specification." To get more information about NodePool, see:

Example Usage

Edgecontainer Node Pool

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.NodePool;
import com.pulumi.gcp.edgecontainer.NodePoolArgs;
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 cluster = new Cluster("cluster", ClusterArgs.builder()
.location("us-central1")
.authorization(ClusterAuthorizationArgs.builder()
.adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
.username("admin@hashicorptest.com")
.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())
.build());
var default_ = new NodePool("default", NodePoolArgs.builder()
.cluster(cluster.name())
.location("us-central1")
.nodeLocation("us-central1-edge-example-edgesite")
.nodeCount(3)
.labels(Map.ofEntries(
Map.entry("my_key", "my_val"),
Map.entry("other_key", "other_val")
))
.build());
}
}

Edgecontainer Node Pool With Cmek

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.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.edgecontainer.NodePool;
import com.pulumi.gcp.edgecontainer.NodePoolArgs;
import com.pulumi.gcp.edgecontainer.inputs.NodePoolLocalDiskEncryptionArgs;
import com.pulumi.resources.CustomResourceOptions;
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 cluster = new Cluster("cluster", ClusterArgs.builder()
.location("us-central1")
.authorization(ClusterAuthorizationArgs.builder()
.adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
.username("admin@hashicorptest.com")
.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())
.build());
var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
.location("us-central1")
.build());
var cryptoKeyCryptoKey = new CryptoKey("cryptoKeyCryptoKey", CryptoKeyArgs.builder()
.keyRing(keyRing.id())
.build());
var cryptoKeyCryptoKeyIAMMember = new CryptoKeyIAMMember("cryptoKeyCryptoKeyIAMMember", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId(cryptoKeyCryptoKey.id())
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.member(String.format("serviceAccount:service-%s@gcp-sa-edgecontainer.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var default_ = new NodePool("default", NodePoolArgs.builder()
.cluster(cluster.name())
.location("us-central1")
.nodeLocation("us-central1-edge-example-edgesite")
.nodeCount(3)
.localDiskEncryption(NodePoolLocalDiskEncryptionArgs.builder()
.kmsKey(cryptoKeyCryptoKey.id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(cryptoKeyCryptoKeyIAMMember)
.build());
}
}

Edgecontainer Local Control Plane Node Pool

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 com.pulumi.gcp.edgecontainer.NodePool;
import com.pulumi.gcp.edgecontainer.NodePoolArgs;
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 defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.location("us-central1")
.authorization(ClusterAuthorizationArgs.builder()
.adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
.username("admin@hashicorptest.com")
.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());
var defaultNodePool = new NodePool("defaultNodePool", NodePoolArgs.builder()
.cluster(google_edgecontainer_cluster.cluster().name())
.location("us-central1")
.nodeLocation("us-central1-edge-example-edgesite")
.nodeCount(3)
.build());
}
}

Import

NodePool can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}} * {{project}}/{{location}}/{{cluster}}/{{name}} * {{location}}/{{cluster}}/{{name}} In Terraform v1.5.0 and later, use an import block to import NodePool using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}" to = google_edgecontainer_node_pool.default }

$ pulumi import gcp:edgecontainer/nodePool:NodePool When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), NodePool can be imported using one of the formats above. For example
$ pulumi import gcp:edgecontainer/nodePool:NodePool default projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}
$ pulumi import gcp:edgecontainer/nodePool:NodePool default {{project}}/{{location}}/{{cluster}}/{{name}}
$ pulumi import gcp:edgecontainer/nodePool:NodePool default {{location}}/{{cluster}}/{{name}}

Constructors

Link copied to clipboard
fun NodePoolArgs(cluster: Output<String>? = null, labels: Output<Map<String, String>>? = null, localDiskEncryption: Output<NodePoolLocalDiskEncryptionArgs>? = null, location: Output<String>? = null, machineFilter: Output<String>? = null, name: Output<String>? = null, nodeConfig: Output<NodePoolNodeConfigArgs>? = null, nodeCount: Output<Int>? = null, nodeLocation: Output<String>? = null, project: Output<String>? = null)

Functions

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

Properties

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

The name of the target Distributed Cloud Edge Cluster.

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

Labels associated with this resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

Link copied to clipboard

Local disk encryption options. This field is only used when enabling CMEK support. Structure is documented below.

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

The location of the resource.

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

Only machines matching this filter will be allowed to join the node pool. The filtering language accepts strings like "name=", and is documented in more detail in AIP-160.

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

The resource name of the node pool.

Link copied to clipboard
val nodeConfig: Output<NodePoolNodeConfigArgs>? = null

Configuration for each node in the NodePool Structure is documented below.

Link copied to clipboard
val nodeCount: Output<Int>? = null

The number of nodes in the pool.

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

Name of the Google Distributed Cloud Edge zone where this node pool will be created. For example: us-central1-edge-customer-a.

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.