Skip to content

Commit edacaa4

Browse files
Add topic_message_retention_duration property to pubsub_topics module (#1170)
1 parent 3c7c873 commit edacaa4

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

docs/tfengine/schemas/resources.md

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
| pubsub_topics.push_subscriptions.ack_deadline_seconds | Deadline to wait for acknowledgement. | integer | false | - | - |
212212
| pubsub_topics.push_subscriptions.name | Name of subscription. | string | true | - | - |
213213
| pubsub_topics.push_subscriptions.push_endpoint | Name of endpoint to push to. | string | false | - | - |
214+
| pubsub_topics.topic_message_retention_duration | Message retention duration in seconds. | string | false | - | - |
214215
| secrets | [Module](https://www.terraform.io/docs/providers/google/r/secret_manager_secret.html) | array() | false | - | - |
215216
| secrets.resource_name | Override for Terraform resource name. If unset, defaults to normalized secret_id. Normalization will make all characters alphanumeric with underscores. | string | false | - | - |
216217
| secrets.secret_data | Data of the secret. If unset, should be manually set in the GCP console. | string | false | - | - |

examples/tfengine/generated/team/project_data/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ module "topic" {
245245
push_endpoint = "https://example.com"
246246
},
247247
]
248+
topic_message_retention_duration = "86400s"
248249
depends_on = [
249250
module.project
250251
]

examples/tfengine/modules/team.hcl

+1
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ template "project_data" {
497497
name = "pull-subscription"
498498
}
499499
]
500+
topic_message_retention_duration = "86400s"
500501
}]
501502
}
502503
terraform_addons = {

templates/tfengine/components/resources/pubsub_topics/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module "{{resourceName . "name"}}" {
3030

3131
{{hclField . "pull_subscriptions" -}}
3232
{{hclField . "push_subscriptions" -}}
33+
{{hclField . "topic_message_retention_duration" -}}
3334

3435
depends_on = [
3536
module.project

templates/tfengine/recipes/resources.hcl

+4
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,10 @@ schema = {
11401140
description = "Name of the topic."
11411141
type = "string"
11421142
}
1143+
topic_message_retention_duration = {
1144+
description = "Message retention duration in seconds."
1145+
type = "string"
1146+
}
11431147
labels = {
11441148
description = "Labels to set on the topic."
11451149
type = "object"

0 commit comments

Comments
 (0)