Skip to content

Latest commit

 

History

History
320 lines (197 loc) · 11.4 KB

alloydb_backup.md

File metadata and controls

320 lines (197 loc) · 11.4 KB
permalink
/alloydb_backup/

alloydb_backup

alloydb_backup represents the google_alloydb_backup Terraform resource.

This package contains functions and utilities for setting up the resource using Jsonnet code.

Index

Fields

fn new

new()

google.alloydb_backup.new injects a new google_alloydb_backup 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.alloydb_backup.new('some_id')

You can get the reference to the id field of the created google.alloydb_backup using the reference:

$._ref.google_alloydb_backup.some_id.get('id')

This is the same as directly entering "${ google_alloydb_backup.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.
  • backup_id (string): The ID of the alloydb backup.
  • cluster_name (string): The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
  • description (string): User-provided description of the backup. When null, the description field will be omitted from the resulting object.
  • labels (obj): User-defined labels for the alloydb backup. When null, the labels field will be omitted from the resulting object.
  • location (string): The location where the alloydb backup should reside.
  • project (string): Set the project field on the resulting resource block. When null, the project field will be omitted from the resulting object.
  • encryption_config (list[obj]): EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). When null, the encryption_config sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.alloydb_backup.encryption_config.new constructor.
  • timeouts (obj): Set the timeouts field on the resulting resource block. When null, the timeouts sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.alloydb_backup.timeouts.new constructor.

Returns:

  • A mixin object that injects the new resource into the root Terraform configuration.

fn newAttrs

newAttrs()

google.alloydb_backup.newAttrs constructs a new object with attributes and blocks configured for the alloydb_backup Terraform resource.

Unlike google.alloydb_backup.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:

  • backup_id (string): The ID of the alloydb backup.
  • cluster_name (string): The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
  • description (string): User-provided description of the backup. When null, the description field will be omitted from the resulting object.
  • labels (obj): User-defined labels for the alloydb backup. When null, the labels field will be omitted from the resulting object.
  • location (string): The location where the alloydb backup should reside.
  • project (string): Set the project field on the resulting object. When null, the project field will be omitted from the resulting object.
  • encryption_config (list[obj]): EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). When null, the encryption_config sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.alloydb_backup.encryption_config.new constructor.
  • timeouts (obj): Set the timeouts field on the resulting object. When null, the timeouts sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.alloydb_backup.timeouts.new constructor.

Returns:

  • An attribute object that can be used with tf.withResource to construct a new alloydb_backup resource into the root Terraform configuration.

fn withBackupId

withBackupId()

google.string.withBackupId constructs a mixin object that can be merged into the string Terraform resource block to set or update the backup_id field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (string): The value to set for the backup_id field.

fn withClusterName

withClusterName()

google.string.withClusterName constructs a mixin object that can be merged into the string Terraform resource block to set or update the cluster_name field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (string): The value to set for the cluster_name field.

fn withDescription

withDescription()

google.string.withDescription constructs a mixin object that can be merged into the string Terraform resource block to set or update the description field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (string): The value to set for the description field.

fn withEncryptionConfig

withEncryptionConfig()

google.list[obj].withEncryptionConfig constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the encryption_config 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].withEncryptionConfigMixin function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the encryption_config field.

fn withEncryptionConfigMixin

withEncryptionConfigMixin()

google.list[obj].withEncryptionConfigMixin constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the encryption_config 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].withEncryptionConfig function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the encryption_config field.

fn withLabels

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 the labels field.

fn withLocation

withLocation()

google.string.withLocation constructs a mixin object that can be merged into the string Terraform resource block to set or update the location field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (string): The value to set for the location field.

fn withProject

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 the project field.

fn withTimeouts

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 the timeouts field.

fn withTimeoutsMixin

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 the timeouts field.

obj encryption_config

fn encryption_config.new

new()

google.alloydb_backup.encryption_config.new constructs a new object with attributes and blocks configured for the encryption_config Terraform sub block.

Args:

  • kms_key_name (string): The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]. When null, the kms_key_name field will be omitted from the resulting object.

Returns:

  • An attribute object that represents the encryption_config sub block.

obj timeouts

fn timeouts.new

new()

google.alloydb_backup.timeouts.new constructs a new object with attributes and blocks configured for the timeouts Terraform sub block.

Args:

  • create (string): Set the create field on the resulting object. When null, the create field will be omitted from the resulting object.
  • delete (string): Set the delete field on the resulting object. When null, the delete field will be omitted from the resulting object.
  • update (string): Set the update field on the resulting object. When null, the update field will be omitted from the resulting object.

Returns:

  • An attribute object that represents the timeouts sub block.