Class AlloydbCluster.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static AlloydbCluster.Builder create​(software.constructs.Construct scope,
                                                    String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of AlloydbCluster.Builder.
      • connection

        @Stability(Experimental)
        public AlloydbCluster.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public AlloydbCluster.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public AlloydbCluster.Builder count​(Number count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public AlloydbCluster.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public AlloydbCluster.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public AlloydbCluster.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public AlloydbCluster.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public AlloydbCluster.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public AlloydbCluster.Builder provisioners​(List<? extends Object> provisioners)
        Parameters:
        provisioners - This parameter is required.
        Returns:
        this
      • clusterId

        @Stability(Stable)
        public AlloydbCluster.Builder clusterId​(String clusterId)
        The ID of the alloydb cluster.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#cluster_id AlloydbCluster#cluster_id}

        Parameters:
        clusterId - The ID of the alloydb cluster. This parameter is required.
        Returns:
        this
      • location

        @Stability(Stable)
        public AlloydbCluster.Builder location​(String location)
        The location where the alloydb cluster should reside.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#location AlloydbCluster#location}

        Parameters:
        location - The location where the alloydb cluster should reside. This parameter is required.
        Returns:
        this
      • annotations

        @Stability(Stable)
        public AlloydbCluster.Builder annotations​(Map<String,​String> annotations)
        Annotations to allow client tools to store small amount of arbitrary data.

        This is distinct from labels. https://google.aip.dev/128 An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#annotations AlloydbCluster#annotations}

        Parameters:
        annotations - Annotations to allow client tools to store small amount of arbitrary data. This parameter is required.
        Returns:
        this
      • automatedBackupPolicy

        @Stability(Stable)
        public AlloydbCluster.Builder automatedBackupPolicy​(AlloydbClusterAutomatedBackupPolicy automatedBackupPolicy)
        automated_backup_policy block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#automated_backup_policy AlloydbCluster#automated_backup_policy}

        Parameters:
        automatedBackupPolicy - automated_backup_policy block. This parameter is required.
        Returns:
        this
      • clusterType

        @Stability(Stable)
        public AlloydbCluster.Builder clusterType​(String clusterType)
        The type of cluster. If not set, defaults to PRIMARY. Default value: "PRIMARY" Possible values: ["PRIMARY", "SECONDARY"].

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#cluster_type AlloydbCluster#cluster_type}

        Parameters:
        clusterType - The type of cluster. If not set, defaults to PRIMARY. Default value: "PRIMARY" Possible values: ["PRIMARY", "SECONDARY"]. This parameter is required.
        Returns:
        this
      • continuousBackupConfig

        @Stability(Stable)
        public AlloydbCluster.Builder continuousBackupConfig​(AlloydbClusterContinuousBackupConfig continuousBackupConfig)
        continuous_backup_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#continuous_backup_config AlloydbCluster#continuous_backup_config}

        Parameters:
        continuousBackupConfig - continuous_backup_config block. This parameter is required.
        Returns:
        this
      • databaseVersion

        @Stability(Stable)
        public AlloydbCluster.Builder databaseVersion​(String databaseVersion)
        The database engine major version.

        This is an optional field and it's populated at the Cluster creation time. This field cannot be changed after cluster creation. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#database_version AlloydbCluster#database_version}

        Parameters:
        databaseVersion - The database engine major version. This parameter is required.
        Returns:
        this
      • deletionPolicy

        @Stability(Stable)
        public AlloydbCluster.Builder deletionPolicy​(String deletionPolicy)
        Policy to determine if the cluster should be deleted forcefully.

        Deleting a cluster forcefully, deletes the cluster and all its associated instances within the cluster. Deleting a Secondary cluster with a secondary instance REQUIRES setting deletion_policy = "FORCE" otherwise an error is returned. This is needed as there is no support to delete just the secondary instance, and the only way to delete secondary instance is to delete the associated secondary cluster forcefully which also deletes the secondary instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#deletion_policy AlloydbCluster#deletion_policy}

        Parameters:
        deletionPolicy - Policy to determine if the cluster should be deleted forcefully. This parameter is required.
        Returns:
        this
      • displayName

        @Stability(Stable)
        public AlloydbCluster.Builder displayName​(String displayName)
        User-settable and human-readable display name for the Cluster.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#display_name AlloydbCluster#display_name}

        Parameters:
        displayName - User-settable and human-readable display name for the Cluster. This parameter is required.
        Returns:
        this
      • encryptionConfig

        @Stability(Stable)
        public AlloydbCluster.Builder encryptionConfig​(AlloydbClusterEncryptionConfig encryptionConfig)
        encryption_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#encryption_config AlloydbCluster#encryption_config}

        Parameters:
        encryptionConfig - encryption_config block. This parameter is required.
        Returns:
        this
      • etag

        @Stability(Stable)
        public AlloydbCluster.Builder etag​(String etag)
        For Resource freshness validation (https://google.aip.dev/154).

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#etag AlloydbCluster#etag}

        Parameters:
        etag - For Resource freshness validation (https://google.aip.dev/154). This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public AlloydbCluster.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#id AlloydbCluster#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#id AlloydbCluster#id}. This parameter is required.
        Returns:
        this
      • initialUser

        @Stability(Stable)
        public AlloydbCluster.Builder initialUser​(AlloydbClusterInitialUser initialUser)
        initial_user block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#initial_user AlloydbCluster#initial_user}

        Parameters:
        initialUser - initial_user block. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public AlloydbCluster.Builder labels​(Map<String,​String> labels)
        User-defined labels for the alloydb cluster.

        **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#labels AlloydbCluster#labels}

        Parameters:
        labels - User-defined labels for the alloydb cluster. This parameter is required.
        Returns:
        this
      • maintenanceUpdatePolicy

        @Stability(Stable)
        public AlloydbCluster.Builder maintenanceUpdatePolicy​(AlloydbClusterMaintenanceUpdatePolicy maintenanceUpdatePolicy)
        maintenance_update_policy block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#maintenance_update_policy AlloydbCluster#maintenance_update_policy}

        Parameters:
        maintenanceUpdatePolicy - maintenance_update_policy block. This parameter is required.
        Returns:
        this
      • network

        @Stability(Stable)
        public AlloydbCluster.Builder network​(String network)
        The relative resource name of the VPC network on which the instance can be accessed.

        It is specified in the following form: "projects/{projectNumber}/global/networks/{network_id}". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#network AlloydbCluster#network}

        Parameters:
        network - The relative resource name of the VPC network on which the instance can be accessed. This parameter is required.
        Returns:
        this
      • networkConfig

        @Stability(Stable)
        public AlloydbCluster.Builder networkConfig​(AlloydbClusterNetworkConfig networkConfig)
        network_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#network_config AlloydbCluster#network_config}

        Parameters:
        networkConfig - network_config block. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public AlloydbCluster.Builder project​(String project)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#project AlloydbCluster#project}.

        Parameters:
        project - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#project AlloydbCluster#project}. This parameter is required.
        Returns:
        this
      • pscConfig

        @Stability(Stable)
        public AlloydbCluster.Builder pscConfig​(AlloydbClusterPscConfig pscConfig)
        psc_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#psc_config AlloydbCluster#psc_config}

        Parameters:
        pscConfig - psc_config block. This parameter is required.
        Returns:
        this
      • restoreBackupSource

        @Stability(Stable)
        public AlloydbCluster.Builder restoreBackupSource​(AlloydbClusterRestoreBackupSource restoreBackupSource)
        restore_backup_source block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#restore_backup_source AlloydbCluster#restore_backup_source}

        Parameters:
        restoreBackupSource - restore_backup_source block. This parameter is required.
        Returns:
        this
      • restoreContinuousBackupSource

        @Stability(Stable)
        public AlloydbCluster.Builder restoreContinuousBackupSource​(AlloydbClusterRestoreContinuousBackupSource restoreContinuousBackupSource)
        restore_continuous_backup_source block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#restore_continuous_backup_source AlloydbCluster#restore_continuous_backup_source}

        Parameters:
        restoreContinuousBackupSource - restore_continuous_backup_source block. This parameter is required.
        Returns:
        this
      • secondaryConfig

        @Stability(Stable)
        public AlloydbCluster.Builder secondaryConfig​(AlloydbClusterSecondaryConfig secondaryConfig)
        secondary_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#secondary_config AlloydbCluster#secondary_config}

        Parameters:
        secondaryConfig - secondary_config block. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public AlloydbCluster.Builder timeouts​(AlloydbClusterTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/alloydb_cluster#timeouts AlloydbCluster#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this