Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add topic kms key name variable #145

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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\_kms\_key\_name | The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. | `string` | `null` | 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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module "pubsub_topic" {
create_topic = var.scheduler_job == null ? true : false
grant_token_creator = var.grant_token_creator
topic_labels = var.topic_labels
topic_kms_key_name = var.topic_kms_key_name
}

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

variable "topic_kms_key_name" {
type = string
description = "The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic."
default = null
}

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