Skip to main content

Initializers

import io.cdktn.cdktn.AzurermBackend;

AzurermBackend.Builder.create(Construct scope)
    .containerName(java.lang.String)
    .key(java.lang.String)
    .storageAccountName(java.lang.String)
//  .accessKey(java.lang.String)
//  .clientCertificatePassword(java.lang.String)
//  .clientCertificatePath(java.lang.String)
//  .clientId(java.lang.String)
//  .clientSecret(java.lang.String)
//  .endpoint(java.lang.String)
//  .environment(java.lang.String)
//  .metadataHost(java.lang.String)
//  .msiEndpoint(java.lang.String)
//  .oidcRequestToken(java.lang.String)
//  .oidcRequestUrl(java.lang.String)
//  .oidcToken(java.lang.String)
//  .oidcTokenFilePath(java.lang.String)
//  .resourceGroupName(java.lang.String)
//  .sasToken(java.lang.String)
//  .snapshot(java.lang.Boolean)
//  .subscriptionId(java.lang.String)
//  .tenantId(java.lang.String)
//  .useAzureadAuth(java.lang.Boolean)
//  .useMicrosoftGraph(java.lang.Boolean)
//  .useMsi(java.lang.Boolean)
//  .useOidc(java.lang.Boolean)
    .build();
NameTypeDescription
scopesoftware.constructs.ConstructNo description.
containerNamejava.lang.String(Required) The Name of the Storage Container within the Storage Account.
keyjava.lang.String(Required) The name of the Blob used to retrieve/store Terraform’s State file inside the Storage Container.
storageAccountNamejava.lang.String(Required) The Name of the Storage Account.
accessKeyjava.lang.Stringaccess_key - (Optional) The Access Key used to access the Blob Storage Account.
clientCertificatePasswordjava.lang.String(Optional) The password associated with the Client Certificate specified in client_certificate_path.
clientCertificatePathjava.lang.String(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
clientIdjava.lang.String(Optional) The Client ID of the Service Principal.
clientSecretjava.lang.String(Optional) The Client Secret of the Service Principal.
endpointjava.lang.String(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
environmentjava.lang.String(Optional) The Azure Environment which should be used.
metadataHostjava.lang.String(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.).
msiEndpointjava.lang.String(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
oidcRequestTokenjava.lang.String(Optional) The bearer token for the request to the OIDC provider.
oidcRequestUrljava.lang.String(Optional) The URL for the OIDC provider from which to request an ID token.
oidcTokenjava.lang.String(Optional) The ID token when authenticating using OpenID Connect (OIDC).
oidcTokenFilePathjava.lang.String(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
resourceGroupNamejava.lang.String(Required) The Name of the Resource Group in which the Storage Account exists.
sasTokenjava.lang.String(Optional) The SAS Token used to access the Blob Storage Account.
snapshotjava.lang.Boolean(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
subscriptionIdjava.lang.String(Optional) The Subscription ID in which the Storage Account exists.
tenantIdjava.lang.String(Optional) The Tenant ID in which the Subscription exists.
useAzureadAuthjava.lang.Boolean(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
useMicrosoftGraphjava.lang.Boolean(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
useMsijava.lang.Boolean(Optional) Should Managed Service Identity authentication be used?
useOidcjava.lang.Boolean(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.

scopeRequired

  • Type: software.constructs.Construct

containerNameRequired

  • Type: java.lang.String
(Required) The Name of the Storage Container within the Storage Account.

keyRequired

  • Type: java.lang.String
(Required) The name of the Blob used to retrieve/store Terraform’s State file inside the Storage Container.

storageAccountNameRequired

  • Type: java.lang.String
(Required) The Name of the Storage Account.

accessKeyOptional

  • Type: java.lang.String
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.

clientCertificatePasswordOptional

  • Type: java.lang.String
(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.

clientCertificatePathOptional

  • Type: java.lang.String
(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.

clientIdOptional

  • Type: java.lang.String
(Optional) The Client ID of the Service Principal. This can also be sourced from the ARM_CLIENT_ID environment variable.

clientSecretOptional

  • Type: java.lang.String
(Optional) The Client Secret of the Service Principal. This can also be sourced from the ARM_CLIENT_SECRET environment variable.

endpointOptional

  • Type: java.lang.String
(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.

environmentOptional

  • Type: java.lang.String
(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.

metadataHostOptional

  • Type: java.lang.String
(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.).

msiEndpointOptional

  • Type: java.lang.String
(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.

oidcRequestTokenOptional

  • Type: java.lang.String
(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.

oidcRequestUrlOptional

  • Type: java.lang.String
(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.

oidcTokenOptional

  • Type: java.lang.String
(Optional) The ID token when authenticating using OpenID Connect (OIDC). This can also be sourced from the ARM_OIDC_TOKEN environment variable.

oidcTokenFilePathOptional

  • Type: java.lang.String
(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.

resourceGroupNameOptional

  • Type: java.lang.String
(Required) The Name of the Resource Group in which the Storage Account exists.

sasTokenOptional

  • Type: java.lang.String
(Optional) The SAS Token used to access the Blob Storage Account. This can also be sourced from the ARM_SAS_TOKEN environment variable.

snapshotOptional

  • Type: java.lang.Boolean
(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.

subscriptionIdOptional

  • Type: java.lang.String
(Optional) The Subscription ID in which the Storage Account exists. This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.

tenantIdOptional

  • Type: java.lang.String
(Optional) The Tenant ID in which the Subscription exists. This can also be sourced from the ARM_TENANT_ID environment variable.

useAzureadAuthOptional

  • Type: java.lang.Boolean
(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.

useMicrosoftGraphOptional

  • Type: java.lang.Boolean
(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.

useMsiOptional

  • Type: java.lang.Boolean
(Optional) Should Managed Service Identity authentication be used? This can also be sourced from the ARM_USE_MSI environment variable.

useOidcOptional

  • Type: java.lang.Boolean
(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).

Methods

NameDescription
toStringReturns a string representation of this construct.
addOverrideNo description.
overrideLogicalIdOverrides the auto-generated logical ID with a specific ID.
resetOverrideLogicalIdResets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraformNo description.
toMetadataNo description.
toTerraformAdds this resource to the terraform JSON output.
getRemoteStateDataSourceCreates a TerraformRemoteState resource that accesses this backend.

toString

public java.lang.String toString()
Returns a string representation of this construct.

addOverride

public void addOverride(java.lang.String path, java.lang.Object value)

pathRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

overrideLogicalId

public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.

newLogicalIdRequired

  • Type: java.lang.String
The new logical ID to use for this stack element.

resetOverrideLogicalId

public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.

toHclTerraform

public java.lang.Object toHclTerraform()

toMetadata

public java.lang.Object toMetadata()

toTerraform

public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.

getRemoteStateDataSource

public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
Creates a TerraformRemoteState resource that accesses this backend.

scopeRequired

  • Type: software.constructs.Construct

nameRequired

  • Type: java.lang.String

_fromStackRequired

  • Type: java.lang.String

Static Functions

NameDescription
isConstructChecks if x is a construct.
isTerraformElementNo description.
isBackendNo description.

isConstruct

import io.cdktn.cdktn.AzurermBackend;

AzurermBackend.isConstruct(java.lang.Object x)
Checks if x is a construct. Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked. Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired

  • Type: java.lang.Object
Any object.

isTerraformElement

import io.cdktn.cdktn.AzurermBackend;

AzurermBackend.isTerraformElement(java.lang.Object x)

xRequired

  • Type: java.lang.Object

isBackend

import io.cdktn.cdktn.AzurermBackend;

AzurermBackend.isBackend(java.lang.Object x)

xRequired

  • Type: java.lang.Object

Properties

NameTypeDescription
nodesoftware.constructs.NodeThe tree node.
cdktfStackTerraformStackNo description.
fqnjava.lang.StringNo description.
friendlyUniqueIdjava.lang.StringNo description.

nodeRequired

public Node getNode();
  • Type: software.constructs.Node
The tree node.

cdktfStackRequired

public TerraformStack getCdktfStack();

fqnRequired

public java.lang.String getFqn();
  • Type: java.lang.String

friendlyUniqueIdRequired

public java.lang.String getFriendlyUniqueId();
  • Type: java.lang.String