Skip to content

Commit e00736a

Browse files
authored
feat: add topic_labels (#73)
* add topic_labels * generate README
1 parent 59b6163 commit e00736a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Then perform the following commands on the root folder:
6363
| region | The region in which resources will be applied. | `string` | n/a | yes |
6464
| scheduler\_job | An existing Cloud Scheduler job instance | `object({ name = string })` | `null` | no |
6565
| time\_zone | The timezone to use in scheduler | `string` | `"Etc/UTC"` | no |
66+
| topic\_labels | A set of key/value label pairs to assign to the pubsub topic. | `map(string)` | `{}` | no |
6667
| topic\_name | Name of pubsub topic connecting the scheduled job and the function | `string` | `"test-topic"` | no |
6768
| 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 |
6869
| 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 |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module "pubsub_topic" {
4545
project_id = var.project_id
4646
create_topic = var.scheduler_job == null ? true : false
4747
grant_token_creator = var.grant_token_creator
48+
topic_labels = var.topic_labels
4849
}
4950

5051
/******************************************

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ variable "topic_name" {
156156
default = "test-topic"
157157
}
158158

159+
variable "topic_labels" {
160+
type = map(string)
161+
description = "A set of key/value label pairs to assign to the pubsub topic."
162+
default = {}
163+
}
164+
159165
variable "message_data" {
160166
type = string
161167
description = "The data to send in the topic message."

0 commit comments

Comments
 (0)