The Consent Management API is a tool for tracking user consents and the documentation associated with the consents.
To get more information about ConsentStore, see:
resource "google_healthcare_dataset" "dataset" {
location = "us-central1"
name = "my-dataset"
}
resource "google_healthcare_consent_store" "my-consent" {
dataset = google_healthcare_dataset.dataset.id
name = "my-consent-store"
}
resource "google_healthcare_dataset" "dataset" {
location = "us-central1"
name = "my-dataset"
}
resource "google_healthcare_consent_store" "my-consent" {
dataset = google_healthcare_dataset.dataset.id
name = "my-consent-store"
enable_consent_create_on_update = true
default_consent_ttl = "90000s"
labels = {
"label1" = "labelvalue1"
}
}
resource "google_healthcare_dataset" "dataset" {
location = "us-central1"
name = "my-dataset"
}
resource "google_healthcare_consent_store" "my-consent" {
dataset = google_healthcare_dataset.dataset.id
name = "my-consent-store"
}
resource "google_service_account" "test-account" {
account_id = "my-account"
display_name = "Test Service Account"
}
resource "google_healthcare_consent_store_iam_member" "test-iam" {
dataset = google_healthcare_dataset.dataset.id
consent_store_id = google_healthcare_consent_store.my-consent.name
role = "roles/editor"
member = "serviceAccount:${google_service_account.test-account.email}"
}
The following arguments are supported:
name
-
(Required)
The name of this ConsentStore, for example:
"consent1"
dataset
-
(Required)
Identifies the dataset addressed by this request. Must be in the format
'projects/{project}/locations/{location}/datasets/{dataset}'
default_consent_ttl
-
(Optional)
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents.
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
enable_consent_create_on_update
-
(Optional)
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels
-
(Optional)
User-supplied key-value pairs used to organize Consent stores.
Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128
bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
No more than 64 labels can be associated with a given store.
An object containing a list of "key": value pairs.
Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labels
for all of the labels present on the resource.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{dataset}}/consentStores/{{name}}
terraform_labels
-
The combination of labels configured directly on the resource
and default labels configured on the provider.
effective_labels
-
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.ConsentStore can be imported using any of these accepted formats:
{{dataset}}/consentStores/{{name}}
In Terraform v1.5.0 and later, use an import
block to import ConsentStore using one of the formats above. For example:
import {
id = "{{dataset}}/consentStores/{{name}}"
to = google_healthcare_consent_store.default
}
When using the terraform import
command, ConsentStore can be imported using one of the formats above. For example:
$ terraform import google_healthcare_consent_store.default {{dataset}}/consentStores/{{name}}