Class SqlUserConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • instance

        @Stability(Stable)
        public SqlUserConfig.Builder instance​(String instance)
        Sets the value of SqlUserConfig.getInstance()
        Parameters:
        instance - The name of the Cloud SQL instance. Changing this forces a new resource to be created. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#instance SqlUser#instance}
        Returns:
        this
      • name

        @Stability(Stable)
        public SqlUserConfig.Builder name​(String name)
        Sets the value of SqlUserConfig.getName()
        Parameters:
        name - The name of the user. Changing this forces a new resource to be created. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#name SqlUser#name}
        Returns:
        this
      • deletionPolicy

        @Stability(Stable)
        public SqlUserConfig.Builder deletionPolicy​(String deletionPolicy)
        Parameters:
        deletionPolicy - The deletion policy for the user. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. Possible values are: "ABANDON". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#deletion_policy SqlUser#deletion_policy}
        Returns:
        this
      • host

        @Stability(Stable)
        public SqlUserConfig.Builder host​(String host)
        Sets the value of SqlUserConfig.getHost()
        Parameters:
        host - The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#host SqlUser#host}
        Returns:
        this
      • id

        @Stability(Stable)
        public SqlUserConfig.Builder id​(String id)
        Sets the value of SqlUserConfig.getId()
        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#id SqlUser#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
      • password

        @Stability(Stable)
        public SqlUserConfig.Builder password​(String password)
        Sets the value of SqlUserConfig.getPassword()
        Parameters:
        password - The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#password SqlUser#password}
        Returns:
        this
      • passwordPolicy

        @Stability(Stable)
        public SqlUserConfig.Builder passwordPolicy​(SqlUserPasswordPolicy passwordPolicy)
        Parameters:
        passwordPolicy - password_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#password_policy SqlUser#password_policy}
        Returns:
        this
      • project

        @Stability(Stable)
        public SqlUserConfig.Builder project​(String project)
        Sets the value of SqlUserConfig.getProject()
        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_user#project SqlUser#project}
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public SqlUserConfig.Builder timeouts​(SqlUserTimeouts timeouts)
        Sets the value of SqlUserConfig.getTimeouts()
        Parameters:
        timeouts - timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#timeouts SqlUser#timeouts}
        Returns:
        this
      • type

        @Stability(Stable)
        public SqlUserConfig.Builder type​(String type)
        Sets the value of SqlUserConfig.getType()
        Parameters:
        type - The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#type SqlUser#type}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.Builder count​(Number count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • count

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