Skip to content

googleBigtableAppProfile

App profile is a configuration object describing how Cloud Bigtable should treat traffic from a particular end user application.

To get more information about AppProfile, see:

Example Usage - Bigtable App Profile Anycluster

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleBigtableInstanceInstance =
  new google.bigtableInstance.BigtableInstance(this, "instance", {
    cluster: [
      {
        cluster_id: "cluster-1",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-a",
      },
      {
        cluster_id: "cluster-2",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-b",
      },
      {
        cluster_id: "cluster-3",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-c",
      },
    ],
    deletion_protection: "true",
    name: "bt-instance",
  });
new google.bigtableAppProfile.BigtableAppProfile(this, "ap", {
  app_profile_id: "bt-profile",
  ignore_warnings: true,
  instance: googleBigtableInstanceInstance.name,
  multi_cluster_routing_use_any: true,
});

Example Usage - Bigtable App Profile Singlecluster

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleBigtableInstanceInstance =
  new google.bigtableInstance.BigtableInstance(this, "instance", {
    cluster: [
      {
        cluster_id: "cluster-1",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-b",
      },
    ],
    deletion_protection: "true",
    name: "bt-instance",
  });
new google.bigtableAppProfile.BigtableAppProfile(this, "ap", {
  app_profile_id: "bt-profile",
  ignore_warnings: true,
  instance: googleBigtableInstanceInstance.name,
  single_cluster_routing: [
    {
      allow_transactional_writes: true,
      cluster_id: "cluster-1",
    },
  ],
});

Example Usage - Bigtable App Profile Multicluster

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleBigtableInstanceInstance =
  new google.bigtableInstance.BigtableInstance(this, "instance", {
    cluster: [
      {
        cluster_id: "cluster-1",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-a",
      },
      {
        cluster_id: "cluster-2",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-b",
      },
      {
        cluster_id: "cluster-3",
        num_nodes: 3,
        storage_type: "HDD",
        zone: "us-central1-c",
      },
    ],
    deletion_protection: "true",
    name: "bt-instance",
  });
new google.bigtableAppProfile.BigtableAppProfile(this, "ap", {
  app_profile_id: "bt-profile",
  ignore_warnings: true,
  instance: googleBigtableInstanceInstance.name,
  multi_cluster_routing_cluster_ids: ["cluster-1", "cluster-2"],
  multi_cluster_routing_use_any: true,
});

Argument Reference

The following arguments are supported:

  • appProfileId - (Required) The unique name of the app profile in the form [AZAZ09][AZAZ09]*.

  • description - (Optional) Long form description of the use case for this app profile.

  • multiClusterRoutingUseAny - (Optional) If true, read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes consistency to improve availability.

  • singleClusterRouting - (Optional) Use a single-cluster routing policy. Structure is documented below.

  • instance - (Optional) The name of the instance to create the app profile within.

  • ignoreWarnings - (Optional) If true, ignore safety checks when deleting/updating the app profile.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

The singleClusterRouting block supports:

  • clusterId - (Required) The cluster to which read/write requests should be routed.

  • allowTransactionalWrites - (Optional) If true, CheckAndMutateRow and ReadModifyWriteRow requests are allowed by this app profile. It is unsafe to send these requests to the same table/row/column in multiple clusters.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/instances/{{instance}}/appProfiles/{{appProfileId}}

  • name - The unique name of the requested app profile. Values are of the form projects/<project>/instances/<instance>/appProfiles/<appProfileId>.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

AppProfile can be imported using any of these accepted formats:

$ terraform import google_bigtable_app_profile.default projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}
$ terraform import google_bigtable_app_profile.default {{project}}/{{instance}}/{{app_profile_id}}
$ terraform import google_bigtable_app_profile.default {{instance}}/{{app_profile_id}}

User Project Overrides

This resource supports User Project Overrides.