diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 23bc4a1a09..21df94864d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -6,6 +6,6 @@ contact_links: - name: ❓ Question url: https://discuss.hashicorp.com/c/terraform-core/cdk-for-terraform/47 about: 🙋 For usage questions that may not require a core maintainer to answer, post in our community forum - - name: Terraform Cloud/Enterprise Troubleshooting + - name: HCP Terraform/Terraform Enterprise Troubleshooting url: https://support.hashicorp.com/hc/en-us/requests/new - about: For issues related to the Terraform Cloud/Enterprise platform, please submit a HashiCorp support request or email tf-cloud@hashicorp.support + about: For issues related to the HCP Terraform/Terraform Enterprise platform, please submit a HashiCorp support request or email tf-cloud@hashicorp.support diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 4f71b0f796..45344552cb 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -4,4 +4,4 @@ If you have questions about CDK for Terraform (CDKTF) usage, please feel free to ## Enterprise/Commercial Support -If you are an existing Terraform Enterprise or Terraform Cloud for Business customer, please submit a HashiCorp support request or email tf-cloud@hashicorp.support +If you are an existing Terraform Enterprise or HCP Terraform for Business customer, please submit a HashiCorp support request or email tf-cloud@hashicorp.support diff --git a/examples/python/aws-eks/README.md b/examples/python/aws-eks/README.md index b7c2587df2..b33b1589ce 100644 --- a/examples/python/aws-eks/README.md +++ b/examples/python/aws-eks/README.md @@ -19,7 +19,7 @@ Commands: cdktf diff [OPTIONS] Perform a diff (terraform plan) for the given stack cdktf get [OPTIONS] Generate CDK Constructs for Terraform providers and modules. cdktf init [OPTIONS] Create a new cdktf project from a template. - cdktf login Retrieves an API token to connect to Terraform Cloud. + cdktf login Retrieves an API token to connect to HCP Terraform. cdktf synth [OPTIONS] Synthesizes Terraform code for the given app in a directory. ``` diff --git a/website/data/cdktf-nav-data.json b/website/data/cdktf-nav-data.json index b4701e49af..bae9e137a7 100644 --- a/website/data/cdktf-nav-data.json +++ b/website/data/cdktf-nav-data.json @@ -108,8 +108,8 @@ "path": "create-and-deploy/environment-variables" }, { - "title": "Terraform Cloud", - "path": "create-and-deploy/terraform-cloud" + "title": "HCP Terraform", + "path": "create-and-deploy/hcp-terraform" }, { "title": "Deployment Patterns", diff --git a/website/docs/cdktf/cli-reference/commands.mdx b/website/docs/cdktf/cli-reference/commands.mdx index 9f1cb83524..1d29e1c227 100644 --- a/website/docs/cdktf/cli-reference/commands.mdx +++ b/website/docs/cdktf/cli-reference/commands.mdx @@ -474,7 +474,7 @@ $ cdktf init --template="typescript" --from-terraform-project /path/to/terraform ## login -This command helps log in to Terraform Cloud by fetching a Terraform Cloud API token. +This command helps log in to HCP Terraform by fetching a HCP Terraform API token. ```bash $ cdktf login --help @@ -510,7 +510,7 @@ Please note that we currently expect custom TFE instances to be using the `https **Examples** -Fetch an API token from Terraform Cloud. +Fetch an API token from HCP Terraform. ```bash $ cdktf login diff --git a/website/docs/cdktf/concepts/assets.mdx b/website/docs/cdktf/concepts/assets.mdx index 2a17e676b9..7499ab9e47 100644 --- a/website/docs/cdktf/concepts/assets.mdx +++ b/website/docs/cdktf/concepts/assets.mdx @@ -20,7 +20,7 @@ Assets are especially useful for: The following example uses `TerraformAsset` to upload the contents of the specified directory into an S3 Bucket. The `TerraformAsset` is responsible for making sure the directory ends up in the correct output folder as a zip file that the `S3BucketObject` can reference. -The stack output directory in `cdktf.out` contains all of the assets that `TerraformAsset` needs. This is important for workflows where you use synthesized configurations with Terraform directly. For example, you would only need to upload the contents of the stack output folder to Terraform Cloud or Terraform Enterprise. +The stack output directory in `cdktf.out` contains all of the assets that `TerraformAsset` needs. This is important for workflows where you use synthesized configurations with Terraform directly. For example, you would only need to upload the contents of the stack output folder to HCP Terraform or Terraform Enterprise. diff --git a/website/docs/cdktf/concepts/remote-backends.mdx b/website/docs/cdktf/concepts/remote-backends.mdx index 34b294d4e0..97dbf9f7c4 100644 --- a/website/docs/cdktf/concepts/remote-backends.mdx +++ b/website/docs/cdktf/concepts/remote-backends.mdx @@ -9,9 +9,9 @@ description: >- Terraform stores [state](/terraform/language/state) about managed infrastructure to map real-world resources to the configuration, keep track of metadata, and improve performance. Terraform stores this state in a local file by default, but you can also use a Terraform [remote backend](/terraform/language/settings/backends/remote) to store state remotely. -By default, `cdktf init` will configure a Terraform Cloud workspace and a corresponding remote backend to store state for the new project. If you run `cdktf init --local` to configure your new project to use a local backend to store state, you can still [migrate the state](#migrate-local-state-storage-to-remote) to a remote backend later. +By default, `cdktf init` will configure a HCP Terraform workspace and a corresponding remote backend to store state for the new project. If you run `cdktf init --local` to configure your new project to use a local backend to store state, you can still [migrate the state](#migrate-local-state-storage-to-remote) to a remote backend later. -You can configure your CDK for Terraform (CDKTF) remote backend to be [Terraform Cloud](https://cloud.hashicorp.com/products/terraform), another Terraform [supported backend](#supported-backends), or a custom location. +You can configure your CDK for Terraform (CDKTF) remote backend to be [HCP Terraform](https://cloud.hashicorp.com/products/terraform), another Terraform [supported backend](#supported-backends), or a custom location. ## When to Use Remote Backends @@ -345,7 +345,7 @@ func main() { -3. Run `cdktf diff --migrate-state` to migrate the state into Terraform Cloud / Terraform Enterprise. +3. Run `cdktf diff --migrate-state` to migrate the state into HCP Terraform or Terraform Enterprise. ```bash Initializing Terraform Cloud... @@ -372,7 +372,7 @@ func main() { # Supported Backends -In addition to Terraform Cloud, Terraform and CDKTF support the following backends. +In addition to HCP Terraform, Terraform and CDKTF support the following backends. - [local](/terraform/language/settings/backends/local) ```typescript diff --git a/website/docs/cdktf/concepts/stacks.mdx b/website/docs/cdktf/concepts/stacks.mdx index e62d32ab59..d863e90271 100644 --- a/website/docs/cdktf/concepts/stacks.mdx +++ b/website/docs/cdktf/concepts/stacks.mdx @@ -840,7 +840,7 @@ Accessing a value from a different stack causes the value to be exported as `Ter The value is then accessed through a `TerraformRemoteState` in the target stack. Both are automatically added to the respective stacks to make the process seemless. -When you are using Terraform Cloud, each stack must be its own workspace. +When you are using HCP Terraform, each stack must be its own workspace. This means that you need to create a separate workspace for each stack and you need to [set the permissions to allow access between the stacks](/terraform/cloud-docs/workspaces/state#remote-state-access-controls). ### Stack Dependencies diff --git a/website/docs/cdktf/concepts/variables-and-outputs.mdx b/website/docs/cdktf/concepts/variables-and-outputs.mdx index 4071c036a3..fad17ccfd4 100644 --- a/website/docs/cdktf/concepts/variables-and-outputs.mdx +++ b/website/docs/cdktf/concepts/variables-and-outputs.mdx @@ -21,7 +21,7 @@ You can define [Terraform variables](/terraform/language/values/variables) as in ### When to use Input Variables -Variables are useful when you plan to synthesize your CDKTF application into a JSON configuration file for Terraform. For example, when you are planning to store configurations and run Terraform inside [Terraform Cloud](https://cloud.hashicorp.com/products/terraform). +Variables are useful when you plan to synthesize your CDKTF application into a JSON configuration file for Terraform. For example, when you are planning to store configurations and run Terraform inside [HCP Terraform](https://cloud.hashicorp.com/products/terraform). If you plan to use CDKTF to manage your infrastructure, we recommend using your language's APIs to consume the data you would normally pass through Terraform variables. You can read from disk (synchronously) or from the environment variables, just as you would in any normal program. diff --git a/website/docs/cdktf/create-and-deploy/best-practices.mdx b/website/docs/cdktf/create-and-deploy/best-practices.mdx index 2d360dbebc..d6840d012a 100644 --- a/website/docs/cdktf/create-and-deploy/best-practices.mdx +++ b/website/docs/cdktf/create-and-deploy/best-practices.mdx @@ -27,7 +27,7 @@ new MyResource(this, "hello", { To pass a [Terraform variable through environment variables](/terraform/cli/config/environment-variables#tf_var_name), name the environment variable `TF_VAR_NAME`. For example, set `TF_VAR_adminPassword=''` in the execution environment. -If you use Terraform Cloud with [remote execution](/terraform/cloud-docs/run/remote-operations#remote-operations), you can store your secrets in Terraform Cloud. Refer to the Terraform Cloud documentation about [workspace variables](/terraform/cloud-docs/workspaces/variables/managing-variables#workspace-specific-variables) for more details. +If you use HCP Terraform with [remote execution](/terraform/cloud-docs/run/remote-operations#remote-operations), you can store your secrets in HCP Terraform. Refer to the HCP Terraform documentation about [workspace variables](/terraform/cloud-docs/workspaces/variables/managing-variables#workspace-specific-variables) for more details. We recommend using `TerraformVariable` only at the Stack level. Nesting them in custom constructs makes the interface unclear because some information may be passed into the constructor of the construct, while other data may be passed through a `TerraformVariable`. Nesting also changes the logical ID and makes it difficult to understand which `TerraformVariable` instances you must configure for the CDKTF program to run. diff --git a/website/docs/cdktf/create-and-deploy/deployment-patterns.mdx b/website/docs/cdktf/create-and-deploy/deployment-patterns.mdx index 89c2f651e9..dc8d8b51fd 100644 --- a/website/docs/cdktf/create-and-deploy/deployment-patterns.mdx +++ b/website/docs/cdktf/create-and-deploy/deployment-patterns.mdx @@ -10,7 +10,7 @@ You can configure your Continuous Integration/Continuous Deployment (CI/CD) envi ## Deployment Methods -You can provision your infrastructure using either CDKTF CLI commands (e.g., `cdktf deploy`) or by synthesizing your application into a Terraform configuration file and using Terraform directly. Both approaches allow you to use Terraform Cloud and integrate with a CI/CD pipeline. +You can provision your infrastructure using either CDKTF CLI commands (e.g., `cdktf deploy`) or by synthesizing your application into a Terraform configuration file and using Terraform directly. Both approaches allow you to use HCP Terraform and integrate with a CI/CD pipeline. ### Run CDKTF CLI Commands @@ -22,13 +22,13 @@ We recommend using [CDKTF CLI commands](/terraform/cdktf/cli-reference/commands) ### Run `cdktf synth` and Use Terraform Directly -We recommend synthesizing your CDKTF application and using Terraform directly when you need to integrate into existing Terraform workflows. Your organization may already use Terraform Cloud or have integrated Terraform into CI pipelines. In these cases, you may want to run `cdktf synth` and set the output folder to a particular directory that you can reference in your existing workflows. +We recommend synthesizing your CDKTF application and using Terraform directly when you need to integrate into existing Terraform workflows. Your organization may already use HCP Terraform or have integrated Terraform into CI pipelines. In these cases, you may want to run `cdktf synth` and set the output folder to a particular directory that you can reference in your existing workflows. -## Using Terraform Cloud +## Using HCP Terraform -Terraform Cloud lets you review the current state of your infrastructure and run progress in the Terraform Cloud UI. You can also use Terraform Cloud as the source of secrets. +HCP Terraform lets you review the current state of your infrastructure and run progress in the HCP Terraform UI. You can also use HCP Terraform as the source of secrets. -Refer to [Set Up CDKTF With Terraform Cloud](/terraform/cdktf/create-and-deploy/terraform-cloud#set-up-cdktf-with-terraform-cloud) for details. Refer to [Example Workflows](#example-workflows) for several examples of connecting your CDKTF application to Terraform Cloud and using Terraform Cloud in a Continuous Integration pipeline. +Refer to [Set Up CDKTF With HCP Terraform](/terraform/cdktf/create-and-deploy/hcp-terraform#set-up-cdktf-with-hcp-terraform) for details. Refer to [Example Workflows](#example-workflows) for several examples of connecting your CDKTF application to HCP Terraform and using HCP Terraform in a Continuous Integration pipeline. ## Managing Secrets and Sensitive Data @@ -38,26 +38,26 @@ You should [read secrets with Terraform Variables](/terraform/cdktf/create-and-d The following examples demonstrate common deployment workflows for your CDKTF application. -### Deploy with Terraform and Terraform Cloud +### Deploy with Terraform and HCP Terraform -Connect your synthesized CDKTF configuration to a Terraform Cloud workspace with the following steps: +Connect your synthesized CDKTF configuration to a HCP Terraform workspace with the following steps: 1. Add a pre-commit step in your CDKTF application that runs `cdktf synth`. This creates Terraform configuration files in the `cdktf.out/stacks/` directory. -2. [Configure the VCS integration](/terraform/cloud-docs/workspaces/settings/vcs) for a Terraform cloud workspace to point to the directory with the synthesized configuration files. To deploy multiple independent stacks, configure one Terraform Cloud workspace to point to the output directory for each stack. +2. [Configure the VCS integration](/terraform/cloud-docs/workspaces/settings/vcs) for a HCP Terraform workspace to point to the directory with the synthesized configuration files. To deploy multiple independent stacks, configure one HCP Terraform workspace to point to the output directory for each stack. -Refer to [Automatic Run Triggering](/terraform/cloud-docs/workspaces/settings/vcs#automatic-run-triggering) in the Terraform Cloud documentation for details about how to trigger Terraform runs from merges and commits. +Refer to [Automatic Run Triggering](/terraform/cloud-docs/workspaces/settings/vcs#automatic-run-triggering) in the HCP Terraform documentation for details about how to trigger Terraform runs from merges and commits. ### Terraform CDK GitHub Action -You can use the [Terraform CDK GitHub Action](https://github.com/marketplace/actions/terraform-cdk-action) if you are using GitHub Actions and you want a default review / deployment workflow. The Terraform CDK GitHub Action runs the CDKTF CLI under the hood, it comments Terraform plans on your pull requests and provides a default review workflow. If you need more customization, refer to [GitHub Actions CI and Terraform Cloud](#github-actions-ci-and-terraform-cloud). +You can use the [Terraform CDK GitHub Action](https://github.com/marketplace/actions/terraform-cdk-action) if you are using GitHub Actions and you want a default review / deployment workflow. The Terraform CDK GitHub Action runs the CDKTF CLI under the hood, it comments Terraform plans on your pull requests and provides a default review workflow. If you need more customization, refer to [GitHub Actions CI and HCP Terraform](#github-actions-ci-and-hcp-terraform). -### GitHub Actions CI and Terraform Cloud +### GitHub Actions CI and HCP Terraform -Set the `TERRAFORM_CLOUD_TOKEN` environment variable to the [Terraform Cloud API token](/terraform/cloud-docs/users-teams-organizations/api-tokens). This allows the CDKTF stacks `CloudBackend` to connect to Terraform Cloud. +Set the `TERRAFORM_CLOUD_TOKEN` environment variable to the [HCP Terraform API token](/terraform/cloud-docs/users-teams-organizations/api-tokens). This allows the CDKTF stacks `CloudBackend` to connect to HCP Terraform. You must create a job like this for every stack so that you can pass the stack name into `cdktf diff `. None of the stacks can depend on each other because Terraform cannot reason about which stacks must be launched first to respect these dependencies. -The following example shows a GitHub Actions configuration where the CDKTF application is deployed from the `main` branch and uses Terraform Cloud. You could store this file in `.github/workflows/cdktf-deploy.yml`. +The following example shows a GitHub Actions configuration where the CDKTF application is deployed from the `main` branch and uses HCP Terraform. You could store this file in `.github/workflows/cdktf-deploy.yml`. ```yaml name: CDKTF Deployment diff --git a/website/docs/cdktf/create-and-deploy/environment-variables.mdx b/website/docs/cdktf/create-and-deploy/environment-variables.mdx index 1782f0ec25..47a7997543 100644 --- a/website/docs/cdktf/create-and-deploy/environment-variables.mdx +++ b/website/docs/cdktf/create-and-deploy/environment-variables.mdx @@ -9,17 +9,17 @@ description: >- Use these environment variables to configure CDK for Terraform (CDKTF) behavior. -| Variable Name | Description | Default | -| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -| CDKTF_DISABLE_PLUGIN_CACHE_ENV | If set to `true` or `1`, CDKTF disables the [plugin cache](/terraform/cli/config/config-file#provider-plugin-cache). Otherwise, CDKTF creates the plugin cache directory in `~/.terraform.d/plugin-cache` if it is not already present. | | -| GITHUB_API_TOKEN_CDKTF | If set, the `provider add` and `provider update` command will use this token for authenticated requests to Github when looking for pre-built provider packages for Go. | | -| CDKTF_HOME | Where CDKTF should store cache and configuration files. | `~/.cdktf` | -| CDKTF_LOG_FILE_DIRECTORY | The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at the level specified in `CDKTF_LOG_LEVEL`. | standard out | -| CDKTF_LOG_LEVEL | Controls how much log information CDKTF prints to the console. You can set it to one of the following values: `all`, `debug`, `info`, `warn`, `error`, `fatal`, `off`. | `warn` | -| CHECKPOINT_DISABLE | If set to any value, CDKTF will not send [telemetry](/terraform/cdktf/telemetry) data. | | -| DISABLE_VERSION_CHECK | If set to `true` or `1`, CDKTF will not perform a version check. If it is not set, CDKTF verifies that your installed library version matches the CLI version. If they do not match, CDKTF displays a warning. | | -| FORCE_COLOR | If set to `0`, CDKTF disables colored CLI output. Refer to [`chalk` documentation](https://github.com/chalk/chalk#supportscolor) for other supported values. | | -| HTTP_PROXY or http_proxy | The proxy that CDKTF should use for all HTTP requests. | | -| TERRAFORM_BINARY_NAME | The Terraform binary that CDKTF should use. | The Terraform binary in path | -| TF_TOKEN_app_terraform_io | The token CDKTF should use to authenticate with Terrafrom Cloud. Must be set to a valid [Terraform Cloud API token](/terraform/cloud-docs/users-teams-organizations/api-tokens). In case of TFE app_terraform_io would be your hostname. | | -| CI | If set to `true` or `1`, CDKTF will run in a non-interactive CI mode. | | +| Variable Name | Description | Default | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| CDKTF_DISABLE_PLUGIN_CACHE_ENV | If set to `true` or `1`, CDKTF disables the [plugin cache](/terraform/cli/config/config-file#provider-plugin-cache). Otherwise, CDKTF creates the plugin cache directory in `~/.terraform.d/plugin-cache` if it is not already present. | | +| GITHUB_API_TOKEN_CDKTF | If set, the `provider add` and `provider update` command will use this token for authenticated requests to Github when looking for pre-built provider packages for Go. | | +| CDKTF_HOME | Where CDKTF should store cache and configuration files. | `~/.cdktf` | +| CDKTF_LOG_FILE_DIRECTORY | The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at the level specified in `CDKTF_LOG_LEVEL`. | standard out | +| CDKTF_LOG_LEVEL | Controls how much log information CDKTF prints to the console. You can set it to one of the following values: `all`, `debug`, `info`, `warn`, `error`, `fatal`, `off`. | `warn` | +| CHECKPOINT_DISABLE | If set to any value, CDKTF will not send [telemetry](/terraform/cdktf/telemetry) data. | | +| DISABLE_VERSION_CHECK | If set to `true` or `1`, CDKTF will not perform a version check. If it is not set, CDKTF verifies that your installed library version matches the CLI version. If they do not match, CDKTF displays a warning. | | +| FORCE_COLOR | If set to `0`, CDKTF disables colored CLI output. Refer to [`chalk` documentation](https://github.com/chalk/chalk#supportscolor) for other supported values. | | +| HTTP_PROXY or http_proxy | The proxy that CDKTF should use for all HTTP requests. | | +| TERRAFORM_BINARY_NAME | The Terraform binary that CDKTF should use. | The Terraform binary in path | +| TF_TOKEN_app_terraform_io | The token CDKTF should use to authenticate with Terrafrom Cloud. Must be set to a valid [HCP Terraform API token](/terraform/cloud-docs/users-teams-organizations/api-tokens). In case of TFE app_terraform_io would be your hostname. | | +| CI | If set to `true` or `1`, CDKTF will run in a non-interactive CI mode. | | diff --git a/website/docs/cdktf/create-and-deploy/hcp-terraform.mdx b/website/docs/cdktf/create-and-deploy/hcp-terraform.mdx new file mode 100644 index 0000000000..a0eddb34f9 --- /dev/null +++ b/website/docs/cdktf/create-and-deploy/hcp-terraform.mdx @@ -0,0 +1,185 @@ +--- +page_title: Connect to HCP Terraform / Terraform Enterprise - CDK for Terraform +description: >- + Use HCP Terraform with CDKTF to store Terraform state remotely, manage secrets, apply policies, and more. +--- + +# Connect to HCP Terraform / Terraform Enterprise + +This page explains how to connect HCP Terraform / Terraform Enterprise to your CDK for Terraform (CDKTF) application and the benefits of using these products together. + +> **Hands On:** Try our [Get Started - HCP Terraform](/terraform/tutorials/cloud-get-started) tutorials. + +## What are HCP Terraform and Terraform Enterprise? + +CDKTF supports [HCP Terraform](https://cloud.hashicorp.com/products/terraform) and [Terraform Enterprise](/terraform/enterprise). + +HCP Terraform is a SaaS application that runs Terraform in a stable, remote environment and securely stores state and secrets. It includes a user interface that helps you better understand your Terraform operations and resources, allows you to define role-based access controls, and offers a private registry for sharing [modules](/terraform/cdktf/concepts/modules) and [providers](/terraform/cdktf/concepts/providers). HCP Terraform also integrates with the Terraform CLI and connects to common version control systems (VCS) like GitHub, GitLab, and Bitbucket. When you connect a HCP Terraform workspace to a VCS repository, new commits and changes can automatically trigger Terraform plans. HCP Terraform also offers an API, allowing you to integrate it into existing workflows. + +Terraform Enterprise lets you set up a self-hosted distribution of HCP Terraform and is ideal for organizations with strict security and compliance requirements. + +## When to use HCP Terraform or Terraform Enterprise? + +Terraform uses persisted state data to keep track of the real-world resources it manages. By default, Terraform writes state to a local file. We recommend integrating with HCP Terraform to store state remotely. This prevents accidental loss of locally stored state and lets multiple people access the state data so they can work together on that collection of infrastructure resources. + +Other benefits of HCP Terraform and Terraform Enterprise include the ability to run Terraform remotely, [manage variables and secrets](#managing-variables-and-secrets), and enforce [policies for sets of infrastructure](#policy-enforcement). + +## Set up CDKTF with HCP Terraform / Terraform Enterprise + +After you sign up for a [HCP Terraform Account](https://app.terraform.io/public/signup/account) / create an account in your Terraform Enterprise instance, you must connect your CDKTF project to one or more [workspaces](/terraform/cloud-docs/workspaces). + +Workspaces function like working directories for distinct Terraform configurations and are associated with a Terraform configuration and its state file. They can also contain variables that you can use to manage credentials. + +Workspaces can have one of three workflows that determine how HCP Terraform / Enterprise interacts with your CDKTF application: CLI-driven, Version control, or API-driven (a more advanced option). + +### CLI-driven Workflow + +You can configure the HCP Terraform [CLI-driven workflow](/terraform/cloud-docs/run/cli) for both new and existing CDKTF projects. This workflow lets you run CDKTF CLI commands to deploy your application and run Terraform operations remotely on HCP Terraform / Enterprise. + +#### Connect New CDKTF Projects + +First use `cdktf login` to log into HCP Terraform or your Terraform Enterprise instance: + + + + + This command will take you through an interactive session to log in. + + ```shell-session + $ cdktf login + ``` + + If you already have a HCP Terraform API token, you can pass it into stdin: + + ```shell-session + cat my-token.txt | cdktf login + ``` + + + + + + This command will take you through an interactive session to log in. + + ```shell-session + $ cdktf login --tfe-hostname tfe.my-company.com + ``` + + If you already have a Terraform Enterprise API token, you can pass it into stdin: + + ```shell-session + cat my-token.txt | cdktf login --tfe-hostname tfe.my-company.com + ``` + + + + +1. Run `cdktf init` without passing the `--local` flag. This creates a new template CDKTF project for your chosen programming language. It will be the basis for a new application with the necessary file structure for you to start defining infrastructure. If you're using Terraform Enterprise, you must also pass the `--tfe-hostname` flag with the hostname of your enterprise instance. +2. Choose a project language and provide a project name and description. +3. Select a HCP Terraform organization and a name for your workspace. CDKTF will create a [CloudBackend](/terraform/cli/cloud/settings#the-cloud-block) in your project. +4. You can choose whether to send crash reports to the CDKTF team and select the providers you want to use. + +CDKTF creates both a scaffolded project in your chosen language and a new HCP Terraform workspace on first apply. Your project is connected to the workspace and you can begin using CDKTF and HCP Terraform together. +By default, the workspace is set to Remote execution mode, which means Terraform runs remotely on HCP Terraform / Enterprise. If you want Terraform to run locally, you need to set the workspace to [Local Execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode). + +#### Connect Existing CDKTF Projects + +For existing projects, do the following: + +1. Create a HCP Terraform workspace with the CLI-driven workflow. +2. Add the `RemoteBackend` to your CDKTF application. The following example connects the application to a HCP Terraform / Enterprise workspace called `my-app-prod`. + + ```typescript + import { Construct } from "constructs"; + import { App, TerraformStack, RemoteBackend } from "cdktf"; + + class MyStack extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + // Remote Backend - /docs/backends/types/remote.html + new RemoteBackend(this, { + // Only required for self-hosted Terraform Enterprise instances. + // Defaults to "app.terraform.io". + hostname: "app.terraform.io", + organization: "company", + + workspaces: { + name: "my-app-prod", + }, + }); + + // define resources here + } + } + + const app = new App(); + const myStack = new MyStack(app, "my-stack"); + // You can also define the backend outside of the stack. + // new RemoteBackend(myStack, { + // hostname: "app.terraform.io", + // organization: "company", + + // workspaces: { + // name: "my-app-prod", + // }, + // }); + // You must configure the RemoteBackend before the app.synth() call + app.synth(); + ``` + +3. Run `cdktf login` / `cdktf login --tfe-hostname=tfe.my-company.com` and log in to HCP Terraform / Enterprise. + +Your CDKTF application is connected to the HCP Terraform / Enterprise workspace you specified in the `RemoteBackend`. You must set the workspace to [Remote Execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) if you want to store state and run Terraform operations remotely. + +### VCS-driven Workflow + +Check your synthesized code into version control and connect your HCP Terraform / Terraform Enterprise workspace to that repository with the VCS-driven workflow. You can configure the workspace to trigger Terraform runs based on merges and commits to the repository. Refer to [Deployment Patterns](/terraform/cdktf/create-and-deploy/deployment-patterns#deploy-with-terraform-and-hcp-terraform) for more details about how to use CDKTF with the VCS-driven workflow. + +## Managing Variables and Secrets + +HCP Terraform / Terraform Enterprise [variables](/terraform/cloud-docs/workspaces/variables) let you define the variables and secrets that Terraform uses during remote operations. You can set variables specifically for each workspace or you can create variable sets to reuse the same variables across multiple workspaces. For example, you could define a variable set of provider credentials and automatically apply it to all of the workspaces using that provider. + +To use variables, set your workspace to [Remote Execution Mode](/terraform/cloud-docs/workspaces/settings#execution-mode). Terraform can only access workspace variables when executing remotely on HCP Terraform / Enterprise. + +2. Use the `TerraformVariable` construct to declare variables in your CDKTF application. This creates an undefined [Terraform input variable](/terraform/language/values/variables). The following example demonstrates how to create a `TerraformVariable` called `my-var`. + + ```typescript + import { Construct } from "constructs"; + import { App, TerraformStack, TerraformVariable } from "cdktf"; + + class MyStack extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + // You can define 'my-var' in HCP Terraform and use the value in your application. + const value = new TerraformVariable(this, "my-var", { + default: "The default value to use", + description: "", + nullable: false, // if passing no + sensitive: true, + type: "string", + }); + + // define resources here + } + } + ``` + +3. Add variables that you declared in your CDKTF application to your HCP Terraform / Enterprise workspace. Refer to [Add a Variable](/terraform/cloud-docs/workspaces/variables/managing-variables#add-a-variable) for details. This lets Terraform access the value during operations. + +### Variable Return Values + +The return value for `TerraformVariable` is an object with various representations of the value as attributes. You can pass this object as a string with `value.stringValue`, as a number with `value.numberValue`, or as a list with `value.listValue`. + +This means that there is no actual value in the variable field when CDKTF synthesizes your application. Instead, CDKTF uses a [Token](/terraform/cdktf/concepts/tokens), which represents a value that is unknown until Terraform applies your configuration. You cannot use tokens in dynamic checks during runtime. For example, `if (value.listValue.length > 42) {` always returns `false` because tokenized lists have a static length of one item. + +## Continuous Integration + +To run HCP Terraform / Terraform Enterprise in a CI workflow, you can either use [HCP Terraform / Enterprise's VCS-driven workflow](/terraform/cdktf/create-and-deploy/deployment-patterns#deploy-with-terraform-and-hcp-terraform) or use a [general-purpose CI to trigger the run in HCP Terraform / Enterprise](/terraform/cdktf/create-and-deploy/deployment-patterns#github-actions-ci-and-hcp-terraform). + +## Policy Enforcement + ++-> **Note:** Refer to [HCP Terraform pricing](https://www.hashicorp.com/products/terraform/pricing) for more information about Sentinel policies and run tasks. + +You can define [Sentinel policies](/terraform/cloud-docs/policy-enforcement) for one or multiple HCP Terraform workspaces to ensure that your infrastructure follows company-wide security standards and best practices. You can use Sentinel policies with CDKTF if HCP Terraform is configured as a [Remote Backend](/terraform/cdktf/concepts/remote-backends). + +You can also use [Run Tasks](/terraform/cloud-docs/workspaces/settings/run-tasks) to directly integrate third-party tools and services at certain stages in the HCP Terraform run lifecycle. HCP Terraform uses the status response from the third-party tool to determine if a run should proceed. diff --git a/website/docs/cdktf/create-and-deploy/project-setup.mdx b/website/docs/cdktf/create-and-deploy/project-setup.mdx index 14d3576bf9..1c7bdb28db 100644 --- a/website/docs/cdktf/create-and-deploy/project-setup.mdx +++ b/website/docs/cdktf/create-and-deploy/project-setup.mdx @@ -40,9 +40,9 @@ Add the `--local` flag to created a scaffolded project that is pre-configured to $ cdktf init --template="typescript" --local ``` -### Use Terraform Cloud as a Remote Backend +### Use HCP Terraform as a Remote Backend -When you run `cdktf init` without the `--local` flag, CDKTF defaults to using Terraform Cloud as a remote backend. This lets you store state and run Terraform operations remotely in Terraform Cloud. Refer to [Set Up CDKTF With Terraform Cloud](/terraform/cdktf/create-and-deploy/terraform-cloud#set-up-cdktf-with-terraform-cloud) for details. +When you run `cdktf init` without the `--local` flag, CDKTF defaults to using HCP Terraform as a remote backend. This lets you store state and run Terraform operations remotely in HCP Terraform. Refer to [Set Up CDKTF With HCP Terraform](/terraform/cdktf/create-and-deploy/hcp-terraform#set-up-cdktf-with-hcp-terraform) for details. ## Project Configuration diff --git a/website/docs/cdktf/create-and-deploy/remote-templates.mdx b/website/docs/cdktf/create-and-deploy/remote-templates.mdx index ab6e13fa87..58499ac5be 100644 --- a/website/docs/cdktf/create-and-deploy/remote-templates.mdx +++ b/website/docs/cdktf/create-and-deploy/remote-templates.mdx @@ -23,7 +23,7 @@ A template can use substitutions for filenames and file content. To specify your These variables hold user input. For example, you can use them in project files like `package.json`. CDKTF collects the required data from users when they run `cdktf init` with the template. -The following example specifies that `Name` and `Description` are mandatory, but `OrganizationName` and `WorkspaceName` will only be required for projects that are set up to use a Terraform Cloud [remote backend](/terraform/cdktf/concepts/remote-backends). +The following example specifies that `Name` and `Description` are mandatory, but `OrganizationName` and `WorkspaceName` will only be required for projects that are set up to use a HCP Terraform [remote backend](/terraform/cdktf/concepts/remote-backends). ```typescript Name: string; diff --git a/website/docs/cdktf/create-and-deploy/terraform-cloud.mdx b/website/docs/cdktf/create-and-deploy/terraform-cloud.mdx deleted file mode 100644 index 26fe03593f..0000000000 --- a/website/docs/cdktf/create-and-deploy/terraform-cloud.mdx +++ /dev/null @@ -1,185 +0,0 @@ ---- -page_title: Connect to Terraform Cloud / Enterprise - CDK for Terraform -description: >- - Use Terraform Cloud with CDKTF to store Terraform state remotely, manage secrets, apply policies, and more. ---- - -# Connect to Terraform Cloud / Enterprise - -This page explains how to connect Terraform Cloud / Enterprise to your CDK for Terraform (CDKTF) application and the benefits of using these products together. - -> **Hands On:** Try our [Get Started - Terraform Cloud](/terraform/tutorials/cloud-get-started) tutorials. - -## What are Terraform Cloud and Terraform Enterprise? - -CDKTF supports [Terraform Cloud](https://cloud.hashicorp.com/products/terraform) and [Terraform Enterprise](/terraform/enterprise). - -Terraform Cloud is a SaaS application that runs Terraform in a stable, remote environment and securely stores state and secrets. It includes a user interface that helps you better understand your Terraform operations and resources, allows you to define role-based access controls, and offers a private registry for sharing [modules](/terraform/cdktf/concepts/modules) and [providers](/terraform/cdktf/concepts/providers). Terraform Cloud also integrates with the Terraform CLI and connects to common version control systems (VCS) like GitHub, GitLab, and Bitbucket. When you connect a Terraform Cloud workspace to a VCS repository, new commits and changes can automatically trigger Terraform plans. Terraform Cloud also offers an API, allowing you to integrate it into existing workflows. - -Terraform Enterprise lets you set up a self-hosted distribution of Terraform Cloud and is ideal for organizations with strict security and compliance requirements. - -## When to use Terraform Cloud or Terraform Enterprise? - -Terraform uses persisted state data to keep track of the real-world resources it manages. By default, Terraform writes state to a local file. We recommend integrating with Terraform Cloud to store state remotely. This prevents accidental loss of locally stored state and lets multiple people access the state data so they can work together on that collection of infrastructure resources. - -Other benefits of Terraform Cloud and Terraform Enterprise include the ability to run Terraform remotely, [manage variables and secrets](#managing-variables-and-secrets), and enforce [policies for sets of infrastructure](#policy-enforcement). - -## Set up CDKTF with Terraform Cloud / Enterprise - -After you sign up for a [Terraform Cloud Account](https://app.terraform.io/public/signup/account) / create an account in your Terraform Enterprise instance, you must connect your CDKTF project to one or more [workspaces](/terraform/cloud-docs/workspaces). - -Workspaces function like working directories for distinct Terraform configurations and are associated with a Terraform configuration and its state file. They can also contain variables that you can use to manage credentials. - -Workspaces can have one of three workflows that determine how Terraform Cloud / Enterprise interacts with your CDKTF application: CLI-driven, Version control, or API-driven (a more advanced option). - -### CLI-driven Workflow - -You can configure the Terraform Cloud [CLI-driven workflow](/terraform/cloud-docs/run/cli) for both new and existing CDKTF projects. This workflow lets you run CDKTF CLI commands to deploy your application and run Terraform operations remotely on Terraform Cloud / Enterprise. - -#### Connect New CDKTF Projects - -First use `cdktf login` to log into Terraform Cloud or your Terraform Enterprise instance: - - - - - This command will take you through an interactive session to log in. - - ```shell-session - $ cdktf login - ``` - - If you already have a Terraform Cloud API token, you can pass it into stdin: - - ```shell-session - cat my-token.txt | cdktf login - ``` - - - - - - This command will take you through an interactive session to log in. - - ```shell-session - $ cdktf login --tfe-hostname tfe.my-company.com - ``` - - If you already have a Terraform Enterprise API token, you can pass it into stdin: - - ```shell-session - cat my-token.txt | cdktf login --tfe-hostname tfe.my-company.com - ``` - - - - -1. Run `cdktf init` without passing the `--local` flag. This creates a new template CDKTF project for your chosen programming language. It will be the basis for a new application with the necessary file structure for you to start defining infrastructure. If you're using Terraform Enterprise, you must also pass the `--tfe-hostname` flag with the hostname of your enterprise instance. -2. Choose a project language and provide a project name and description. -3. Select a Terraform Cloud organization and a name for your workspace. CDKTF will create a [CloudBackend](/terraform/cli/cloud/settings#the-cloud-block) in your project. -4. You can choose whether to send crash reports to the CDKTF team and select the providers you want to use. - -CDKTF creates both a scaffolded project in your chosen language and a new Terraform Cloud workspace on first apply. Your project is connected to the workspace and you can begin using CDKTF and Terraform Cloud together. -By default, the workspace is set to Remote execution mode, which means Terraform runs remotely on Terraform Cloud / Enterprise. If you want Terraform to run locally, you need to set the workspace to [Local Execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode). - -#### Connect Existing CDKTF Projects - -For existing projects, do the following: - -1. Create a Terraform Cloud workspace with the CLI-driven workflow. -2. Add the `RemoteBackend` to your CDKTF application. The following example connects the application to a Terraform Cloud / Enterprise workspace called `my-app-prod`. - - ```typescript - import { Construct } from "constructs"; - import { App, TerraformStack, RemoteBackend } from "cdktf"; - - class MyStack extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - // Remote Backend - /docs/backends/types/remote.html - new RemoteBackend(this, { - // Only required for self-hosted Terraform Enterprise instances. - // Defaults to "app.terraform.io". - hostname: "app.terraform.io", - organization: "company", - - workspaces: { - name: "my-app-prod", - }, - }); - - // define resources here - } - } - - const app = new App(); - const myStack = new MyStack(app, "my-stack"); - // You can also define the backend outside of the stack. - // new RemoteBackend(myStack, { - // hostname: "app.terraform.io", - // organization: "company", - - // workspaces: { - // name: "my-app-prod", - // }, - // }); - // You must configure the RemoteBackend before the app.synth() call - app.synth(); - ``` - -3. Run `cdktf login` / `cdktf login --tfe-hostname=tfe.my-company.com` and log in to Terraform Cloud / Enterprise. - -Your CDKTF application is connected to the Terraform Cloud / Enterprise workspace you specified in the `RemoteBackend`. You must set the workspace to [Remote Execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) if you want to store state and run Terraform operations remotely. - -### VCS-driven Workflow - -Check your synthesized code into version control and connect your Terraform Cloud / Enterprise workspace to that repository with the VCS-driven workflow. You can configure the workspace to trigger Terraform runs based on merges and commits to the repository. Refer to [Deployment Patterns](/terraform/cdktf/create-and-deploy/deployment-patterns#deploy-with-terraform-and-terraform-cloud) for more details about how to use CDKTF with the VCS-driven workflow. - -## Managing Variables and Secrets - -Terraform Cloud / Enterprise [variables](/terraform/cloud-docs/workspaces/variables) let you define the variables and secrets that Terraform uses during remote operations. You can set variables specifically for each workspace or you can create variable sets to reuse the same variables across multiple workspaces. For example, you could define a variable set of provider credentials and automatically apply it to all of the workspaces using that provider. - -To use variables, set your workspace to [Remote Execution Mode](/terraform/cloud-docs/workspaces/settings#execution-mode). Terraform can only access workspace variables when executing remotely on Terraform Cloud / Enterprise. - -2. Use the `TerraformVariable` construct to declare variables in your CDKTF application. This creates an undefined [Terraform input variable](/terraform/language/values/variables). The following example demonstrates how to create a `TerraformVariable` called `my-var`. - - ```typescript - import { Construct } from "constructs"; - import { App, TerraformStack, TerraformVariable } from "cdktf"; - - class MyStack extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - // You can define 'my-var' in Terraform Cloud and use the value in your application. - const value = new TerraformVariable(this, "my-var", { - default: "The default value to use", - description: "", - nullable: false, // if passing no - sensitive: true, - type: "string", - }); - - // define resources here - } - } - ``` - -3. Add variables that you declared in your CDKTF application to your Terraform Cloud / Enterprise workspace. Refer to [Add a Variable](/terraform/cloud-docs/workspaces/variables/managing-variables#add-a-variable) for details. This lets Terraform access the value during operations. - -### Variable Return Values - -The return value for `TerraformVariable` is an object with various representations of the value as attributes. You can pass this object as a string with `value.stringValue`, as a number with `value.numberValue`, or as a list with `value.listValue`. - -This means that there is no actual value in the variable field when CDKTF synthesizes your application. Instead, CDKTF uses a [Token](/terraform/cdktf/concepts/tokens), which represents a value that is unknown until Terraform applies your configuration. You cannot use tokens in dynamic checks during runtime. For example, `if (value.listValue.length > 42) {` always returns `false` because tokenized lists have a static length of one item. - -## Continuous Integration - -To run Terraform Cloud / Enterprise in a CI workflow, you can either use [Terraform Cloud / Enterprise's VCS-driven workflow](/terraform/cdktf/create-and-deploy/deployment-patterns#deploy-with-terraform-and-terraform-cloud) or use a [general-purpose CI to trigger the run in Terraform Cloud / Enterprise](/terraform/cdktf/create-and-deploy/deployment-patterns#github-actions-ci-and-terraform-cloud). - -## Policy Enforcement - -+-> **Note:** Refer to [Terraform Cloud pricing](https://www.hashicorp.com/products/terraform/pricing) for more information about Sentinel policies and run tasks. - -You can define [Sentinel policies](/terraform/cloud-docs/policy-enforcement) for one or multiple Terraform Cloud workspaces to ensure that your infrastructure follows company-wide security standards and best practices. You can use Sentinel policies with CDKTF if Terraform Cloud is configured as a [Remote Backend](/terraform/cdktf/concepts/remote-backends). - -You can also use [Run Tasks](/terraform/cloud-docs/workspaces/settings/run-tasks) to directly integrate third-party tools and services at certain stages in the Terraform Cloud run lifecycle. Terraform Cloud uses the status response from the third-party tool to determine if a run should proceed. diff --git a/website/docs/cdktf/examples-and-guides/examples.mdx b/website/docs/cdktf/examples-and-guides/examples.mdx index fbf6a4bb52..585f9f8b15 100644 --- a/website/docs/cdktf/examples-and-guides/examples.mdx +++ b/website/docs/cdktf/examples-and-guides/examples.mdx @@ -47,12 +47,12 @@ Follow these hands-on tutorials: Each CDK for Terraform project can specify a [backend](/terraform/language/settings/backends/configuration) that defines where and how Terraform operations are performed, where Terraform [state snapshots](/terraform/language/state) are stored, etc. -| Example | Description | Complexity | -| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| [azurerm](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/azurerm) | Specifies Azure Resource Manager ([azurerm](/terraform/language/settings/backends/azurerm)) as the backend. | Low | -| [gcs](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/gcs) | Specifies Google Cloud Storage ([gcs](/terraform/language/settings/backends/gcs)) as the backend. | Low | -| [remote](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/remote) | Specifies a [remote](/terraform/language/settings/backends/remote) backend. You can use remote backends to run operations in Terraform Cloud. | Low | -| [s3](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/s3) | Specifies Amazon S3 ([s3](/terraform/language/settings/backends/s3)) as the backend. | Low | +| Example | Description | Complexity | +| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| [azurerm](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/azurerm) | Specifies Azure Resource Manager ([azurerm](/terraform/language/settings/backends/azurerm)) as the backend. | Low | +| [gcs](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/gcs) | Specifies Google Cloud Storage ([gcs](/terraform/language/settings/backends/gcs)) as the backend. | Low | +| [remote](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/remote) | Specifies a [remote](/terraform/language/settings/backends/remote) backend. You can use remote backends to run operations in HCP Terraform. | Low | +| [s3](https://github.com/hashicorp/terraform-cdk/tree/main/examples/typescript/backends/s3) | Specifies Amazon S3 ([s3](/terraform/language/settings/backends/s3)) as the backend. | Low | ### Python @@ -120,7 +120,7 @@ Each CDK for Terraform project can specify a [backend](/terraform/language/setti ### Release demos -- **0.4:** [Go support, Asset construct, Terraform Cloud integration](https://www.youtube.com/watch?v=TTfFAIeSqgo). This includes a [Google Kubernetes Engine demo](https://youtu.be/TTfFAIeSqgo?t=1573). +- **0.4:** [Go support, Asset construct, Terraform Cloud (now HCP Terraform) integration](https://www.youtube.com/watch?v=TTfFAIeSqgo). This includes a [Google Kubernetes Engine demo](https://youtu.be/TTfFAIeSqgo?t=1573). - **0.5:** [Convert and watch command demos](https://www.youtube.com/watch?v=4caW8WJM4h4&t=1s) diff --git a/website/docs/cdktf/index.mdx b/website/docs/cdktf/index.mdx index 2d49ef660c..b015b869a4 100644 --- a/website/docs/cdktf/index.mdx +++ b/website/docs/cdktf/index.mdx @@ -23,7 +23,7 @@ At a high level, you will: 1. **Define Infrastructure:** Use your chosen language to define the infrastructure you want to provision on one or more providers. CDKTF automatically extracts the schema from Terraform providers and modules to generate the necessary classes for your application. 1. **Deploy**: Use `cdktf` CLI commands to provision infrastructure with Terraform or synthesize your code into a JSON configuration file that others can use with Terraform directly. -You can use every Terraform provider and module available on the [Terraform Registry](https://registry.terraform.io/), and you can use CDKTF with [Terraform Cloud](https://cloud.hashicorp.com/products/terraform), [Terraform Enterprise](/terraform/enterprise), and HashiCorp's policy as code framework, [Sentinel](https://www.hashicorp.com/sentinel). +You can use every Terraform provider and module available on the [Terraform Registry](https://registry.terraform.io/), and you can use CDKTF with [HCP Terraform](https://cloud.hashicorp.com/products/terraform), [Terraform Enterprise](/terraform/enterprise), and HashiCorp's policy as code framework, [Sentinel](https://www.hashicorp.com/sentinel). ## When to use CDK for Terraform diff --git a/website/docs/cdktf/release/upgrade-guide-v0-15.mdx b/website/docs/cdktf/release/upgrade-guide-v0-15.mdx index d5fd4571e4..e5291061ec 100644 --- a/website/docs/cdktf/release/upgrade-guide-v0-15.mdx +++ b/website/docs/cdktf/release/upgrade-guide-v0-15.mdx @@ -6,13 +6,13 @@ description: >- # Upgrading to CDK for Terraform Version 0.15 -0.15 is primarily focused around CLI improvements targeted at a better Terraform Cloud integration. +0.15 is primarily focused around CLI improvements targeted at a better HCP Terraform integration. Because of this, there are only smaller breaking changes in this release. The most notable one is a renaming of some interfaces / classes in our core library. Some configuration classes were suffixed inconsistently with `Config`, `Props` or `Options` and were renamed to `Config` for consistency. These classes need to be used in C#, Java, and Go, therefore we have a breaking change in these languages. ## Minimum version of Terraform increased to 1.2 -CDKTF is bumping the minimum supported version of Terraform from 1.0 to 1.2 starting from CDKTF version 0.15. This change is necessary as CDKTF 0.15 uses the Terraform CLI for planning and applying changes for Terraform Cloud and Terraform Enterprise instead of [the API](/terraform/cloud-docs/api-docs) used in version 0.14. +CDKTF is bumping the minimum supported version of Terraform from 1.0 to 1.2 starting from CDKTF version 0.15. This change is necessary as CDKTF 0.15 uses the Terraform CLI for planning and applying changes for HCP Terraform and Terraform Enterprise instead of [the API](/terraform/cloud-docs/api-docs) used in version 0.14. [Terraform promises compatibility](/terraform/language/v1-compatibility-promises) between all v1.x releases, so there shouldn't be any issues with this change. The only changes between these versions are bug fixes, and new feature additions.