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:

Open in Cloud Shell
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"
}
Open in Cloud Shell
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"
  }
}
Open in Cloud Shell
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:


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

ConsentStore can be imported using any of these accepted formats:

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}}