permalink |
---|
/pubsub_topic/ |
pubsub_topic
represents the google_pubsub_topic
Terraform resource.
This package contains functions and utilities for setting up the resource using Jsonnet code.
fn new()
fn newAttrs()
fn withKmsKeyName()
fn withLabels()
fn withMessageRetentionDuration()
fn withMessageStoragePolicy()
fn withMessageStoragePolicyMixin()
fn withName()
fn withProject()
fn withSchemaSettings()
fn withSchemaSettingsMixin()
fn withTimeouts()
fn withTimeoutsMixin()
obj message_storage_policy
obj schema_settings
obj timeouts
new()
google.pubsub_topic.new
injects a new google_pubsub_topic
Terraform resource
block into the root module document.
Additionally, this inserts a private function into the _ref
attribute that generates references to attributes of the
resource. For example, if you added a new instance to the root using:
# arguments omitted for brevity
google.pubsub_topic.new('some_id')
You can get the reference to the id
field of the created google.pubsub_topic
using the reference:
$._ref.google_pubsub_topic.some_id.get('id')
This is the same as directly entering "${ google_pubsub_topic.some_id.id }"
as the value.
NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super
, self
,
or $
to refer to the root object. Instead, make an explicit outer object using local
.
Args:
resourceLabel
(string
): The name label of the block.kms_key_name
(string
): The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. Your project's PubSub service account ('service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com') must have 'roles/cloudkms.cryptoKeyEncrypterDecrypter' to use this feature. The expected format is 'projects//locations//keyRings//cryptoKeys/' Whennull
, thekms_key_name
field will be omitted from the resulting object.labels
(obj
): A set of key/value label pairs to assign to this Topic. Whennull
, thelabels
field will be omitted from the resulting object.message_retention_duration
(string
): Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. Whennull
, themessage_retention_duration
field will be omitted from the resulting object.name
(string
): Name of the topic.project
(string
): Set theproject
field on the resulting resource block. Whennull
, theproject
field will be omitted from the resulting object.message_storage_policy
(list[obj]
): Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Whennull
, themessage_storage_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.message_storage_policy.new constructor.schema_settings
(list[obj]
): Settings for validating messages published against a schema. Whennull
, theschema_settings
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.schema_settings.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting resource block. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.timeouts.new constructor.
Returns:
- A mixin object that injects the new resource into the root Terraform configuration.
newAttrs()
google.pubsub_topic.newAttrs
constructs a new object with attributes and blocks configured for the pubsub_topic
Terraform resource.
Unlike google.pubsub_topic.new, this function will not inject the resource
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withResource function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
kms_key_name
(string
): The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. Your project's PubSub service account ('service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com') must have 'roles/cloudkms.cryptoKeyEncrypterDecrypter' to use this feature. The expected format is 'projects//locations//keyRings//cryptoKeys/' Whennull
, thekms_key_name
field will be omitted from the resulting object.labels
(obj
): A set of key/value label pairs to assign to this Topic. Whennull
, thelabels
field will be omitted from the resulting object.message_retention_duration
(string
): Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. Whennull
, themessage_retention_duration
field will be omitted from the resulting object.name
(string
): Name of the topic.project
(string
): Set theproject
field on the resulting object. Whennull
, theproject
field will be omitted from the resulting object.message_storage_policy
(list[obj]
): Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Whennull
, themessage_storage_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.message_storage_policy.new constructor.schema_settings
(list[obj]
): Settings for validating messages published against a schema. Whennull
, theschema_settings
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.schema_settings.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting object. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.pubsub_topic.timeouts.new constructor.
Returns:
- An attribute object that can be used with tf.withResource to construct a new
pubsub_topic
resource into the root Terraform configuration.
withKmsKeyName()
google.string.withKmsKeyName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the kms_key_name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thekms_key_name
field.
withLabels()
google.obj.withLabels
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the labels field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thelabels
field.
withMessageRetentionDuration()
google.string.withMessageRetentionDuration
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the message_retention_duration field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for themessage_retention_duration
field.
withMessageStoragePolicy()
google.list[obj].withMessageStoragePolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the message_storage_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withMessageStoragePolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for themessage_storage_policy
field.
withMessageStoragePolicyMixin()
google.list[obj].withMessageStoragePolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the message_storage_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withMessageStoragePolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for themessage_storage_policy
field.
withName()
google.string.withName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thename
field.
withProject()
google.string.withProject
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the project field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theproject
field.
withSchemaSettings()
google.list[obj].withSchemaSettings
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the schema_settings field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withSchemaSettingsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for theschema_settings
field.
withSchemaSettingsMixin()
google.list[obj].withSchemaSettingsMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the schema_settings field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withSchemaSettings
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for theschema_settings
field.
withTimeouts()
google.obj.withTimeouts
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will replace the map with the passed in value
. If you wish to instead merge the
passed in value to the existing map, use the google.obj.withTimeoutsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withTimeoutsMixin()
google.obj.withTimeoutsMixin
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will merge the passed in value to the existing map. If you wish
to instead replace the entire map with the passed in value
, use the google.obj.withTimeouts
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
new()
google.pubsub_topic.message_storage_policy.new
constructs a new object with attributes and blocks configured for the message_storage_policy
Terraform sub block.
Args:
allowed_persistence_regions
(list
): A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
Returns:
- An attribute object that represents the
message_storage_policy
sub block.
new()
google.pubsub_topic.schema_settings.new
constructs a new object with attributes and blocks configured for the schema_settings
Terraform sub block.
Args:
encoding
(string
): The encoding of messages validated against schema. Default value: "ENCODING_UNSPECIFIED" Possible values: ["ENCODING_UNSPECIFIED", "JSON", "BINARY"] Whennull
, theencoding
field will be omitted from the resulting object.schema
(string
): The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
Returns:
- An attribute object that represents the
schema_settings
sub block.
new()
google.pubsub_topic.timeouts.new
constructs a new object with attributes and blocks configured for the timeouts
Terraform sub block.
Args:
create
(string
): Set thecreate
field on the resulting object. Whennull
, thecreate
field will be omitted from the resulting object.delete
(string
): Set thedelete
field on the resulting object. Whennull
, thedelete
field will be omitted from the resulting object.update
(string
): Set theupdate
field on the resulting object. Whennull
, theupdate
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
timeouts
sub block.