github.com/leeprovoost/terraform@v0.6.10-0.20160119085442-96f3f76118e7/website/source/docs/providers/google/r/pubsub_subscription.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_pubsub_subscription" 4 sidebar_current: "docs-google-pubsub-subscription" 5 description: |- 6 Creates a subscription in Google's pubsub queueing system 7 --- 8 9 # google\_pubsub\_subscripion 10 11 Creates a subscription in Google's pubsub queueing system. For more information see 12 [the official documentation](https://cloud.google.com/pubsub/docs) and 13 [API](https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions). 14 15 16 ## Example Usage 17 18 ``` 19 resource "google_pubsub_subscription" "default" { 20 name = "default-subscription" 21 topic = "default-topic" 22 ack_deadline_seconds = 20 23 push_config { 24 endpoint = "https://example.com/push" 25 attributes { 26 x-goog-version = "v1" 27 } 28 } 29 } 30 ``` 31 32 ## Argument Reference 33 34 The following arguments are supported: 35 36 * `name` - (Required) A unique name for the resource, required by pubsub. 37 Changing this forces a new resource to be created. 38 39 * `topic` - (Required) A topic to bind this subscription to, required by pubsub. 40 Changing this forces a new resource to be created. 41 42 * `ack_deadline_seconds` - (Optional) The maximum number of seconds a 43 subscriber has to acknowledge a received message, otherwise the message is 44 redelivered. Changing this forces a new resource to be created. 45 46 The optional `push_config` block supports: 47 48 * `push_endpoint` - (Optional) The URL of the endpoint to which messages should 49 be pushed. Changing this forces a new resource to be created. 50 51 * `attributes` - (Optional) Key-value pairs of API supported attributes used 52 to control aspects of the message delivery. Currently, only 53 `x-goog-version` is supported, which controls the format of the data 54 delivery. For more information, read [the API docs 55 here](https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions#PushConfig.FIELDS.attributes). 56 Changing this forces a new resource to be created.