Package com.pulumi.gcp.bigtable
Class Instance
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.bigtable.Instance
-
public class Instance extends com.pulumi.resources.CustomResource
## +--- subcategory: "Cloud Bigtable" description: |- Creates a Google Bigtable instance. --- # gcp.bigtable.Instance Creates a Google Bigtable instance. For more information see: * [API documentation](https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters) * How-to Guides * [Official Documentation](https://cloud.google.com/bigtable/docs) ## Example Usage ### Simple Instance ```java 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 ```java 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 ```sh $ pulumi import gcp:bigtable/instance:Instance default projects/{{project}}/instances/{{name}} ``` ```sh $ pulumi import gcp:bigtable/instance:Instance default {{project}}/{{name}} ``` ```sh $ pulumi import gcp:bigtable/instance:Instance default {{name}} ```
-
-
Constructor Summary
Constructors Constructor Description Instance(java.lang.String name)
Instance(java.lang.String name, InstanceArgs args)
Instance(java.lang.String name, InstanceArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.List<InstanceCluster>>
clusters()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
deletionProtection()
com.pulumi.core.Output<java.lang.String>
displayName()
static Instance
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InstanceState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>
instanceType()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
labels()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
project()
-
-
-
Constructor Detail
-
Instance
public Instance(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Instance
public Instance(java.lang.String name, @Nullable InstanceArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Instance
public Instance(java.lang.String name, @Nullable InstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
clusters
public com.pulumi.core.Output<java.util.List<InstanceCluster>> clusters()
- Returns:
- 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. ***
-
deletionProtection
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deletionProtection()
- Returns:
- 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.
-
displayName
public com.pulumi.core.Output<java.lang.String> displayName()
- Returns:
- The human-readable display name of the Bigtable instance. Defaults to the instance `name`.
-
instanceType
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceType()
- Returns:
- 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.
-
labels
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> labels()
- Returns:
- A set of key/value label pairs to assign to the resource. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. ***
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance. Must be 6-33 characters and must only contain hyphens, lowercase letters and numbers.
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
-
get
public static Instance get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-