Skip to content

Commit

Permalink
feat: add topic_labels (#73)
Browse files Browse the repository at this point in the history
* add topic_labels

* generate README
  • Loading branch information
franciscocpg authored May 9, 2022
1 parent 59b6163 commit e00736a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Then perform the following commands on the root folder:
| region | The region in which resources will be applied. | `string` | n/a | yes |
| scheduler\_job | An existing Cloud Scheduler job instance | `object({ name = string })` | `null` | no |
| time\_zone | The timezone to use in scheduler | `string` | `"Etc/UTC"` | no |
| topic\_labels | A set of key/value label pairs to assign to the pubsub topic. | `map(string)` | `{}` | no |
| topic\_name | Name of pubsub topic connecting the scheduled job and the function | `string` | `"test-topic"` | no |
| vpc\_connector | The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects//locations//connectors/\*. | `string` | `null` | no |
| vpc\_connector\_egress\_settings | The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL\_TRAFFIC and PRIVATE\_RANGES\_ONLY. If unset, this field preserves the previously set value. | `string` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module "pubsub_topic" {
project_id = var.project_id
create_topic = var.scheduler_job == null ? true : false
grant_token_creator = var.grant_token_creator
topic_labels = var.topic_labels
}

/******************************************
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ variable "topic_name" {
default = "test-topic"
}

variable "topic_labels" {
type = map(string)
description = "A set of key/value label pairs to assign to the pubsub topic."
default = {}
}

variable "message_data" {
type = string
description = "The data to send in the topic message."
Expand Down

0 comments on commit e00736a

Please sign in to comment.