Package com.hashicorp.cdktf
Class DataTerraformRemoteStatePgConfig.Builder
java.lang.Object
com.hashicorp.cdktf.DataTerraformRemoteStatePgConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStatePgConfig>
- Enclosing interface:
DataTerraformRemoteStatePgConfig
@Stability(Experimental)
public static final class DataTerraformRemoteStatePgConfig.Builder
extends Object
implements software.amazon.jsii.Builder<DataTerraformRemoteStatePgConfig>
A builder for
DataTerraformRemoteStatePgConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofPgBackendConfig.getConnStr()
Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
schemaName
(String schemaName) Sets the value ofPgBackendConfig.getSchemaName()
skipIndexCreation
(Boolean skipIndexCreation) Sets the value ofPgBackendConfig.getSkipIndexCreation()
skipSchemaCreation
(Boolean skipSchemaCreation) Sets the value ofPgBackendConfig.getSkipSchemaCreation()
skipTableCreation
(Boolean skipTableCreation) Sets the value ofPgBackendConfig.getSkipTableCreation()
Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaults
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder defaults(Map<String, ? extends Object> defaults) Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
- Parameters:
defaults
- the value to be set.- Returns:
this
-
workspace
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder workspace(String workspace) Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
- Parameters:
workspace
- the value to be set.- Returns:
this
-
connStr
Sets the value ofPgBackendConfig.getConnStr()
- Parameters:
connStr
- Postgres connection string;. This parameter is required. a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.- Returns:
this
-
schemaName
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder schemaName(String schemaName) Sets the value ofPgBackendConfig.getSchemaName()
- Parameters:
schemaName
- Name of the automatically-managed Postgres schema, default to terraform_remote_state. Can also be set using the PG_SCHEMA_NAME environment variable.- Returns:
this
-
skipIndexCreation
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder skipIndexCreation(Boolean skipIndexCreation) Sets the value ofPgBackendConfig.getSkipIndexCreation()
- Parameters:
skipIndexCreation
- If set to true, the Postgres index must already exist. Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.- Returns:
this
-
skipSchemaCreation
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder skipSchemaCreation(Boolean skipSchemaCreation) Sets the value ofPgBackendConfig.getSkipSchemaCreation()
- Parameters:
skipSchemaCreation
- If set to true, the Postgres schema must already exist. Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.- Returns:
this
-
skipTableCreation
@Stability(Experimental) public DataTerraformRemoteStatePgConfig.Builder skipTableCreation(Boolean skipTableCreation) Sets the value ofPgBackendConfig.getSkipTableCreation()
- Parameters:
skipTableCreation
- If set to true, the Postgres table must already exist. Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStatePgConfig>
- Returns:
- a new instance of
DataTerraformRemoteStatePgConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-