Skip to content

Commit

Permalink
Add notification_id to Storage Notification schema (#4879)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and nat-henderson committed Nov 13, 2019
1 parent 61161e0 commit c069962
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions google/resource_storage_notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ func resourceStorageNotification() *schema.Resource {
ForceNew: true,
},

"notification_id": {
Type: schema.TypeString,
Computed: true,
},

"self_link": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/storage_notification.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c069962

Please sign in to comment.