From c0699621c50c8f64711802d47fca939a5984289d Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 12 Nov 2019 18:01:40 -0800 Subject: [PATCH] Add notification_id to Storage Notification schema (#4879) Signed-off-by: Modular Magician --- google/resource_storage_notification.go | 6 ++++++ website/docs/r/storage_notification.html.markdown | 3 +++ 2 files changed, 9 insertions(+) diff --git a/google/resource_storage_notification.go b/google/resource_storage_notification.go index 05cc705e34a..fb7bfc56981 100644 --- a/google/resource_storage_notification.go +++ b/google/resource_storage_notification.go @@ -66,6 +66,11 @@ func resourceStorageNotification() *schema.Resource { ForceNew: true, }, + "notification_id": { + Type: schema.TypeString, + Computed: true, + }, + "self_link": { Type: schema.TypeString, Computed: true, @@ -122,6 +127,7 @@ func resourceStorageNotificationRead(d *schema.ResourceData, meta interface{}) e d.Set("topic", res.Topic) d.Set("object_name_prefix", res.ObjectNamePrefix) d.Set("event_types", res.EventTypes) + d.Set("notification_id", notificationID) d.Set("self_link", res.SelfLink) d.Set("custom_attributes", res.CustomAttributes) diff --git a/website/docs/r/storage_notification.html.markdown b/website/docs/r/storage_notification.html.markdown index f78dc51af6b..645956087d9 100644 --- a/website/docs/r/storage_notification.html.markdown +++ b/website/docs/r/storage_notification.html.markdown @@ -25,6 +25,7 @@ for an example of enabling notifications by granting the correct IAM permission. ```hcl resource "google_storage_notification" "notification" { + notification_id = "1" bucket = "${google_storage_bucket.bucket.name}" payload_format = "JSON_API_V1" topic = "${google_pubsub_topic.topic.name}" @@ -82,6 +83,8 @@ The following arguments are supported: In addition to the arguments listed above, the following computed attributes are exported: +* `notification_id` - The ID of the created notification. + * `self_link` - The URI of the created resource. ## Import