Instance class
Creates a Google Bigtable instance. For more information see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
Simple Instance
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const production_instance = new gcp.bigtable.Instance("production-instance", {
name: "tf-instance",
clusters: [{
clusterId: "tf-instance-cluster",
numNodes: 1,
storageType: "HDD",
}],
labels: {
"my-label": "prod-label",
},
});
import pulumi
import pulumi_gcp as gcp
production_instance = gcp.bigtable.Instance("production-instance",
name="tf-instance",
clusters=[{
"cluster_id": "tf-instance-cluster",
"num_nodes": 1,
"storage_type": "HDD",
}],
labels={
"my-label": "prod-label",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var production_instance = new Gcp.BigTable.Instance("production-instance", new()
{
Name = "tf-instance",
Clusters = new[]
{
new Gcp.BigTable.Inputs.InstanceClusterArgs
{
ClusterId = "tf-instance-cluster",
NumNodes = 1,
StorageType = "HDD",
},
},
Labels =
{
{ "my-label", "prod-label" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigtable"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigtable.NewInstance(ctx, "production-instance", &bigtable.InstanceArgs{
Name: pulumi.String("tf-instance"),
Clusters: bigtable.InstanceClusterArray{
&bigtable.InstanceClusterArgs{
ClusterId: pulumi.String("tf-instance-cluster"),
NumNodes: pulumi.Int(1),
StorageType: pulumi.String("HDD"),
},
},
Labels: pulumi.StringMap{
"my-label": pulumi.String("prod-label"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigtable_instance" "production-instance" {
name = "tf-instance"
clusters {
cluster_id = "tf-instance-cluster"
num_nodes = 1
storage_type = "HDD"
}
labels = {
"my-label" = "prod-label"
}
}
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.ArrayList;
import java.util.Arrays;
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()
.name("tf-instance")
.clusters(InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster")
.numNodes(1)
.storageType("HDD")
.build())
.labels(Map.of("my-label", "prod-label"))
.build());
}
}
resources:
production-instance:
type: gcp:bigtable:Instance
properties:
name: tf-instance
clusters:
- clusterId: tf-instance-cluster
numNodes: 1
storageType: HDD
labels:
my-label: prod-label
Replicated Instance
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const production_instance = new gcp.bigtable.Instance("production-instance", {
name: "tf-instance",
clusters: [
{
clusterId: "tf-instance-cluster1",
numNodes: 1,
storageType: "HDD",
zone: "us-central1-c",
},
{
clusterId: "tf-instance-cluster2",
storageType: "HDD",
zone: "us-central1-b",
autoscalingConfig: {
minNodes: 1,
maxNodes: 3,
cpuTarget: 50,
},
},
],
labels: {
"my-label": "prod-label",
},
});
import pulumi
import pulumi_gcp as gcp
production_instance = gcp.bigtable.Instance("production-instance",
name="tf-instance",
clusters=[
{
"cluster_id": "tf-instance-cluster1",
"num_nodes": 1,
"storage_type": "HDD",
"zone": "us-central1-c",
},
{
"cluster_id": "tf-instance-cluster2",
"storage_type": "HDD",
"zone": "us-central1-b",
"autoscaling_config": {
"min_nodes": 1,
"max_nodes": 3,
"cpu_target": 50,
},
},
],
labels={
"my-label": "prod-label",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var production_instance = new Gcp.BigTable.Instance("production-instance", new()
{
Name = "tf-instance",
Clusters = new[]
{
new Gcp.BigTable.Inputs.InstanceClusterArgs
{
ClusterId = "tf-instance-cluster1",
NumNodes = 1,
StorageType = "HDD",
Zone = "us-central1-c",
},
new Gcp.BigTable.Inputs.InstanceClusterArgs
{
ClusterId = "tf-instance-cluster2",
StorageType = "HDD",
Zone = "us-central1-b",
AutoscalingConfig = new Gcp.BigTable.Inputs.InstanceClusterAutoscalingConfigArgs
{
MinNodes = 1,
MaxNodes = 3,
CpuTarget = 50,
},
},
},
Labels =
{
{ "my-label", "prod-label" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigtable"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigtable.NewInstance(ctx, "production-instance", &bigtable.InstanceArgs{
Name: pulumi.String("tf-instance"),
Clusters: bigtable.InstanceClusterArray{
&bigtable.InstanceClusterArgs{
ClusterId: pulumi.String("tf-instance-cluster1"),
NumNodes: pulumi.Int(1),
StorageType: pulumi.String("HDD"),
Zone: pulumi.String("us-central1-c"),
},
&bigtable.InstanceClusterArgs{
ClusterId: pulumi.String("tf-instance-cluster2"),
StorageType: pulumi.String("HDD"),
Zone: pulumi.String("us-central1-b"),
AutoscalingConfig: &bigtable.InstanceClusterAutoscalingConfigArgs{
MinNodes: pulumi.Int(1),
MaxNodes: pulumi.Int(3),
CpuTarget: pulumi.Int(50),
},
},
},
Labels: pulumi.StringMap{
"my-label": pulumi.String("prod-label"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigtable_instance" "production-instance" {
name = "tf-instance"
clusters {
cluster_id = "tf-instance-cluster1"
num_nodes = 1
storage_type = "HDD"
zone = "us-central1-c"
}
clusters {
cluster_id = "tf-instance-cluster2"
storage_type = "HDD"
zone = "us-central1-b"
autoscaling_config = {
min_nodes = 1
max_nodes = 3
cpu_target = 50
}
}
labels = {
"my-label" = "prod-label"
}
}
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.ArrayList;
import java.util.Arrays;
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()
.name("tf-instance")
.clusters(
InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster1")
.numNodes(1)
.storageType("HDD")
.zone("us-central1-c")
.build(),
InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster2")
.storageType("HDD")
.zone("us-central1-b")
.autoscalingConfig(InstanceClusterAutoscalingConfigArgs.builder()
.minNodes(1)
.maxNodes(3)
.cpuTarget(50)
.build())
.build())
.labels(Map.of("my-label", "prod-label"))
.build());
}
}
resources:
production-instance:
type: gcp:bigtable:Instance
properties:
name: tf-instance
clusters:
- clusterId: tf-instance-cluster1
numNodes: 1
storageType: HDD
zone: us-central1-c
- clusterId: tf-instance-cluster2
storageType: HDD
zone: us-central1-b
autoscalingConfig:
minNodes: 1
maxNodes: 3
cpuTarget: 50
labels:
my-label: prod-label
Import
Bigtable Instances can be imported using any of these accepted formats:
projects/{{project}}/instances/{{name}}{{project}}/{{name}}{{name}}
When using the pulumi import command, Bigtable Instances can be imported using one of the formats above. For example:
$ 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}}
Constructors
- Instance(String name, {InstanceArgs? args, CustomResourceOptions? options})
-
Creates a new Instance.
nameThe Pulumi resource name.argsArguments used to configure this Instance. The set of arguments for Instance.optionsResource options controlling this resource's behavior. - Instance.reference(String urn)
- Creates a typed reference to an existing Instance resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
clusters
↔ Output<
List< InstanceCluster> > -
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.
latefinal
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deletionPolicy
↔ Output<
String> -
(Optional) Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE".
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
deletionProtection
↔ Output<
bool?> -
Whether or not to allow this provider to destroy the instance. Unless this field is set to false
in the statefile, a
pulumi destroyorpulumi upthat would delete the instance will fail.latefinal -
displayName
↔ Output<
String> -
The human-readable display name of the Bigtable instance. Defaults to the instance
name.latefinal -
edition
↔ Output<
String?> -
The edition of the Bigtable instance. One of "ENTERPRISE" or "ENTERPRISE_PLUS". Defaults to "ENTERPRISE". Details can be found at the Cloud Bigtable editions page.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
forceDestroy
↔ Output<
bool?> -
Deleting a BigTable instance can be blocked if any backups are present in the instance. When
forceDestroyis set to true, the Provider will delete all backups found in the BigTable instance before attempting to delete the instance itself. Defaults to false.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
instanceType
↔ Output<
String?> -
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.latefinal - isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
labels
↔ Output<
Map< String, String> ?> -
A set of key/value label pairs to assign to the resource. Label keys must follow the requirements at https://docs.cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
latefinal
-
name
↔ Output<
String> -
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.
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
A set of key/value label pairs to assign to the resource. Tags must follow the requirements at create and manage tags.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited