@@ -118,6 +118,44 @@ resource "google_bigquery_dataset" "bq_dataset" {
118
118
delete_contents_on_destroy = true
119
119
}
120
120
```
121
+ <div class = " oics-button " style =" float : right ; margin : 0 0 -15px " >
122
+ <a href =" https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.jpy.wang%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=healthcare_fhir_store_notification_config&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md " target =" _blank " >
123
+ <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
124
+ </a >
125
+ </div >
126
+ ## Example Usage - Healthcare Fhir Store Notification Config
127
+
128
+
129
+ ``` hcl
130
+ resource "google_healthcare_fhir_store" "default" {
131
+ name = "example-fhir-store"
132
+ dataset = google_healthcare_dataset.dataset.id
133
+ version = "R4"
134
+
135
+ enable_update_create = false
136
+ disable_referential_integrity = false
137
+ disable_resource_versioning = false
138
+ enable_history_import = false
139
+
140
+ labels = {
141
+ label1 = "labelvalue1"
142
+ }
143
+
144
+ notification_configs {
145
+ pubsub_topic = "${google_pubsub_topic.topic.id}"
146
+ send_full_resource = true
147
+ }
148
+ }
149
+
150
+ resource "google_pubsub_topic" "topic" {
151
+ name = "fhir-notifications"
152
+ }
153
+
154
+ resource "google_healthcare_dataset" "dataset" {
155
+ name = "example-dataset"
156
+ location = "us-central1"
157
+ }
158
+ ```
121
159
122
160
## Argument Reference
123
161
@@ -206,6 +244,11 @@ The following arguments are supported:
206
244
the order of dozens of seconds) is expected before the results show up in the streaming destination.
207
245
Structure is [ documented below] ( #nested_stream_configs ) .
208
246
247
+ * ` notification_configs ` -
248
+ (Optional, [ Beta] ( https://terraform.io/docs/providers/google/guides/provider_versions.html ) )
249
+ A list of notifcation configs that configure the notification for every resource mutation in this FHIR store.
250
+ Structure is [ documented below] ( #nested_notification_configs ) .
251
+
209
252
210
253
<a name =" nested_notification_config " ></a >The ` notification_config ` block supports:
211
254
@@ -267,6 +310,25 @@ The following arguments are supported:
267
310
concept.concept but not concept.concept.concept. If not specified or set to 0, the server will use the default
268
311
value 2. The maximum depth allowed is 5.
269
312
313
+ <a name =" nested_notification_configs " ></a >The ` notification_configs ` block supports:
314
+
315
+ * ` pubsub_topic ` -
316
+ (Required)
317
+ The Cloud Pub/Sub topic that notifications of changes are published on. Supplied by the client.
318
+ PubsubMessage.Data will contain the resource name. PubsubMessage.MessageId is the ID of this message.
319
+ It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message
320
+ was published. Notifications are only sent if the topic is non-empty. Topic names must be scoped to a
321
+ project.
[email protected] must have publisher permissions on the given
322
+ Cloud Pub/Sub topic. Not having adequate permissions will cause the calls that send notifications to fail.
323
+
324
+ * ` send_full_resource ` -
325
+ (Optional)
326
+ Whether to send full FHIR resource to this Pub/Sub topic for Create and Update operation.
327
+ Note that setting this to true does not guarantee that all resources will be sent in the format of
328
+ full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be
329
+ sent. Clients should always check the "payloadType" label from a Pub/Sub message to determine whether
330
+ it needs to fetch the full resource as a separate operation.
331
+
270
332
## Attributes Reference
271
333
272
334
In addition to the arguments listed above, the following computed attributes are exported:
0 commit comments