Package com.hashicorp.cdktf
Class DataTerraformRemoteStateConsulConfig.Builder
java.lang.Object
com.hashicorp.cdktf.DataTerraformRemoteStateConsulConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateConsulConfig>
- Enclosing interface:
DataTerraformRemoteStateConsulConfig
@Stability(Experimental)
public static final class DataTerraformRemoteStateConsulConfig.Builder
extends Object
implements software.amazon.jsii.Builder<DataTerraformRemoteStateConsulConfig>
A builder for
DataTerraformRemoteStateConsulConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String accessToken) Sets the value ofConsulBackendConfig.getAccessToken()
Sets the value ofConsulBackendConfig.getAddress()
build()
Builds the configured instance.Sets the value ofConsulBackendConfig.getCaFile()
Sets the value ofConsulBackendConfig.getCertFile()
datacenter
(String datacenter) Sets the value ofConsulBackendConfig.getDatacenter()
Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
Sets the value ofConsulBackendConfig.getGzip()
Sets the value ofConsulBackendConfig.getHttpAuth()
Sets the value ofConsulBackendConfig.getKeyFile()
Sets the value ofConsulBackendConfig.getLock()
Sets the value ofConsulBackendConfig.getPath()
Sets the value ofConsulBackendConfig.getScheme()
Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaults
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.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 DataTerraformRemoteStateConsulConfig.Builder workspace(String workspace) Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
- Parameters:
workspace
- the value to be set.- Returns:
this
-
accessToken
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder accessToken(String accessToken) Sets the value ofConsulBackendConfig.getAccessToken()
- Parameters:
accessToken
- (Required) Access token. This parameter is required.- Returns:
this
-
path
Sets the value ofConsulBackendConfig.getPath()
- Parameters:
path
- (Required) Path in the Consul KV store. This parameter is required.- Returns:
this
-
address
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder address(String address) Sets the value ofConsulBackendConfig.getAddress()
- Parameters:
address
- (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. Defaults to the local agent HTTP listener.- Returns:
this
-
caFile
Sets the value ofConsulBackendConfig.getCaFile()
- Parameters:
caFile
- (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.- Returns:
this
-
certFile
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder certFile(String certFile) Sets the value ofConsulBackendConfig.getCertFile()
- Parameters:
certFile
- (Optional) A path to a PEM-encoded certificate provided to the remote agent;. requires use of key_file.- Returns:
this
-
datacenter
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder datacenter(String datacenter) Sets the value ofConsulBackendConfig.getDatacenter()
- Parameters:
datacenter
- (Optional) The datacenter to use. Defaults to that of the agent.- Returns:
this
-
gzip
Sets the value ofConsulBackendConfig.getGzip()
- Parameters:
gzip
- (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.- Returns:
this
-
httpAuth
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder httpAuth(String httpAuth) Sets the value ofConsulBackendConfig.getHttpAuth()
- Parameters:
httpAuth
- (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.- Returns:
this
-
keyFile
@Stability(Experimental) public DataTerraformRemoteStateConsulConfig.Builder keyFile(String keyFile) Sets the value ofConsulBackendConfig.getKeyFile()
- Parameters:
keyFile
- (Optional) A path to a PEM-encoded private key, required if cert_file is specified.- Returns:
this
-
lock
Sets the value ofConsulBackendConfig.getLock()
- Parameters:
lock
- (Optional) false to disable locking. This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.- Returns:
this
-
scheme
Sets the value ofConsulBackendConfig.getScheme()
- Parameters:
scheme
- (Optional) Specifies what protocol to use when talking to the given address,either http or https. SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStateConsulConfig>
- Returns:
- a new instance of
DataTerraformRemoteStateConsulConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-