Table

Creates a Google Cloud Bigtable table inside an instance. For more information see the official documentation and API.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var instance = new Gcp.BigTable.Instance("instance", new Gcp.BigTable.InstanceArgs
        {
            Clusters = 
            {
                new Gcp.BigTable.Inputs.InstanceClusterArgs
                {
                    ClusterId = "tf-instance-cluster",
                    Zone = "us-central1-b",
                    NumNodes = 3,
                    StorageType = "HDD",
                },
            },
        });
        var table = new Gcp.BigTable.Table("table", new Gcp.BigTable.TableArgs
        {
            InstanceName = instance.Name,
            SplitKeys = 
            {
                "a",
                "b",
                "c",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/bigtable"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		instance, err := bigtable.NewInstance(ctx, "instance", &bigtable.InstanceArgs{
			Clusters: bigtable.InstanceClusterArray{
				&bigtable.InstanceClusterArgs{
					ClusterId:   pulumi.String("tf-instance-cluster"),
					Zone:        pulumi.String("us-central1-b"),
					NumNodes:    pulumi.Int(3),
					StorageType: pulumi.String("HDD"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = bigtable.NewTable(ctx, "table", &bigtable.TableArgs{
			InstanceName: instance.Name,
			SplitKeys: pulumi.StringArray{
				pulumi.String("a"),
				pulumi.String("b"),
				pulumi.String("c"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gcp as gcp

instance = gcp.bigtable.Instance("instance", clusters=[gcp.bigtable.InstanceClusterArgs(
    cluster_id="tf-instance-cluster",
    zone="us-central1-b",
    num_nodes=3,
    storage_type="HDD",
)])
table = gcp.bigtable.Table("table",
    instance_name=instance.name,
    split_keys=[
        "a",
        "b",
        "c",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const instance = new gcp.bigtable.Instance("instance", {clusters: [{
    clusterId: "tf-instance-cluster",
    zone: "us-central1-b",
    numNodes: 3,
    storageType: "HDD",
}]});
const table = new gcp.bigtable.Table("table", {
    instanceName: instance.name,
    splitKeys: [
        "a",
        "b",
        "c",
    ],
});

Create a Table Resource

new Table(name: string, args: TableArgs, opts?: CustomResourceOptions);
@overload
def Table(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          column_families: Optional[Sequence[TableColumnFamilyArgs]] = None,
          instance_name: Optional[str] = None,
          name: Optional[str] = None,
          project: Optional[str] = None,
          split_keys: Optional[Sequence[str]] = None)
@overload
def Table(resource_name: str,
          args: TableArgs,
          opts: Optional[ResourceOptions] = None)
func NewTable(ctx *Context, name string, args TableArgs, opts ...ResourceOption) (*Table, error)
public Table(string name, TableArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Table Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Table resource accepts the following input properties:

InstanceName string
The name of the Bigtable instance.
ColumnFamilies List<TableColumnFamilyArgs>
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
Name string
The name of the table.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SplitKeys List<string>
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
InstanceName string
The name of the Bigtable instance.
ColumnFamilies []TableColumnFamily
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
Name string
The name of the table.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SplitKeys []string
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
instanceName string
The name of the Bigtable instance.
columnFamilies TableColumnFamilyArgs[]
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
name string
The name of the table.
project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
splitKeys string[]
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
instance_name str
The name of the Bigtable instance.
column_families Sequence[TableColumnFamilyArgs]
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
name str
The name of the table.
project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
split_keys Sequence[str]
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Table resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Table Resource

Get an existing Table resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TableState, opts?: CustomResourceOptions): Table
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        column_families: Optional[Sequence[TableColumnFamilyArgs]] = None,
        instance_name: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        split_keys: Optional[Sequence[str]] = None) -> Table
func GetTable(ctx *Context, name string, id IDInput, state *TableState, opts ...ResourceOption) (*Table, error)
public static Table Get(string name, Input<string> id, TableState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ColumnFamilies List<TableColumnFamilyArgs>
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
InstanceName string
The name of the Bigtable instance.
Name string
The name of the table.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SplitKeys List<string>
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
ColumnFamilies []TableColumnFamily
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
InstanceName string
The name of the Bigtable instance.
Name string
The name of the table.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SplitKeys []string
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
columnFamilies TableColumnFamilyArgs[]
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
instanceName string
The name of the Bigtable instance.
name string
The name of the table.
project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
splitKeys string[]
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.
column_families Sequence[TableColumnFamilyArgs]
A group of columns within a table which share a common configuration. This can be specified multiple times. Structure is documented below.
instance_name str
The name of the Bigtable instance.
name str
The name of the table.
project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
split_keys Sequence[str]
A list of predefined keys to split the table on. !> Warning: Modifying the split_keys of an existing table will cause the provider to delete/recreate the entire gcp.bigtable.Table resource.

Supporting Types

TableColumnFamily

Family string
The name of the column family.
Family string
The name of the column family.
family string
The name of the column family.
family str
The name of the column family.

Import

Bigtable Tables can be imported using any of these accepted formats

 $ pulumi import gcp:bigtable/table:Table default projects/{{project}}/instances/{{instance_name}}/tables/{{name}}
 $ pulumi import gcp:bigtable/table:Table default {{project}}/{{instance_name}}/{{name}}
 $ pulumi import gcp:bigtable/table:Table default {{instance_name}}/{{name}}

The following fields can’t be read and will show diffs if set in config when imported- split_keys

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.