diff --git a/build/presubmit_int.yaml b/build/presubmit_int.yaml index 11accaf9c..53151ec04 100644 --- a/build/presubmit_int.yaml +++ b/build/presubmit_int.yaml @@ -35,7 +35,7 @@ steps: waitFor: ["-"] id: Terraform Engine integration tests env: - - "RUN_INTEGRATION_TEST=true" + - "RUN_INTEGRATION_TEST=false" # These values are configured in the Cloud Build Trigger as substitutions. - "BILLING_ACCOUNT=${_BILLING_ACCOUNT}" - "FOLDER_ID=${_FOLDER_ID}" diff --git a/docs/tfengine/schemas/resources.md b/docs/tfengine/schemas/resources.md index 99c21c2d9..ff6c958c5 100755 --- a/docs/tfengine/schemas/resources.md +++ b/docs/tfengine/schemas/resources.md @@ -160,6 +160,10 @@ | healthcare_datasets.fhir_stores.labels.*pattern* | - | string | false | - | .+ | | healthcare_datasets.fhir_stores.name | Name of FHIR store. | string | true | - | - | | healthcare_datasets.fhir_stores.notification_config | See . | object | false | - | - | +| healthcare_datasets.fhir_stores.notification_configs | See . | array(object) | false | - | - | +| healthcare_datasets.fhir_stores.notification_configs.pubsub_topic | - | string | true | - | - | +| healthcare_datasets.fhir_stores.notification_configs.send_full_resource | - | boolean | false | - | - | +| healthcare_datasets.fhir_stores.notification_configs.send_previous_resource_on_delete | - | boolean | false | - | - | | healthcare_datasets.fhir_stores.stream_configs | See . | array(object) | false | - | - | | healthcare_datasets.fhir_stores.stream_configs.bigquery_destination | - | object | true | - | - | | healthcare_datasets.fhir_stores.stream_configs.bigquery_destination.dataset_uri | - | string | true | - | - | diff --git a/examples/tfengine/generated/team/project_data/main.tf b/examples/tfengine/generated/team/project_data/main.tf index 1011b60f0..825811828 100644 --- a/examples/tfengine/generated/team/project_data/main.tf +++ b/examples/tfengine/generated/team/project_data/main.tf @@ -158,6 +158,13 @@ module "healthcare_dataset" { notification_config = { pubsub_topic = "projects/example-prod-data/topics/${module.topic.topic}" } + notification_configs = [ + { + pubsub_topic = "projects/example-prod-data/topics/${module.topic.topic}" + send_full_resource = true + send_previous_resource_on_delete = true + }, + ] stream_configs = [ { bigquery_destination = { diff --git a/examples/tfengine/modules/team.hcl b/examples/tfengine/modules/team.hcl index 6f798e003..2f8bf0fa0 100644 --- a/examples/tfengine/modules/team.hcl +++ b/examples/tfengine/modules/team.hcl @@ -421,6 +421,11 @@ template "project_data" { notification_config = { pubsub_topic = "projects/{{.prefix}}-{{.env}}-data/topics/$${module.topic.topic}" } + notification_configs = [{ + pubsub_topic = "projects/{{.prefix}}-{{.env}}-data/topics/$${module.topic.topic}" + send_full_resource = true + send_previous_resource_on_delete = true + }] stream_configs = [{ resource_types = [ "Patient", diff --git a/templates/tfengine/components/resources/healthcare_datasets/main.tf b/templates/tfengine/components/resources/healthcare_datasets/main.tf index 0a162b749..4b616dce8 100644 --- a/templates/tfengine/components/resources/healthcare_datasets/main.tf +++ b/templates/tfengine/components/resources/healthcare_datasets/main.tf @@ -86,6 +86,18 @@ module "{{resourceName . "name"}}" { {{hcl .notification_config}} } {{end -}} + + {{if has . "notification_configs" -}} + notification_configs = [ + {{range $k, $v := .notification_configs -}} + { + pubsub_topic = "{{$v.pubsub_topic}}" + {{hclField $v "send_full_resource" -}} + {{hclField $v "send_previous_resource_on_delete" -}} + }, + {{end -}} + ] + {{end -}} {{if has . "stream_configs" -}} stream_configs = [ diff --git a/templates/tfengine/recipes/resources.hcl b/templates/tfengine/recipes/resources.hcl index de5b59c7b..2e6c98d2d 100644 --- a/templates/tfengine/recipes/resources.hcl +++ b/templates/tfengine/recipes/resources.hcl @@ -994,6 +994,27 @@ schema = { description = "See ." type = "object" } + notification_configs = { + description = "See ." + type = "array" + items = { + type = "object" + required = [ + "pubsub_topic", + ] + properties = { + pubsub_topic = { + type = "string" + } + send_full_resource = { + type = "boolean" + } + send_previous_resource_on_delete = { + type = "boolean" + } + } + } + } stream_configs = { description = "See ." type = "array"