Class SqlDatabaseInstanceConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • databaseVersion

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder databaseVersion​(String databaseVersion)
        Parameters:
        databaseVersion - The MySQL, PostgreSQL or SQL Server (beta) version to use. This parameter is required. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#database_version SqlDatabaseInstance#database_version}
        Returns:
        this
      • deletionProtection

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder deletionProtection​(Boolean deletionProtection)
        Parameters:
        deletionProtection - Used to block Terraform from deleting a SQL Instance. Defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#deletion_protection SqlDatabaseInstance#deletion_protection}
        Returns:
        this
      • deletionProtection

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder deletionProtection​(com.hashicorp.cdktf.IResolvable deletionProtection)
        Parameters:
        deletionProtection - Used to block Terraform from deleting a SQL Instance. Defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#deletion_protection SqlDatabaseInstance#deletion_protection}
        Returns:
        this
      • encryptionKeyName

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder encryptionKeyName​(String encryptionKeyName)
        Parameters:
        encryptionKeyName - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#encryption_key_name SqlDatabaseInstance#encryption_key_name}.
        Returns:
        this
      • id

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder id​(String id)
        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#id SqlDatabaseInstance#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.
        Returns:
        this
      • instanceType

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder instanceType​(String instanceType)
        Parameters:
        instanceType - The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED', 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#instance_type SqlDatabaseInstance#instance_type}
        Returns:
        this
      • maintenanceVersion

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder maintenanceVersion​(String maintenanceVersion)
        Parameters:
        maintenanceVersion - Maintenance version. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#maintenance_version SqlDatabaseInstance#maintenance_version}
        Returns:
        this
      • masterInstanceName

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder masterInstanceName​(String masterInstanceName)
        Parameters:
        masterInstanceName - The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#master_instance_name SqlDatabaseInstance#master_instance_name}
        Returns:
        this
      • name

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder name​(String name)
        Parameters:
        name - The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#name SqlDatabaseInstance#name}
        Returns:
        this
      • project

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder project​(String project)
        Parameters:
        project - The ID of the project in which the resource belongs. If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#project SqlDatabaseInstance#project}
        Returns:
        this
      • region

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder region​(String region)
        Parameters:
        region - The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#region SqlDatabaseInstance#region}
        Returns:
        this
      • rootPassword

        @Stability(Stable)
        public SqlDatabaseInstanceConfig.Builder rootPassword​(String rootPassword)
        Parameters:
        rootPassword - Initial root password. Required for MS SQL Server. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#root_password SqlDatabaseInstance#root_password}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder count​(Number count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Sets the value of TerraformMetaArguments.getDependsOn()
        Parameters:
        dependsOn - the value to be set.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Sets the value of TerraformMetaArguments.getForEach()
        Parameters:
        forEach - the value to be set.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Sets the value of TerraformMetaArguments.getLifecycle()
        Parameters:
        lifecycle - the value to be set.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Sets the value of TerraformMetaArguments.getProvider()
        Parameters:
        provider - the value to be set.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public SqlDatabaseInstanceConfig.Builder provisioners​(List<? extends Object> provisioners)
        Sets the value of TerraformMetaArguments.getProvisioners()
        Parameters:
        provisioners - the value to be set.
        Returns:
        this