Instance Args
+---
subcategory: "Cloud Bigtable" description: |- Creates a Google Bigtable instance.
gcp.bigtable.Instance
Creates a Google Bigtable instance. For more information see:
How-to Guides
Example Usage
Simple Instance
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigtable.Instance;
import com.pulumi.gcp.bigtable.InstanceArgs;
import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
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) {
var production_instance = new Instance("production-instance", InstanceArgs.builder()
.clusters(InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster")
.numNodes(1)
.storageType("HDD")
.build())
.labels(Map.of("my-label", "prod-label"))
.build());
}
}
Replicated Instance
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigtable.Instance;
import com.pulumi.gcp.bigtable.InstanceArgs;
import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
import com.pulumi.gcp.bigtable.inputs.InstanceClusterAutoscalingConfigArgs;
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) {
var production_instance = new Instance("production-instance", InstanceArgs.builder()
.clusters(
InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster1")
.numNodes(1)
.storageType("HDD")
.zone("us-central1-c")
.build(),
InstanceClusterArgs.builder()
.autoscalingConfig(InstanceClusterAutoscalingConfigArgs.builder()
.cpuTarget(50)
.maxNodes(3)
.minNodes(1)
.build())
.clusterId("tf-instance-cluster2")
.storageType("HDD")
.zone("us-central1-b")
.build())
.labels(Map.of("my-label", "prod-label"))
.build());
}
}
Import
Bigtable Instances can be imported using any of these accepted formats
$ pulumi import gcp:bigtable/instance:Instance default projects/{{project}}/instances/{{name}}
$ pulumi import gcp:bigtable/instance:Instance default {{project}}/{{name}}
$ pulumi import gcp:bigtable/instance:Instance default {{name}}
Properties
A block of cluster configuration options. This can be specified at least once, and up to as many as possible within 8 cloud regions. Removing the field entirely from the config will cause the provider to default to the backend value. See structure below.
Whether or not to allow this provider to destroy the instance. Unless this field is set to false in the statefile, a pulumi destroy
or pulumi up
that would delete the instance will fail.
The human-readable display name of the Bigtable instance. Defaults to the instance name
.
The instance type to create. One of "DEVELOPMENT"
or "PRODUCTION"
. Defaults to "PRODUCTION"
. It is recommended to leave this field unspecified since the distinction between "DEVELOPMENT"
and "PRODUCTION"
instances is going away, and all instances will become "PRODUCTION"
instances. This means that new and existing "DEVELOPMENT"
instances will be converted to "PRODUCTION"
instances. It is recommended for users to use "PRODUCTION"
instances in any case, since a 1-node "PRODUCTION"
instance is functionally identical to a "DEVELOPMENT"
instance, but without the accompanying restrictions.