# BigtableTable

| **Property** | **Value** |
|---|---|
| Google Cloud Service Name | Cloud Bigtable |
| Google Cloud Service Documentation | [/bigtable/docs/](https://docs.cloud.google.com/bigtable/docs) |
| Google Cloud REST Resource Name | bigtableadmin/v2/projects.instances.tables |
| Google Cloud REST Resource Documentation | <https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.tables> |
| Config Connector Resource Short Names | bigtabletable gcpbigtabletable gcpbigtabletables |
| Config Connector Service Name | bigtableadmin.googleapis.com |
| Config Connector Resource Fully Qualified Name | bigtabletables.bigtable.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | Yes |
| Supports IAM Conditions | Yes |
| Supports IAM Audit Configs | No |
| IAM External Reference Format | projects/{{project}}/instances/{{instance_name}}/tables/{{name}} |
| Config Connector Default Average Reconcile Interval In Seconds | 3600 |

## Custom Resource Definition Properties

### Annotations

| Fields ||
|---|---|
| `cnrm.cloud.google.com/project-id` |

### Spec

#### Schema

    automatedBackupPolicy:
      frequency: string
      locations:
      - string
      retentionPeriod: string
    changeStreamRetention: string
    columnFamily:
    - family: string
      type: string
    deletionProtection: string
    instanceRef:
      external: string
      name: string
      namespace: string
    resourceID: string
    splitKeys:
    - string

| Fields ||
|---|---|
| `automatedBackupPolicy` *Optional* | `object` If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled. |
| `automatedBackupPolicy.frequency` *Optional* | `string` How frequently automated backups should occur. The only supported value is 24 hours. An undefined frequency is treated as 24 hours. |
| `automatedBackupPolicy.locations` *Optional* | `list (string)` Optional. A list of Cloud Bigtable zones where automated backups are allowed to be created. If empty, automated backups will be created in all zones of the instance. Locations are in the format \`projects/{project}/locations/{zone}\`. This field can only set for tables in Enterprise Plus instances. |
| `automatedBackupPolicy.locations[]` *Optional* | `string` <br /> |
| `automatedBackupPolicy.retentionPeriod` *Optional* | `string` Required. How long the automated backups should be retained. Values must be at least 3 days and at most 90 days. |
| `changeStreamRetention` *Optional* | `string` Duration to retain change stream data for the table. Set to 0 to disable. Must be between 1 and 7 days.. |
| `columnFamily` *Optional* | `list (object)` The names of the column families that should be created immediately upon table creation, specified by name. The values that may be set are specified here. At least one column family must be specified. |
| `columnFamily[]` *Optional* | `object` <br /> |
| `columnFamily[].family` *Required\** | `string` The name of the column family. |
| `columnFamily[].type` *Optional* | `string` The type of the column family. |
| `deletionProtection` *Optional* | `string` NOTE: DeletionProtection proto field is changed from string (1.38) to bool (1.40) in cloud.google.com/go/bigtable/admin/apiv2/adminpb Set to true to make the table protected against data loss. i.e. deleting the following resources through Admin APIs are prohibited: \* The table. \* The column families in the table. \* The instance containing the table. Note one can still delete the data stored in the table through Data APIs. |
| `instanceRef` *Required* | `object` Immutable. The instance to create the table in. |
| `instanceRef.external` *Optional* | `string` A reference to an externally managed BigtableInstance resource. |
| `instanceRef.name` *Optional* | `string` The name of a BigtableInstance resource. |
| `instanceRef.namespace` *Optional* | `string` The namespace of a BigtableInstance resource. |
| `resourceID` *Optional* | `string` The BigtableTable name. If not given, the metadata.name will be used. |
| `splitKeys` *Optional* | `list (string)` A list of predefined keys to split the table on. |
| `splitKeys[]` *Optional* | `string` <br /> |

\* Field is required when parent field is specified

### Status

#### Schema

    conditions:
    - lastTransitionTime: string
      message: string
      reason: string
      status: string
      type: string
    externalRef: string
    observedGeneration: integer

| Fields ||
|---|---|
| `conditions` | `list (object)` Conditions represent the latest available observations of the object's current state. |
| `conditions[]` | `object` <br /> |
| `conditions[].lastTransitionTime` | `string` Last time the condition transitioned from one status to another. |
| `conditions[].message` | `string` Human-readable message indicating details about last transition. |
| `conditions[].reason` | `string` Unique, one-word, CamelCase reason for the condition's last transition. |
| `conditions[].status` | `string` Status is the status of the condition. Can be True, False, Unknown. |
| `conditions[].type` | `string` Type is the type of the condition. |
| `externalRef` | `string` A unique specifier for the BigtableTable resource in Google Cloud. |
| `observedGeneration` | `integer` ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |

## Sample YAML(s)

### Typical Use Case

    apiVersion: bigtable.cnrm.cloud.google.com/v1beta1
    kind: BigtableTable
    metadata:
      name: bigtabletable-sample
    spec:
      columnFamily:
      - family: family1
      - family: family2
      instanceRef:
        name: bigtabletable-dep
      splitKeys:
      - a
    ---
    apiVersion: bigtable.cnrm.cloud.google.com/v1beta1
    kind: BigtableInstance
    metadata:
      name: bigtabletable-dep
    spec:
      displayName: BigtableSample
      cluster:
      - clusterId: cluster1
        zone: us-central1-a
        numNodes: 3
      - clusterId: cluster2
        zone: us-west1-a
        numNodes: 3

> [!NOTE]
> **Note:** If you have any trouble with instantiating the resource, refer to [Troubleshoot Config Connector](https://docs.cloud.google.com/config-connector/docs/troubleshooting).