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:
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
}
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
}
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
}
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
}
The following arguments are supported:
app_profile_id
-
(Required)
The unique name of the app profile in the form [_a-zA-Z0-9][-_.a-zA-Z0-9]*
.description
-
(Optional)
Long form description of the use case for this app profile.
multi_cluster_routing_use_any
-
(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.
single_cluster_routing
-
(Optional)
Use a single-cluster routing policy.
Structure is documented below.
standard_isolation
-
(Optional)
The standard options used for isolating this app profile's traffic from other use cases.
Structure is documented below.
instance
-
(Optional)
The name of the instance to create the app profile within.
ignore_warnings
-
(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 single_cluster_routing
block supports:
cluster_id
-
(Required)
The cluster to which read/write requests should be routed.
allow_transactional_writes
-
(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.
The standard_isolation
block supports:
priority
-
(Required)
The priority of requests sent using this app profile.
Possible values are: PRIORITY_LOW
, PRIORITY_MEDIUM
, PRIORITY_HIGH
.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/{{app_profile_id}}
name
-
The unique name of the requested app profile. Values are of the form projects/<project>/instances/<instance>/appProfiles/<appProfileId>
.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.AppProfile can be imported using any of these accepted formats:
projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}
{{project}}/{{instance}}/{{app_profile_id}}
{{instance}}/{{app_profile_id}}
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}}
This resource supports User Project Overrides.