Skip to main content
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally. Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/local

Initializer

import { LocalBackendConfig } from 'cdktn'

const localBackendConfig: LocalBackendConfig = { ... }

Properties

NameTypeDescription
pathstringPath where the state file is stored.
workspaceDirstring(Optional) The path to non-default workspaces.

pathOptional

public readonly path: string;
  • Type: string
  • Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.

workspaceDirOptional

public readonly workspaceDir: string;
  • Type: string
(Optional) The path to non-default workspaces.