mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-15 07:27:15 +00:00
2950923ee6
<!-- This change is generated by MagicModules. --> /cc @drebes
92 lines
2.8 KiB
Markdown
92 lines
2.8 KiB
Markdown
---
|
|
# ----------------------------------------------------------------------------
|
|
#
|
|
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
#
|
|
# This file is automatically generated by Magic Modules and manual
|
|
# changes will be clobbered when the file is regenerated.
|
|
#
|
|
# Please read more about how to change this file in
|
|
# .github/CONTRIBUTING.md.
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
layout: "google"
|
|
page_title: "Google: google_pubsub_topic"
|
|
sidebar_current: "docs-google-pubsub-topic"
|
|
description: |-
|
|
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:
|
|
|
|
* [API documentation](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics)
|
|
* How-to Guides
|
|
* [Managing Topics](https://cloud.google.com/pubsub/docs/admin#managing_topics)
|
|
|
|
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
|
|
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=pubsub_topic_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
|
|
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
|
|
</a>
|
|
</div>
|
|
## Example Usage - Pubsub Topic Basic
|
|
|
|
|
|
```hcl
|
|
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](/docs/configuration/resources.html#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.
|