Class AzurermBackend.Builder

java.lang.Object
com.hashicorp.cdktf.AzurermBackend.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AzurermBackend>
Enclosing class:
AzurermBackend

@Stability(Experimental) public static final class AzurermBackend.Builder extends Object implements software.amazon.jsii.Builder<AzurermBackend>
(experimental) A fluent builder for AzurermBackend.
  • Method Details

    • create

      @Stability(Experimental) public static AzurermBackend.Builder create(software.constructs.Construct scope)
      Parameters:
      scope - This parameter is required.
      Returns:
      a new instance of AzurermBackend.Builder.
    • containerName

      @Stability(Experimental) public AzurermBackend.Builder containerName(String containerName)
      (experimental) (Required) The Name of the Storage Container within the Storage Account.

      Parameters:
      containerName - (Required) The Name of the Storage Container within the Storage Account. This parameter is required.
      Returns:
      this
    • key

      @Stability(Experimental) public AzurermBackend.Builder key(String key)
      (experimental) (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.

      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 AzurermBackend.Builder storageAccountName(String storageAccountName)
      (experimental) (Required) The Name of the Storage Account.

      Parameters:
      storageAccountName - (Required) The Name of the Storage Account. This parameter is required.
      Returns:
      this
    • accessKey

      @Stability(Experimental) public AzurermBackend.Builder accessKey(String accessKey)
      (experimental) 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.

      Parameters:
      accessKey - access_key - (Optional) The Access Key used to access the Blob Storage Account. This parameter is required.
      Returns:
      this
    • clientCertificatePassword

      @Stability(Experimental) public AzurermBackend.Builder clientCertificatePassword(String clientCertificatePassword)
      (experimental) (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.

      Parameters:
      clientCertificatePassword - (Optional) The password associated with the Client Certificate specified in client_certificate_path. This parameter is required.
      Returns:
      this
    • clientCertificatePath

      @Stability(Experimental) public AzurermBackend.Builder clientCertificatePath(String clientCertificatePath)
      (experimental) (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.

      Parameters:
      clientCertificatePath - (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. This parameter is required.
      Returns:
      this
    • clientId

      @Stability(Experimental) public AzurermBackend.Builder clientId(String clientId)
      (experimental) (Optional) The Client ID of the Service Principal.

      This can also be sourced from the ARM_CLIENT_ID environment variable.

      Parameters:
      clientId - (Optional) The Client ID of the Service Principal. This parameter is required.
      Returns:
      this
    • clientSecret

      @Stability(Experimental) public AzurermBackend.Builder clientSecret(String clientSecret)
      (experimental) (Optional) The Client Secret of the Service Principal.

      This can also be sourced from the ARM_CLIENT_SECRET environment variable.

      Parameters:
      clientSecret - (Optional) The Client Secret of the Service Principal. This parameter is required.
      Returns:
      this
    • endpoint

      @Stability(Experimental) public AzurermBackend.Builder endpoint(String endpoint)
      (experimental) (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.

      Parameters:
      endpoint - (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. This parameter is required.
      Returns:
      this
    • environment

      @Stability(Experimental) public AzurermBackend.Builder environment(String environment)
      (experimental) (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.

      Parameters:
      environment - (Optional) The Azure Environment which should be used. This parameter is required.
      Returns:
      this
    • metadataHost

      @Stability(Experimental) public AzurermBackend.Builder metadataHost(String metadataHost)
      (experimental) (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).

      Parameters:
      metadataHost - (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). This parameter is required.
      Returns:
      this
    • msiEndpoint

      @Stability(Experimental) public AzurermBackend.Builder msiEndpoint(String msiEndpoint)
      (experimental) (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.

      Parameters:
      msiEndpoint - (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. This parameter is required.
      Returns:
      this
    • oidcRequestToken

      @Stability(Experimental) public AzurermBackend.Builder oidcRequestToken(String oidcRequestToken)
      (experimental) (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.

      Parameters:
      oidcRequestToken - (Optional) The bearer token for the request to the OIDC provider. This parameter is required.
      Returns:
      this
    • oidcRequestUrl

      @Stability(Experimental) public AzurermBackend.Builder oidcRequestUrl(String oidcRequestUrl)
      (experimental) (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.

      Parameters:
      oidcRequestUrl - (Optional) The URL for the OIDC provider from which to request an ID token. This parameter is required.
      Returns:
      this
    • oidcToken

      @Stability(Experimental) public AzurermBackend.Builder oidcToken(String oidcToken)
      (experimental) (Optional) The ID token when authenticating using OpenID Connect (OIDC).

      This can also be sourced from the ARM_OIDC_TOKEN environment variable.

      Parameters:
      oidcToken - (Optional) The ID token when authenticating using OpenID Connect (OIDC). This parameter is required.
      Returns:
      this
    • oidcTokenFilePath

      @Stability(Experimental) public AzurermBackend.Builder oidcTokenFilePath(String oidcTokenFilePath)
      (experimental) (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).

      This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.

      Parameters:
      oidcTokenFilePath - (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). This parameter is required.
      Returns:
      this
    • resourceGroupName

      @Stability(Experimental) public AzurermBackend.Builder resourceGroupName(String resourceGroupName)
      (experimental) (Required) The Name of the Resource Group in which the Storage Account exists.

      Parameters:
      resourceGroupName - (Required) The Name of the Resource Group in which the Storage Account exists. This parameter is required.
      Returns:
      this
    • sasToken

      @Stability(Experimental) public AzurermBackend.Builder sasToken(String sasToken)
      (experimental) (Optional) The SAS Token used to access the Blob Storage Account.

      This can also be sourced from the ARM_SAS_TOKEN environment variable.

      Parameters:
      sasToken - (Optional) The SAS Token used to access the Blob Storage Account. This parameter is required.
      Returns:
      this
    • snapshot

      @Stability(Experimental) public AzurermBackend.Builder snapshot(Boolean snapshot)
      (experimental) (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.

      Parameters:
      snapshot - (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?. This parameter is required.
      Returns:
      this
    • subscriptionId

      @Stability(Experimental) public AzurermBackend.Builder subscriptionId(String subscriptionId)
      (experimental) (Optional) The Subscription ID in which the Storage Account exists.

      This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.

      Parameters:
      subscriptionId - (Optional) The Subscription ID in which the Storage Account exists. This parameter is required.
      Returns:
      this
    • tenantId

      @Stability(Experimental) public AzurermBackend.Builder tenantId(String tenantId)
      (experimental) (Optional) The Tenant ID in which the Subscription exists.

      This can also be sourced from the ARM_TENANT_ID environment variable.

      Parameters:
      tenantId - (Optional) The Tenant ID in which the Subscription exists. This parameter is required.
      Returns:
      this
    • useAzureadAuth

      @Stability(Experimental) public AzurermBackend.Builder useAzureadAuth(Boolean useAzureadAuth)
      (experimental) (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.

      Parameters:
      useAzureadAuth - (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. This parameter is required.
      Returns:
      this
    • useMicrosoftGraph

      @Stability(Experimental) public AzurermBackend.Builder useMicrosoftGraph(Boolean useMicrosoftGraph)
      (experimental) (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.

      Parameters:
      useMicrosoftGraph - (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?. This parameter is required.
      Returns:
      this
    • useMsi

      @Stability(Experimental) public AzurermBackend.Builder useMsi(Boolean useMsi)
      (experimental) (Optional) Should Managed Service Identity authentication be used?

      This can also be sourced from the ARM_USE_MSI environment variable.

      Parameters:
      useMsi - (Optional) Should Managed Service Identity authentication be used?. This parameter is required.
      Returns:
      this
    • useOidc

      @Stability(Experimental) public AzurermBackend.Builder useOidc(Boolean useOidc)
      (experimental) (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).

      Parameters:
      useOidc - (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public AzurermBackend build()
      Specified by:
      build in interface software.amazon.jsii.Builder<AzurermBackend>
      Returns:
      a newly built instance of AzurermBackend.