github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/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  ```js
    19  resource "google_pubsub_subscription" "default" {
    20    name  = "default-subscription"
    21    topic = "default-topic"
    22  
    23    ack_deadline_seconds = 20
    24  
    25    push_config {
    26      endpoint = "https://example.com/push"
    27      attributes {
    28        x-goog-version = "v1"
    29      }
    30    }
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `name` - (Required) A unique name for the resource, required by pubsub.
    39      Changing this forces a new resource to be created.
    40  
    41  * `topic` - (Required) A topic to bind this subscription to, required by pubsub.
    42      Changing this forces a new resource to be created.
    43  
    44  - - -
    45  
    46  * `ack_deadline_seconds` - (Optional) The maximum number of seconds a
    47      subscriber has to acknowledge a received message, otherwise the message is
    48      redelivered. Changing this forces a new resource to be created.
    49  
    50  * `project` - (Optional) The project in which the resource belongs. If it
    51      is not provided, the provider project is used.
    52  
    53  * `push_config` - (Optional) Block configuration for push options. More
    54      configuration options are detailed below.
    55  
    56  The optional `push_config` block supports:
    57  
    58  * `push_endpoint` - (Optional) The URL of the endpoint to which messages should
    59      be pushed. Changing this forces a new resource to be created.
    60  
    61  * `attributes` - (Optional) Key-value pairs of API supported attributes used
    62      to control aspects of the message delivery. Currently, only
    63      `x-goog-version` is supported, which controls the format of the data
    64      delivery. For more information, read [the API docs
    65      here](https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions#PushConfig.FIELDS.attributes).
    66      Changing this forces a new resource to be created.
    67  
    68  ## Attributes Reference
    69  
    70  Only the arguments listed above are exposed as attributes.