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