Package com.hashicorp.cdktf
Class DataTerraformRemoteStateAzurermConfig.Builder
java.lang.Object
com.hashicorp.cdktf.DataTerraformRemoteStateAzurermConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateAzurermConfig>
- Enclosing interface:
DataTerraformRemoteStateAzurermConfig
@Stability(Experimental)
public static final class DataTerraformRemoteStateAzurermConfig.Builder
extends Object
implements software.amazon.jsii.Builder<DataTerraformRemoteStateAzurermConfig>
A builder for
DataTerraformRemoteStateAzurermConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofAzurermBackendConfig.getAccessKey()
build()
Builds the configured instance.clientCertificatePassword
(String clientCertificatePassword) Sets the value ofAzurermBackendConfig.getClientCertificatePassword()
clientCertificatePath
(String clientCertificatePath) Sets the value ofAzurermBackendConfig.getClientCertificatePath()
Sets the value ofAzurermBackendConfig.getClientId()
clientSecret
(String clientSecret) Sets the value ofAzurermBackendConfig.getClientSecret()
containerName
(String containerName) Sets the value ofAzurermBackendConfig.getContainerName()
Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
Sets the value ofAzurermBackendConfig.getEndpoint()
environment
(String environment) Sets the value ofAzurermBackendConfig.getEnvironment()
Sets the value ofAzurermBackendConfig.getKey()
msiEndpoint
(String msiEndpoint) Sets the value ofAzurermBackendConfig.getMsiEndpoint()
oidcRequestToken
(String oidcRequestToken) Sets the value ofAzurermBackendConfig.getOidcRequestToken()
oidcRequestUrl
(String oidcRequestUrl) Sets the value ofAzurermBackendConfig.getOidcRequestUrl()
resourceGroupName
(String resourceGroupName) Sets the value ofAzurermBackendConfig.getResourceGroupName()
Sets the value ofAzurermBackendConfig.getSasToken()
Sets the value ofAzurermBackendConfig.getSnapshot()
storageAccountName
(String storageAccountName) Sets the value ofAzurermBackendConfig.getStorageAccountName()
subscriptionId
(String subscriptionId) Sets the value ofAzurermBackendConfig.getSubscriptionId()
Sets the value ofAzurermBackendConfig.getTenantId()
useAzureadAuth
(Boolean useAzureadAuth) Sets the value ofAzurermBackendConfig.getUseAzureadAuth()
useMicrosoftGraph
(Boolean useMicrosoftGraph) Sets the value ofAzurermBackendConfig.getUseMicrosoftGraph()
Sets the value ofAzurermBackendConfig.getUseMsi()
Sets the value ofAzurermBackendConfig.getUseOidc()
Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaults
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.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 DataTerraformRemoteStateAzurermConfig.Builder workspace(String workspace) Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
- Parameters:
workspace
- the value to be set.- Returns:
this
-
containerName
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder containerName(String containerName) Sets the value ofAzurermBackendConfig.getContainerName()
- Parameters:
containerName
- (Required) The Name of the Storage Container within the Storage Account. This parameter is required.- Returns:
this
-
key
Sets the value ofAzurermBackendConfig.getKey()
- Parameters:
key
- (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. This parameter is required.- Returns:
this
-
storageAccountName
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder storageAccountName(String storageAccountName) Sets the value ofAzurermBackendConfig.getStorageAccountName()
- Parameters:
storageAccountName
- (Required) The Name of the Storage Account. This parameter is required.- Returns:
this
-
accessKey
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder accessKey(String accessKey) Sets the value ofAzurermBackendConfig.getAccessKey()
- Parameters:
accessKey
- access_key - (Optional) The Access Key used to access the Blob Storage Account. This can also be sourced from the ARM_ACCESS_KEY environment variable.- Returns:
this
-
clientCertificatePassword
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder clientCertificatePassword(String clientCertificatePassword) Sets the value ofAzurermBackendConfig.getClientCertificatePassword()
- Parameters:
clientCertificatePassword
- (Optional) The password associated with the Client Certificate specified in client_certificate_path. This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.- Returns:
this
-
clientCertificatePath
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder clientCertificatePath(String clientCertificatePath) Sets the value ofAzurermBackendConfig.getClientCertificatePath()
- Parameters:
clientCertificatePath
- (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.- Returns:
this
-
clientId
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder clientId(String clientId) Sets the value ofAzurermBackendConfig.getClientId()
- Parameters:
clientId
- (Optional) The Client ID of the Service Principal. This can also be sourced from the ARM_CLIENT_ID environment variable.- Returns:
this
-
clientSecret
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder clientSecret(String clientSecret) Sets the value ofAzurermBackendConfig.getClientSecret()
- Parameters:
clientSecret
- (Optional) The Client Secret of the Service Principal. This can also be sourced from the ARM_CLIENT_SECRET environment variable.- Returns:
this
-
endpoint
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder endpoint(String endpoint) Sets the value ofAzurermBackendConfig.getEndpoint()
- Parameters:
endpoint
- (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. NOTE: An endpoint should only be configured when using Azure Stack.- Returns:
this
-
environment
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder environment(String environment) Sets the value ofAzurermBackendConfig.getEnvironment()
- Parameters:
environment
- (Optional) The Azure Environment which should be used. This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.- Returns:
this
-
msiEndpoint
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder msiEndpoint(String msiEndpoint) Sets the value ofAzurermBackendConfig.getMsiEndpoint()
- Parameters:
msiEndpoint
- (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. This can also be sourced from the ARM_MSI_ENDPOINT environment variable.- Returns:
this
-
oidcRequestToken
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder oidcRequestToken(String oidcRequestToken) Sets the value ofAzurermBackendConfig.getOidcRequestToken()
- Parameters:
oidcRequestToken
- (Optional) The bearer token for the request to the OIDC provider. This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.- Returns:
this
-
oidcRequestUrl
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder oidcRequestUrl(String oidcRequestUrl) Sets the value ofAzurermBackendConfig.getOidcRequestUrl()
- Parameters:
oidcRequestUrl
- (Optional) The URL for the OIDC provider from which to request an ID token. This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.- Returns:
this
-
resourceGroupName
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder resourceGroupName(String resourceGroupName) Sets the value ofAzurermBackendConfig.getResourceGroupName()
- Parameters:
resourceGroupName
- (Required) The Name of the Resource Group in which the Storage Account exists.- Returns:
this
-
sasToken
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder sasToken(String sasToken) Sets the value ofAzurermBackendConfig.getSasToken()
- Parameters:
sasToken
- (Optional) The SAS Token used to access the Blob Storage Account. This can also be sourced from the ARM_SAS_TOKEN environment variable.- Returns:
this
-
snapshot
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder snapshot(Boolean snapshot) Sets the value ofAzurermBackendConfig.getSnapshot()
- Parameters:
snapshot
- (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?. Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.- Returns:
this
-
subscriptionId
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder subscriptionId(String subscriptionId) Sets the value ofAzurermBackendConfig.getSubscriptionId()
- Parameters:
subscriptionId
- (Optional) The Subscription ID in which the Storage Account exists. This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.- Returns:
this
-
tenantId
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder tenantId(String tenantId) Sets the value ofAzurermBackendConfig.getTenantId()
- Parameters:
tenantId
- (Optional) The Tenant ID in which the Subscription exists. This can also be sourced from the ARM_TENANT_ID environment variable.- Returns:
this
-
useAzureadAuth
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder useAzureadAuth(Boolean useAzureadAuth) Sets the value ofAzurermBackendConfig.getUseAzureadAuth()
- Parameters:
useAzureadAuth
- (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. This can also be sourced from the ARM_USE_AZUREAD environment variable.Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
- Returns:
this
-
useMicrosoftGraph
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder useMicrosoftGraph(Boolean useMicrosoftGraph) Sets the value ofAzurermBackendConfig.getUseMicrosoftGraph()
- Parameters:
useMicrosoftGraph
- (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?. Defaults to true.Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
- Returns:
this
-
useMsi
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder useMsi(Boolean useMsi) Sets the value ofAzurermBackendConfig.getUseMsi()
- Parameters:
useMsi
- (Optional) Should Managed Service Identity authentication be used?. This can also be sourced from the ARM_USE_MSI environment variable.- Returns:
this
-
useOidc
@Stability(Experimental) public DataTerraformRemoteStateAzurermConfig.Builder useOidc(Boolean useOidc) Sets the value ofAzurermBackendConfig.getUseOidc()
- Parameters:
useOidc
- (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStateAzurermConfig>
- Returns:
- a new instance of
DataTerraformRemoteStateAzurermConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-