google_bigtable_app_profile

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:

Open in Cloud Shell

Example Usage - Bigtable App Profile Anycluster

resource "google_bigtable_instance" "instance" {
  name = "bt-instance"
  cluster {
    cluster_id   = "cluster-1"
    zone         = "us-central1-a"
    num_nodes    = 3
    storage_type = "HDD"
  }
  cluster {
    cluster_id   = "cluster-2"
    zone         = "us-central1-b"
    num_nodes    = 3
    storage_type = "HDD"
  }
  cluster {
    cluster_id   = "cluster-3"
    zone         = "us-central1-c"
    num_nodes    = 3
    storage_type = "HDD"
  }

  deletion_protection  = "true"
}

resource "google_bigtable_app_profile" "ap" {
  instance       = google_bigtable_instance.instance.name
  app_profile_id = "bt-profile"

  // Requests will be routed to any of the 3 clusters.
  multi_cluster_routing_use_any = true

  ignore_warnings               = true
}
Open in Cloud Shell

Example Usage - Bigtable App Profile Singlecluster

resource "google_bigtable_instance" "instance" {
  name = "bt-instance"
  cluster {
    cluster_id   = "cluster-1"
    zone         = "us-central1-b"
    num_nodes    = 3
    storage_type = "HDD"
  }

  deletion_protection  = "true"
}

resource "google_bigtable_app_profile" "ap" {
  instance       = google_bigtable_instance.instance.name
  app_profile_id = "bt-profile"

  // Requests will be routed to the following cluster.
  single_cluster_routing {
    cluster_id                 = "cluster-1"
    allow_transactional_writes = true
  }

  ignore_warnings = true
}
Open in Cloud Shell

Example Usage - Bigtable App Profile Multicluster

resource "google_bigtable_instance" "instance" {
  name = "bt-instance"
  cluster {
    cluster_id   = "cluster-1"
    zone         = "us-central1-a"
    num_nodes    = 3
    storage_type = "HDD"
  }
  cluster {
    cluster_id   = "cluster-2"
    zone         = "us-central1-b"
    num_nodes    = 3
    storage_type = "HDD"
  }
  cluster {
    cluster_id   = "cluster-3"
    zone         = "us-central1-c"
    num_nodes    = 3
    storage_type = "HDD"
  }

  deletion_protection  = "true"
}

resource "google_bigtable_app_profile" "ap" {
  instance       = google_bigtable_instance.instance.name
  app_profile_id = "bt-profile"

  // Requests will be routed to the following 2 clusters.
  multi_cluster_routing_use_any = true
  multi_cluster_routing_cluster_ids = ["cluster-1", "cluster-2"]

  ignore_warnings               = true
}
Open in Cloud Shell

Example Usage - Bigtable App Profile Priority

resource "google_bigtable_instance" "instance" {
  name = "bt-instance"
  cluster {
    cluster_id   = "cluster-1"
    zone         = "us-central1-b"
    num_nodes    = 3
    storage_type = "HDD"
  }

  deletion_protection  = "true"
}

resource "google_bigtable_app_profile" "ap" {
  instance       = google_bigtable_instance.instance.name
  app_profile_id = "bt-profile"

  // Requests will be routed to the following cluster.
  single_cluster_routing {
    cluster_id                 = "cluster-1"
    allow_transactional_writes = true
  }

  standard_isolation {
    priority = "PRIORITY_LOW"
  }

  ignore_warnings = true
}

Argument Reference

The following arguments are supported:


The single_cluster_routing block supports:

The standard_isolation block supports:

Attributes Reference

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

Timeouts

This resource provides the following Timeouts configuration options:

Import

AppProfile can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import AppProfile using one of the formats above. For example:

import {
  id = "projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}"
  to = google_bigtable_app_profile.default
}

When using the terraform import command, AppProfile can be imported using one of the formats above. For example:

$ 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.