Skip to content

Releases: hashicorp/terraform-cdk

v0.15.0

17 Jan 11:27
Compare
Choose a tag to compare

Breaking changes

Renaming of *Options and *Props to *Config

We had several exports where the configuration passed to constructs or functions was using a class with a different suffix then Config. If you are using a language like C#, Java, Python, or Go you might have needed to specify these classes in your CDKTF application. To simplify the usage we changed every suffix to be Config, so if you currently use one of the others please rename them to use the Config suffix. No options were changed in the process, only the names were aligned.

This would be one example of the change to be made (this is in Java):

import software.constructs.Construct;
import com.hashicorp.cdktf.App;
import com.hashicorp.cdktf.TerraformStack;
import com.hashicorp.cdktf.CloudBackend;
-import com.hashicorp.cdktf.CloudBackendProps;
+import com.hashicorp.cdktf.CloudBackendConfig;
import com.hashicorp.cdktf.NamedCloudWorkspace;

    public static class Demo extends TerraformStack{

        public Demo(Construct scope, String id){
            super(scope, id);
-            new CloudBackend(this, CloudBackendProps.builder()
+            new CloudBackend(this, CloudBackendConfig.builder()
                    .organization("hashicorp")
                    .workspaces(new NamedCloudWorkspace("demo"))
                    .build()
            );

Notice: CDKTF 0.15 bumps minimum Terraform version 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 used in version 0.14.

Terraform promises compatibility 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.

Please open an issue if you encounter any issues or bugs with this change.

Deprecation: We deprecate the feature flags that go into the context field of the cdktf.json

CDKTF used to use feature flags to enable potentially breaking behaviors in a release. These are no longer needed since most of the changes we introduce from here can not be hidden behind feature flags. When the feature flags are removed, the behavior will be the same as this configuration:

{
  "context": {
    "excludeStackIdFromLogicalIds": "true",
    "allowSepCharsInLogicalIds": "true"
  }
}

feat

  • feat(cli): Add cdktf provider list command #2270
  • feat(cli): support -var and -var-file terraform flags #2468
  • feat(cli): add -no-color tag #2307
  • feat: enable non-escaping mode for tokens #2179
  • feat: use our own pre-built package for node-pty to have builds for Nodejs 19 available #2478
  • feat(docs): Document node-gyp errors if no precompiled binaries are available and the target system misses a native toolchain #2497

fix

  • fix(cli): don't enquote args as they will be escaped and end up in the calls to Terraform #2493
  • fix: detect destroys on windows / TF version #2486
  • fix(tests): change Options -> Config as per #2471 #2482
  • fix(cli): windows fixes #2480
  • fix: limit concurrency for integration tests to 10 for each windows and linux #2474
  • fix(tests): Make version more stable #2467
  • fix: use older SHA from jsii superchain docker image #2465
  • fix: fix go build in pipeline #2464
  • fix(cli): remove newlines from tokens during terraform login #2459
  • fix(cli): abort apply if not all variables are known #2455
  • fix: Expose provider matcher to jest #2448
  • fix: Adds environment to keys to preserve case #2446
  • fix: Allow git access for sentry cli in docker #2426
  • fix: add path: dist for npm and pypi #2410

chore

  • chore: create upgrade guide #2494
  • chore: increase parallel limit (10->30) to speed up integration tests #2487
  • chore: disable cron for project board #2484
  • chore(docs): fix some docs #2483
  • chore: fix typo in function name #2462
  • chore: add a notice for minimum supported version to changelog #2461
  • chore: fix broken GHA version updater #2453
  • chore: update CODEOWNERS #2444
  • chore(docs): running snippet update tool revealed an existing snippet that is not up-to-date #2440
  • chore: update JSII #2428
  • chore: Support custom endpoints #2427
  • chore: create TFC/TFE workspace using the Terraform CLI #2424
  • chore: switch to SHA-based workflow pins #2422
  • chore: Update all documentation examples for Typescript #2421
  • chore: remove long-running hooks #2418
  • chore: translate documentation to csharp #2417
  • chore: add a refactoring guide #2413
  • chore: fix homebrew deploy step #2412
  • chore: add TFE information to TFC docs #2407
  • chore: deprecate feature flags #2498
  • chore: document variable flags #2495

refactor

  • refactor: rename all *Props and *Options classes and interfaces to *Config #2471

v0.14.3

07 Dec 16:25
Compare
Choose a tag to compare

fix

  • fix: add completed tfc pending states #2398
  • fix: skip confirming on auto-apply enabled tfc workspaces #2397
  • fix(hcl2cdk): snapshot generated code instead of snapshotting that the function returns a promise #2392
  • fix: add required_version to json schema #2355

chore

  • chore: add provider-integration tests conditionally for PRs and to releases #2371
  • chore: increase operations per run of stale workflow #2363
  • chore: update github workflow actions #2361
  • chore(docs): Add Example for Complex input variables #2309
  • chore: add Terraform 1.3.4 to Docker container #2285

feat

  • feat(cli): prompt added in init - asks to use TFC when credentials are present #2386
  • feat(docs): document Token.nullValue() #2297

v0.14.2

05 Dec 13:23
Compare
Choose a tag to compare

Breaking changes

We split up our cdktf-cli package into cdktf-cli for the UI parts, utilizing @cdktf/cli-core for the functionality. If you previously relied on the internal cdktf-cli/lib entrypoint you should switch to @cdktf/cli-core. This was never an official API, but we want to mention it here in case it breaks for anyone.

chore

  • chore: skip hcl2cdk tests for now #2384
  • chore: Update Digital Team Files #2383
  • chore: move from pr target to pr #2381
  • chore: fix finalizing the Sentry release #2379
  • chore: update workflows for new workflow endpoint #2378
  • chore: disable python edge test #2369
  • chore: only trigger unit tests once #2362
  • chore: use secret #2358
  • chore: document go version #2351
  • chore: fix stale workflow #2343
  • chore: add build step to ci #2338
  • chore: add workflows to auto-close and lock stale issues and PRs #2335
  • chore: add expression paranthesis #2332
  • chore: dedupe concurrency prefix #2330
  • chore: npm-check-updates && yarn upgrade #2329
  • chore: improve release pipelines #2328
  • chore: add GH Action that labels PRs #2325
  • chore(docs): Update remote-backends.mdx #2324
  • chore: ensure we run all tests on dependency updates #2323
  • chore: re-add run url #2320
  • chore: limit concurrency on releases #2318
  • chore: fix sentry release script #2317
  • chore: fix typo #2316
  • chore: offboard checks from PRs to main #2315
  • chore(docs): prepare for code samples in multiple languages #2314
  • chore: run CI more selectively #2313
  • chore: make feature flag tests more resilient to provider updates #2312
  • chore: additional potential speedup experiments for hcl2cdk unit tests #2311
  • chore(tests): enable go provider add tests #2308
  • chore: run linting and prettier as part of CI #2304
  • chore(docs): translate hcl-interop examples to c# #2288
  • chore: add workflow to update our github actions #2283
  • chore(docs): translate functions examples to c# #2277
  • chore(docs): translate data-sources examples to c# #2276
  • chore(docs): translate aspects example to c# #2273
  • chore(docs): translate all examples to python #2186
  • chore(docs): Translate Documentation Snippets for Java #2183

feat

  • feat(examples): python upcloud server #2366

fix

  • fix: pin yargs types version #2364
  • fix: Transition to planned state after cost estimation and policy checks with TFC/TFE #2360
  • fix(cli): don't fail with UsageError when determining whether a provider is installed as a pre-built provider #2348
  • fix: scoped packages need a publish config to be published to npm #2347
  • fix: scoped packages need a publish config to be published to npm #2346
  • fix(docs): fix header indentation causing no page contents sidebar for this page #2299
  • fix(hcl2json): don't overwrite crypto if it's set already #2282
  • fix: Graceful failures when using cdktf with non-admin tokens #2258
  • fix: Prevent any release jobs from triggering if no release is required #2158

refactor

  • refactor(cli): parse json according to schema #2286
  • refactor: extract asset and constructs example into separate files #2275
  • refactor(cli): move cli library into seperate package #2253

v0.14.1

16 Nov 14:07
cdd1cc2
Compare
Choose a tag to compare

A broken import that only appeared in the bundled cdktf-cli that we publish broke the 0.14.0 release. This patch release fixes this.

fix

  • fix(provider-generator): fix cross package import which breaks the cdktf-cli release bundle #2302

chore

  • chore: document authoring cdktf constructs #2287

v0.14.0

15 Nov 20:51
823f343
Compare
Choose a tag to compare

Breaking changes
Back in October, we announced significant performance improvements with CDKTF version 0.13. These improvements required breaking changes for which we provided backward-compatible provider bindings in version 0.13. As announced, the 0.12 (non-namespaced) provider bindings will no longer work starting with CDKTF 0.14. Refer to the upgrade guide for 0.13 to learn how to update your imports for these changes.

feat

  • feat(cli): add provider upgrade command #2202
  • feat(cli): Add option to select providers to add with init #2184
  • feat(cli): only re-generate provider bindings on get if necessary #2266
  • feat(lib): expose operators on their own API class #2292
  • feat(lib): Introduce Token.nullValue() that allows to pass null to Terraform configurations in languages other than TypeScript #2284
  • feat(cli): Automatically Update Locked Providers #2020
  • feat(lib): Added testing matchers for Providers #2154
  • feat(lib): adds failed process output to test matcher APIs #1953 #2196

fix

  • fix(cli): do not check for version when DISABLE_VERSION_CHECK #2257
  • fix(docs): fix module code example #2256
  • fix(docs): fix links to pre-built provider repositories #2264
  • fix(docs): fix a couple of typos in stacks.mdx #2269
  • fix(examples): fix CI for Python examples #2291
  • fix: set global flag to be able to start search for code blocks at an index #2274

chore

  • chore(docs): Add CDK for Terraform to page titles #2278
  • chore: document Python hash error in local development #2272
  • chore: document JSII debug flags in contribution guide #2271
  • chore: update LICENSE #2268
  • chore(cli): Prevent minification when watching cdktf-cli #2262
  • chore(lib): Add deprecation notices to backends that were deprecated in Terraform v1.2.3 and removed in TF 1.3 #2261
  • chore: adding mgarrell777 to docs codeowners to be notified for docs changes #2259
  • chore: add ecs-microservices example #2252
  • chore: sync version and changelog from the 0.13.3 backported release #2251
  • chore: install pre-built provider with exact version #2249
  • chore: cache examples and terraform plugins #2213

v0.13.3

03 Nov 15:55
Compare
Choose a tag to compare

fix

  • fix: Redact authorization header when error logging from TFC/TFE #2241

v0.13.2

26 Oct 06:59
ed137fd
Compare
Choose a tag to compare

fix

  • fix(provider-generator): don't require arrays wrapping variable / output declarations #2199
  • fix(cli): Use 'id' as argument name for all templates #2119
  • fix(cli): use a custom user-agent when talking to TFC #2210
  • fix(cli): Ignore local obj/ dir in C# template #2217
  • fix(deps): Use apt instead of yum, since base image is debian based now #2216
  • fix: correctly denote all of our redirects as temporary because they might change #2218

chore

  • chore: Update Go to version 1.18 on windows workflows #2219
  • chore: Update Digital Team Files #2203
  • chore(cli): change url to pre-built providers to one we control #2181
  • chore(cli): Move things to src/ folder #2130
  • chore(deps): Update docker image to use new jsii/superchain tag #2214
  • chore(docs): rewrite internal redirects #2204

feat

  • feat: add CODEOWNERS file for automatic PR review assignment #2212

v0.13.1

18 Oct 14:27
411f47a
Compare
Choose a tag to compare

feat

  • feat(cli): Add support for terraform's parallelism flag #2107
  • feat: add redirect link to pre-built providers json file #2180
  • feat(cli): link to troubleshooting page for error #2192

fix

  • fix(provider-generator): change Static resource class to StaticResource as their namespace 'static' is not valid in TypeScript re-exports #2168
  • fix(cli): dont wrap list terminal output #2188
  • fix(cli): handle missing package versions for non-npm packages #2177
  • fix(docs): Fix upgrade guide imports for Python #2171
  • fix(docs): update old config key #2195

chore

  • chore: Update link to blogpost #2176

v0.13.0

03 Oct 16:18
d5d41c1
Compare
Choose a tag to compare

Breaking Changes
Abbreviated version below, for a guide see Upgrade Guide for 0.13.

0.13 includes performance improvements to generated providers. Instead of exporting a flat list of exports including all supported resources and data sources, we now export each construct and it's associated structures in their own namespace. Due to this, the way you import constructs from your CDKTF application will change. For more information regarding this release, and some of the reasonings behind the changes, please check out the version 0.13 release post.

Typescript

// Before version 0.13
import { Container, Image, DockerProvider } from "@ckdtf/provider-docker";

// Version 0.13
import { Image } from "@cdktf/provider-docker/lib/image";
import { DockerProvider } from "@cdktf/provider-docker/lib/provider";
import { Container } from "@cdktf/provider-docker/lib/container";

Python

from cdktf_cdktf_provider_kubernetes.kubernetes import Namespace, Service, Deployment, KubernetesProvider

v0.12.3

29 Sep 11:28
0609b7d
Compare
Choose a tag to compare

Breaking Changes

A very minor change in the UX of the cdktf get command now generates the provider bindings for all languages (except TypeScript) in parallel. This speeds up the process in general, but on devices with limited memory it could lead to Out of Memory errors. If this happens you can limit the parallelism by providing the parallelism flag: cdktf get --parallelism=1.

fix

  • fix(provider-generator): Add special case in case resource is named 'object' #2138
  • fix(docs): Fix two small bugs in the code causing it to not compile #2128
  • fix(lib): Add missing config options for AzurermBackend #2127
  • fix(cli): Update require package in template #2118
  • fix: Change url of pipenv in log #2117
  • fix(cli): support using remote execution in Terraform Cloud with up to 500 MB (instead of 10MB) #2108
  • fix(docs): remove empty code block #2102
  • fix: update constructs and go runtime versions #2096
  • fix(cli): add sentry DSN in build process #2085
  • fix(docs): fix wrong command mentioned in TFC docs #2083
  • fix: let create changelog script use commit hashes from PRs instead of finding merge commit messages that may not always exist #2068

feat

  • feat(cli): include language used in cdktf init telemetry event #2123
  • feat(cli): support generating provider bindings in parallel #2111

chore

  • chore(cli): Use the npm package's repository field for generating go package name #2145
  • chore: npm-check-updates && yarn upgrade #2142
  • chore: split up unit tests per package #2122
  • chore: Update diagram with new provider count #2104
  • chore: change YT link to cut version #2103
  • chore(cli): Don't trim output for unstructured logs #2100
  • chore: only run expensive tasks on source code changes #2099
  • chore: Support building with Go 1.19 #2098
  • chore: fix go azure example #2092
  • chore: fix the project board TS errors #2091
  • chore: npm-check-updates && yarn upgrade #2090
  • chore: npm-check-updates && yarn upgrade #2077
  • chore(examples): clean up examples #2069
  • chore(docs): Check whether links work :) #2063
  • chore: ensure we have license header #1960
  • chore: measure and print memory consumption of build and synth steps for examples in CI #2060
  • chore: start running tests against TF 1.2.8 and drop running against 1.0.7 #2058