blob: b09a3c6117c53c504f907c08b8edb84f3a2b0782 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Cloud Healthcare"
description: |-
The Consent Management API is a tool for tracking user consents and the documentation associated with the consents.
---
# google\_healthcare\_consent\_store
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:
* [API documentation](https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets.consentStores)
* How-to Guides
* [Creating a Consent store](https://cloud.google.com/healthcare/docs/how-tos/consent)
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=healthcare_consent_store_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Healthcare Consent Store Basic
```hcl
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"
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=healthcare_consent_store_full&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Healthcare Consent Store Full
```hcl
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"
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=healthcare_consent_store_iam&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Healthcare Consent Store Iam
```hcl
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}"
}
```
## Argument Reference
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.
## Attributes Reference
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.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
ConsentStore can be imported using any of these accepted formats:
* `{{dataset}}/consentStores/{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import ConsentStore using one of the formats above. For example:
```tf
import {
id = "{{dataset}}/consentStores/{{name}}"
to = google_healthcare_consent_store.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), ConsentStore can be imported using one of the formats above. For example:
```
$ terraform import google_healthcare_consent_store.default {{dataset}}/consentStores/{{name}}
```