| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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: |- |
| A Healthcare `Dataset` is a toplevel logical grouping of `dicomStores`, `fhirStores` and `hl7V2Stores`. |
| --- |
| |
| # google_healthcare_dataset |
| |
| A Healthcare `Dataset` is a toplevel logical grouping of `dicomStores`, `fhirStores` and `hl7V2Stores`. |
| |
| |
| To get more information about Dataset, see: |
| |
| * [API documentation](https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets) |
| * How-to Guides |
| * [Creating a dataset](https://cloud.google.com/healthcare/docs/how-tos/datasets) |
| |
| <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_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=healthcare_dataset_basic&open_in_editor=main.tf" 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 Dataset Basic |
| |
| |
| ```hcl |
| resource "google_healthcare_dataset" "default" { |
| name = "example-dataset" |
| location = "us-central1" |
| time_zone = "UTC" |
| } |
| ``` |
| <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_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=healthcare_dataset_cmek&open_in_editor=main.tf" 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 Dataset Cmek |
| |
| |
| ```hcl |
| data "google_project" "project" {} |
| |
| resource "google_healthcare_dataset" "default" { |
| name = "example-dataset" |
| location = "us-central1" |
| time_zone = "UTC" |
| |
| encryption_spec { |
| kms_key_name = google_kms_crypto_key.crypto_key.id |
| } |
| |
| depends_on = [ |
| google_kms_crypto_key_iam_binding.healthcare_cmek_keyuser |
| ] |
| } |
| |
| resource "google_kms_crypto_key" "crypto_key" { |
| name = "example-key" |
| key_ring = google_kms_key_ring.key_ring.id |
| purpose = "ENCRYPT_DECRYPT" |
| } |
| |
| resource "google_kms_key_ring" "key_ring" { |
| name = "example-keyring" |
| location = "us-central1" |
| } |
| |
| resource "google_kms_crypto_key_iam_binding" "healthcare_cmek_keyuser" { |
| crypto_key_id = google_kms_crypto_key.crypto_key.id |
| role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" |
| members = [ |
| "serviceAccount:service-${data.google_project.project.number}@gcp-sa-healthcare.iam.gserviceaccount.com", |
| ] |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `name` - |
| (Required) |
| The resource name for the Dataset. |
| |
| * `location` - |
| (Required) |
| The location for the Dataset. |
| |
| |
| - - - |
| |
| |
| * `time_zone` - |
| (Optional) |
| The default timezone used by this dataset. Must be a either a valid IANA time zone name such as |
| "America/New_York" or empty, which defaults to UTC. This is used for parsing times in resources |
| (e.g., HL7 messages) where no explicit timezone is specified. |
| |
| * `encryption_spec` - |
| (Optional) |
| A nested object resource |
| Structure is [documented below](#nested_encryption_spec). |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| <a name="nested_encryption_spec"></a>The `encryption_spec` block supports: |
| |
| * `kms_key_name` - |
| (Optional) |
| KMS encryption key that is used to secure this dataset and its sub-resources. The key used for |
| encryption and the dataset must be in the same location. If empty, the default Google encryption |
| key will be used to secure this dataset. The format is |
| projects/{projectId}/locations/{locationId}/keyRings/{keyRingId}/cryptoKeys/{keyId}. |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/datasets/{{name}}` |
| |
| * `self_link` - |
| The fully qualified name of this dataset |
| |
| |
| ## 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 |
| |
| |
| Dataset can be imported using any of these accepted formats: |
| |
| * `projects/{{project}}/locations/{{location}}/datasets/{{name}}` |
| * `{{project}}/{{location}}/{{name}}` |
| * `{{location}}/{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Dataset using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/locations/{{location}}/datasets/{{name}}" |
| to = google_healthcare_dataset.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Dataset can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_healthcare_dataset.default projects/{{project}}/locations/{{location}}/datasets/{{name}} |
| $ terraform import google_healthcare_dataset.default {{project}}/{{location}}/{{name}} |
| $ terraform import google_healthcare_dataset.default {{location}}/{{name}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |