terraform-provider-google/website/docs/r/pubsub_topic.html.markdown
The Magician 2950923ee6 Generate Pubsub Topics/Subscriptions with MM (+add labels) (#3043)
<!-- This change is generated by MagicModules. -->
/cc @drebes
2019-02-19 15:10:44 -08:00

2.8 KiB

layout page_title sidebar_current description
google Google: google_pubsub_topic docs-google-pubsub-topic A named resource to which messages are sent by publishers.

google_pubsub_topic

A named resource to which messages are sent by publishers.

To get more information about Topic, see:

## Example Usage - Pubsub Topic Basic
resource "google_pubsub_topic" "example" {
  name = "example-topic"

  labels = {
    foo = "bar"
  }
}

Argument Reference

The following arguments are supported:

  • name - (Required) Name of the topic.

  • labels - (Optional) A set of key/value label pairs to assign to this Topic.
  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • delete - Default is 4 minutes.

Import

Topic can be imported using any of these accepted formats:

$ terraform import google_pubsub_topic.default projects/{{project}}/topics/{{name}}
$ terraform import google_pubsub_topic.default {{project}}/{{name}}
$ terraform import google_pubsub_topic.default {{name}}

-> If you're importing a resource with beta features, make sure to include -provider=google-beta as an argument so that Terraform uses the correct provider to import your resource.