blob: 27b4b92b3779a305dea9fc36a2cdb12bf8711b17 [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: |-
A DicomStore is a datastore inside a Healthcare dataset that conforms to the DICOM
(https://www.
---
# google\_healthcare\_dicom\_store
A DicomStore is a datastore inside a Healthcare dataset that conforms to the DICOM
(https://www.dicomstandard.org/about/) standard for Healthcare information exchange
To get more information about DicomStore, see:
* [API documentation](https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets.dicomStores)
* How-to Guides
* [Creating a DICOM store](https://cloud.google.com/healthcare/docs/how-tos/dicom)
<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_dicom_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 Dicom Store Basic
```hcl
resource "google_healthcare_dicom_store" "default" {
name = "example-dicom-store"
dataset = google_healthcare_dataset.dataset.id
notification_config {
pubsub_topic = google_pubsub_topic.topic.id
}
labels = {
label1 = "labelvalue1"
}
}
resource "google_pubsub_topic" "topic" {
name = "dicom-notifications"
}
resource "google_healthcare_dataset" "dataset" {
name = "example-dataset"
location = "us-central1"
}
```
<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_dicom_store_bq_stream&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 Dicom Store Bq Stream
```hcl
resource "google_healthcare_dicom_store" "default" {
provider = google-beta
name = "example-dicom-store"
dataset = google_healthcare_dataset.dataset.id
notification_config {
pubsub_topic = google_pubsub_topic.topic.id
}
labels = {
label1 = "labelvalue1"
}
stream_configs {
bigquery_destination {
table_uri = "bq://${google_bigquery_dataset.bq_dataset.project}.${google_bigquery_dataset.bq_dataset.dataset_id}.${google_bigquery_table.bq_table.table_id}"
}
}
}
resource "google_pubsub_topic" "topic" {
provider = google-beta
name = "dicom-notifications"
}
resource "google_healthcare_dataset" "dataset" {
provider = google-beta
name = "example-dataset"
location = "us-central1"
}
resource "google_bigquery_dataset" "bq_dataset" {
provider = google-beta
dataset_id = "dicom_bq_ds"
friendly_name = "test"
description = "This is a test description"
location = "US"
delete_contents_on_destroy = true
}
resource "google_bigquery_table" "bq_table" {
provider = google-beta
deletion_protection = false
dataset_id = google_bigquery_dataset.bq_dataset.dataset_id
table_id = "dicom_bq_tb"
}
```
## Argument Reference
The following arguments are supported:
* `name` -
(Required)
The resource name for the DicomStore.
** Changing this property may recreate the Dicom store (removing all data) **
* `dataset` -
(Required)
Identifies the dataset addressed by this request. Must be in the format
'projects/{project}/locations/{location}/datasets/{dataset}'
- - -
* `labels` -
(Optional)
User-supplied key-value pairs used to organize DICOM 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.
* `notification_config` -
(Optional)
A nested object resource
Structure is [documented below](#nested_notification_config).
* `stream_configs` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
To enable streaming to BigQuery, configure the streamConfigs object in your DICOM store.
streamConfigs is an array, so you can specify multiple BigQuery destinations. You can stream metadata from a single DICOM store to up to five BigQuery tables in a BigQuery dataset.
Structure is [documented below](#nested_stream_configs).
<a name="nested_notification_config"></a>The `notification_config` block supports:
* `pubsub_topic` -
(Required)
The Cloud Pub/Sub topic that notifications of changes are published on. Supplied by the client.
PubsubMessage.Data will contain the resource name. PubsubMessage.MessageId is the ID of this message.
It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message
was published. Notifications are only sent if the topic is non-empty. Topic names must be scoped to a
project. service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com must have publisher permissions on the given
Cloud Pub/Sub topic. Not having adequate permissions will cause the calls that send notifications to fail.
<a name="nested_stream_configs"></a>The `stream_configs` block supports:
* `bigquery_destination` -
(Required)
BigQueryDestination to include a fully qualified BigQuery table URI where DICOM instance metadata will be streamed.
Structure is [documented below](#nested_bigquery_destination).
<a name="nested_bigquery_destination"></a>The `bigquery_destination` block supports:
* `table_uri` -
(Required)
a fully qualified BigQuery table URI where DICOM instance metadata will be streamed.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `{{dataset}}/dicomStores/{{name}}`
* `self_link` -
The fully qualified name of this dataset
* `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
DicomStore can be imported using any of these accepted formats:
* `{{dataset}}/dicomStores/{{name}}`
* `{{dataset}}/{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DicomStore using one of the formats above. For example:
```tf
import {
id = "{{dataset}}/dicomStores/{{name}}"
to = google_healthcare_dicom_store.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DicomStore can be imported using one of the formats above. For example:
```
$ terraform import google_healthcare_dicom_store.default {{dataset}}/dicomStores/{{name}}
$ terraform import google_healthcare_dicom_store.default {{dataset}}/{{name}}
```