Package com.hashicorp.cdktf
Class CloudBackendConfig.Builder
java.lang.Object
com.hashicorp.cdktf.CloudBackendConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudBackendConfig>
- Enclosing interface:
CloudBackendConfig
@Stability(Experimental)
public static final class CloudBackendConfig.Builder
extends Object
implements software.amazon.jsii.Builder<CloudBackendConfig>
A builder for
CloudBackendConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCloudBackendConfig.getHostname()
organization
(String organization) Sets the value ofCloudBackendConfig.getOrganization()
Sets the value ofCloudBackendConfig.getToken()
workspaces
(NamedCloudWorkspace workspaces) Sets the value ofCloudBackendConfig.getWorkspaces()
workspaces
(TaggedCloudWorkspaces workspaces) Sets the value ofCloudBackendConfig.getWorkspaces()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
organization
Sets the value ofCloudBackendConfig.getOrganization()
- Parameters:
organization
- The name of the organization containing the workspace(s) the current configuration should use. This parameter is required.- Returns:
this
-
workspaces
@Stability(Experimental) public CloudBackendConfig.Builder workspaces(NamedCloudWorkspace workspaces) Sets the value ofCloudBackendConfig.getWorkspaces()
- Parameters:
workspaces
- A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. This parameter is required. The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:- Returns:
this
-
workspaces
@Stability(Experimental) public CloudBackendConfig.Builder workspaces(TaggedCloudWorkspaces workspaces) Sets the value ofCloudBackendConfig.getWorkspaces()
- Parameters:
workspaces
- A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. This parameter is required. The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:- Returns:
this
-
hostname
Sets the value ofCloudBackendConfig.getHostname()
- Parameters:
hostname
- The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.- Returns:
this
-
token
Sets the value ofCloudBackendConfig.getToken()
- Parameters:
token
- The token used to authenticate with Terraform Cloud. We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CloudBackendConfig>
- Returns:
- a new instance of
CloudBackendConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-