From 5014fc6dfa359f52a0e1e9b0f2aeb7054ca304ab Mon Sep 17 00:00:00 2001 From: Emily Ye Date: Tue, 12 Nov 2019 10:14:02 -0800 Subject: [PATCH 1/5] add upgrade note for iot event notification configs (#2390) --- .../docs/guides/version_3_upgrade.html.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index cd2fea300c81..78ee7349d11e 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -378,3 +378,14 @@ resource "google_project_service" "project_cloudresourcemanager" { `name` previously could have been specified by a long name (e.g. `projects/my-project/subscriptions/my-subscription`) or a shortname (e.g. `my-subscription`). `name` now must be the shortname. + + +## Resource: `google_cloudiot_registry` + +### Replace singular event notification config field with plural `event_notification_configs` + +Use the plural field `event_notification_configs` instead of +`event_notification_config`, which has now been removed. +Since the Cloud IoT API now accept multiple event notification configs for a +registry, the singular field no longer exists on the API resource and has been +removed from Terraform to prevent conflicts. From f4d50dad9379a6b7588793951698193be16f0091 Mon Sep 17 00:00:00 2001 From: Emily Ye Date: Tue, 12 Nov 2019 10:16:34 -0800 Subject: [PATCH 2/5] add topic --- .../website/docs/guides/version_3_upgrade.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 78ee7349d11e..302bd67ed2ed 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -54,6 +54,7 @@ so Terraform knows to manage them. - [Resource: `google_project_service`](#resource-google_project_service) - [Resource: `google_project_services`](#resource-google_project_services) - [Resource: `google_pubsub_subscription`](#resource-google_pubsub_subscription) +- [Resource: `google_cloudiot_registry`](#resource-google_cloudiot_registry) From c25886e96a212966715cfa73531f1ac8ee75f31a Mon Sep 17 00:00:00 2001 From: Emily Ye Date: Tue, 12 Nov 2019 10:27:50 -0800 Subject: [PATCH 3/5] add examples --- .../guides/version_3_upgrade.html.markdown | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 302bd67ed2ed..1a822980f671 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -390,3 +390,29 @@ Use the plural field `event_notification_configs` instead of Since the Cloud IoT API now accept multiple event notification configs for a registry, the singular field no longer exists on the API resource and has been removed from Terraform to prevent conflicts. + + +#### Old Config + +```hcl +resource "google_cloudiot_registry" "myregistry" { + name = "%s" + + event_notification_config = { + pubsub_topic_name = "${google_pubsub_topic.event-topic.id}" + } +} + +``` + +#### New Config + +```hcl +resource "google_cloudiot_registry" "myregistry" { + name = "%s" + + event_notification_configs = { + pubsub_topic_name = "${google_pubsub_topic.event-topic.id}" + } +} +``` \ No newline at end of file From 594dfb56bdee25c6d1bbbdb7c58bca51cb017930 Mon Sep 17 00:00:00 2001 From: Emily Ye Date: Tue, 12 Nov 2019 10:30:16 -0800 Subject: [PATCH 4/5] - = --- .../website/docs/guides/version_3_upgrade.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 1a822980f671..9c5829e4c804 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -398,7 +398,7 @@ removed from Terraform to prevent conflicts. resource "google_cloudiot_registry" "myregistry" { name = "%s" - event_notification_config = { + event_notification_config { pubsub_topic_name = "${google_pubsub_topic.event-topic.id}" } } @@ -411,7 +411,7 @@ resource "google_cloudiot_registry" "myregistry" { resource "google_cloudiot_registry" "myregistry" { name = "%s" - event_notification_configs = { + event_notification_configs { pubsub_topic_name = "${google_pubsub_topic.event-topic.id}" } } From e29c15337d8b8f57fb22b826b51c2d6fb46461ea Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 12 Nov 2019 19:33:16 +0000 Subject: [PATCH 5/5] Update tracked submodules -> HEAD on Tue Nov 12 19:33:16 UTC 2019 Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec. --- build/terraform | 2 +- build/terraform-beta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/terraform b/build/terraform index 23dad53e9497..39abbbc13da5 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 23dad53e94979080200f104e4228ba550baeb253 +Subproject commit 39abbbc13da54b8bf041a5d0cd5f4327a0f204fa diff --git a/build/terraform-beta b/build/terraform-beta index 43c722571b19..95f82e62cbfd 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 43c722571b19043e6c77c6e8f46ee42418db9d47 +Subproject commit 95f82e62cbfdc761c03eda4adfb079f6ac14d43a