Skip to content

Releases: hashicorp/terraform-cdk

v0.8.2

14 Dec 09:58
50654f8
Compare
Choose a tag to compare

fix

  • fix(lib): make sure to resolve reference expression target #1412
  • fix(provider-generator): Fix false block attributes #1405
  • fix(lib): inline references in strings should not destroy string itself #1401
  • fix: data can be null in some cases as well #1395

chore

  • chore(docs): Adds a REAMDE to docs folder #1381
  • chore: update constructs to 10.0.12 #1414
  • chore: copy edge provider on release pipeline #1408

test

  • test(provider-generator): verify generated provider emit same HCL across languages #1311

v0.8.1

03 Dec 15:09
c8e66b6
Compare
Choose a tag to compare

fix

  • fix(cli): Distribute unbundled source code #1379
  • fix(lib): Add struct sharding for providers without namespaces #1375
  • fix(cli): only log if logs are sent #1365
  • fix(lib): Keep specified empty objects #1329

chore

  • chore(cli): typescript init prints link to all prebuilt providers #1348

v0.8.0

01 Dec 14:55
2cbff1d
Compare
Choose a tag to compare

Breaking Changes

Namespaced AWS Provider Resources #1248

We iterated on the namespacing for the AWS provider which got introduced in #1101. Our goal was, to enable custom L2 / L3 abstractions being built with jsii, improve the general jsii support for the namespacing and last but not least to allow both namespace and barrel imports in Typescript. A welcome side effect is a 5x performance gain when building packages via jsii for Python (from ~ 16 minutes to ~ 3 minutes) and likely other targets such as Java or C#

As a result, there are a few minor breaking changes:

  • Namespaces are all lowercased now, without a separating character
  • Namespaces are all a single word now (e.g. DynamoDb used to be dynamo_db in Python - it's now just dynamodb)
  • CloudwatchEventBridge namespace got renamed to eventbridge

Typescript Example

Before

This was pretty much the only way to use the namespaced provider classes.

import { CloudFront } from "@cdktf/provider-aws";

new CloudFront.CloudfrontDistribution(this, "cloudfront", {});
After

Now it's possible to either import the entire namespace, or a resource class directly.

// Similar to before, but namespace is lowercased
import { cloudfront } from "@cdktf/provider-aws";

new cloudfront.CloudfrontDistribution(this, "cloudfront", {});

// new option
import { CloudfrontDistribution } from "@cdktf/provider-aws/lib/cloudfront";

new CloudfrontDistribution(this, "cloudfront", {});

See this Pull Request for more details.

Other Changes

fix

  • fix(provider-generator): Fix private registry module generation #1361
  • fix(lib): Fix incorrect parseInt casing #1359
  • fix(lib): fix documentation link for lookup #1347
  • fix(provider-generator): Mutating complex objects #1331
  • fix(provider-generator): attributes on resources should not be undefined #1310
  • fix(examples): Make sure we're using pipenv #1272
  • fix(lib): Increased --max-old-space-size value #1265
  • fix(examples): temporarily set fixed AWS provider version for Java #1261
  • fix(cli): fix bug that required cdktf.json in parent directory when running convert #1256
  • fix(provider-generator): escape hyphens in provider names for Go package identifiers #1252
  • fix(lib): Rework AWS Provider Namespacing #1248
  • fix(lib): escape newlines in terraform functions #1233
  • fix(lib): Also separate Token Map and symbols for interoperability with AWS CDK Tokens #1176
  • fix(release): only include prs since last version in the changelog #1171

chore

  • chore(docs): Fix broken anchor links #1345
  • chore(docs): link and layout fixes #1344
  • chore(docs): document list escape hatches #1342
  • chore(tests): remove jsii version from snapshot #1341
  • chore(docs): Add constructs documentation to website #1338
  • chore(deps): upgrade jsii versions and unpin AWS TF provider version for Java example #1336
  • chore(docs): Move examples up in sidebar, list out tutorials #1291
  • chore(deps): yarn upgrade #1283
  • chore(cli): upgrade React version #1259
  • chore(release): Pre-releases should use next version #1257
  • chore(docs): Fix docs nits like images, headings, and contractions #1245
  • chore(deps): remove obsolete dependency json-schema-to-typescript #1232
  • chore(deps): fix dependabot config #1220
  • chore(deps): re-enable dependabot #1219
  • chore(docs): document escape hatch for dynamic blocks #1215
  • chore(docs): copy over aspects #1214
  • chore(docs): revert link change #1177
  • chore(docs): Laura fix docs nits #1172
  • chore(examples): Use AWS provider 3.0 #1155

Other

  • chore: add website release automation #1255
  • fix: Fix EC2 Instance creation example #1254
  • fix: Minor typo in error message about missing providers #1240

feat

  • feat(cli): use ts-node to compile main.ts #1253
  • feat(docs): add link to new deploy apps tutorial #1236
  • feat(lib): Add staticId option to TerraformOutput (uses construct id as synthesized output name)" #1213
  • feat(lib): throw error when a token is used in a construct name #1181
  • feat(hcl2cdk): document providers with missing type information #1174
  • feat(lib): Expand Output value types #1145

test

  • test(cli): test generated providers #1235
  • test(lib): ensure assets dont redeploy without FS changes #1178

v0.7.0

19 Oct 17:07
dee8952
Compare
Choose a tag to compare

Breaking Changes

Abbreviated version below, for a guide see Upgrade Guide for 0.7

Namespaced AWS Provider Resources #572

The AWS Provider has a size that makes it hard to navigate in editors, especially in languages that compile it to a single file like Python. We implemented namespaces that hold Resources and Data Sources the same category together, the categories can be found on the AWS Provider page.
If you don't use the AWS provider no action is needed, if you do you need to adjust your import statements to match the namespaces. You can find more information at the upgrade guide.

Simplify Provider API Surface #258

When generating the provider bindings we previously translated any block to an array of a certain type, both in configuration and as properties on the resource / data source instances. For blocks that can only appear once at most this is making the API harder to use. From this version on these blocks are going to be just the type instead of an array of a certain type.
For information on how to migrate please see the upgrade guide.

Technical Preview

AWS Adapter

The AWS Adapter is a technical preview and not ready for production usage. Its API is not stable and things might break unexpectedly.

The AwsTerraformAdapter (included in the @cdktf/aws-cdk package) allows you to use Amazon Web Services Cloud Development Kit (AWS CDK) constructs in your CDK for Terraform (CDKTF) projects. Find out more in the Github repository hashicorp/aws-cdk or jump straight to the documentation.

Features

  • feat(docs): Aws Adapter #1149
  • feat(lib): change the namespace of encoded string, list and number tokens #1148
  • feat(docs): document the use of aspects and annotations #1144
  • feat(lib): invoke Aspects when using Testing.synth and Testing.synthScope #1143
  • feat(cli): namespace aws provider #1101
  • feat(docs): add telemetry docs #1071
  • feat(examples): add example azure service bus #1063
  • feat(hcl2cdk): Copy local modules when init from TF project #1024
  • feat(lib): use objects instead of objects in arrays if possible #935
  • feat: Extend support for Terraform expressions #1131

Fixed Bugs

  • fix(docs): fix missing backticks #1167
  • fix(lib): Lock jsii version #1166
  • fix(provider-generator): rename lambda namespace in lambda functions #1154
  • fix(docs): fix typo in remote templates docs #1151
  • fix(examples): fix path to setup.js file in jest config #1147
  • fix(hcl2cdk): Convert null provider #1142
  • fix(docs): fix example for integration test #1129
  • fix(tests): quote lerna scope to prevent shell expansion #1121
  • fix(hcl2cdk): Always using module binding for convert command #1120
  • fix(hcl2cdk): Fix duplicate modules #1025

Refactoring

  • refactor(cli): replace links with redirects #1138

Documentation

  • chore(docs): Fix link to outputs doc #1164
  • chore(docs): Fixes broken links #1163
  • chore(docs): Update docs link #1162
  • chore(docs): Fix docs links #1161
  • chore(docs): reference interoperability layer #1160
  • chore(docs): add new namespaces #1159
  • chore(docs): review cli reference #1158
  • chore(docs): remove adapter part #1157
  • chore(docs): improve release script to not require manual pr selection #1156
  • chore(docs): Proofreading edits #1150
  • chore(docs): Terraform Docs #1146
  • chore(docs): document numeric tokens #1140
  • chore(deps): add script to update all snapshot tests #1139
  • chore(docs): Laura architecture edits #1137
  • chore(docs): Merge docs content to stable website #1133
  • chore(docs): Laura docs todos edits #1128
  • chore(docs): Add note and copyediting to providers page #1127
  • chore(docs): Address todos #1126
  • chore(docs): CDK for Terraform Architecture #1112
  • chore(docs): Update cli configuration doc #1111
  • chore(docs): Autofix prettier #1110
  • chore(tests): Ignore website changes for test workflows #1109
  • chore(docs): Combine Resources and Providers pages #1092
  • chore(docs): Edits to Project Setup & Config file docs #1085
  • chore(docs): Terraform Outputs #1078
  • chore(docs): Adds descriptions example drafts #1073
  • chore(docs): improve community documentation #1066
  • chore(docs): What is CDKTF and Interoperability #1065
  • chore(docs): link docs to Pocket codebase, YouTube #1062
  • chore(docs): Project Setup #1056

v0.6.4

04 Oct 11:14
25ebc26
Compare
Choose a tag to compare

Breaking Changes

fix(cli): Better handle non-registry modules and improved naming #929

If you use Terraform Modules you will need to adust their names. We changed the naming to be more intuitive, e.g. TerraformAwsModulesVpcAws is now Vpc. To migrate please run cdktf get with this version and change your imports to match the new abbreviated form.

Fixed Bugs

  • fix(cli): directly depend on cli-spinners v2.6.0 #1116
  • fix(cli): create .cdktf folder if needed #1107
  • fix(lib): check for null on removing metadata in testing framework #1075
  • fix: ignore build output in prettier #1077

Chores

  • chore(deps): bump trim-newlines from 3.0.0 to 3.0.1 #863
  • chore(docs): remove roadmap link from README #1067

v0.6.3

22 Sep 20:19
bcf088d
Compare
Choose a tag to compare

Features

  • feat(hcl2cdk): Add logical id override when construct id's aren't unique #1045
  • feat(lib): use jest asymetric matchers & nicer error messages #1052

Fixed Bugs

  • fix(hcl2cdk): Correctly handle remote state #1031
  • fix(docs): adjust setup handling in docs #1048
  • fix(cli): don't create config.json files if none was present before #1054
  • fix(lib): fix source path generated for local modules #947
  • fix(docs): typo in documentation #1060
  • fix(lib): Fix release pipeline #1061

Chores

  • chore(tests): Build examples as matrix - 1 build per example #1043
  • chore(tests): Fix release pipeline #1050
  • chore(tests): Upgrade to jest 0.27 for integration tests and retry failed tests once #1051
  • chore(deps): bump tmpl from 1.0.4 to 1.0.5 #1055
  • chore: fix config for dependabot #1057

v0.6.2

17 Sep 20:37
6ff70ce
Compare
Choose a tag to compare

Fixed Bugs

  • fix(cli): replaceAll not available in node v14 #1036
  • fix(cli): fix import path for Manifest (was relative) #1037

Chores

  • chore: lint monorepo for relative imports between packages #1040
  • chore: remove duplicated jest interface members #1042

Documentation

  • feat(docs): add docs for Testing.renderConstructTree() #1029

v0.6.1

16 Sep 17:51
b594207
Compare
Choose a tag to compare

Fixed Bugs

  • fix(lib): Fix testing setup #1027

v0.6.0

15 Sep 17:41
d62e618
Compare
Choose a tag to compare

Breaking Changes

Abbreviated version below, for a guide see Upgrade Guide for 0.6

Constructs upgrade (v3 to v10)

The constructs package serves as the base for all building blocks of the CDKs (e.g. CDK for Terraform, AWS CDK and cdk8s). Recently the constructs package was lifted to v10 with a few but major changes. The reason behind those was to make it future proof and stable across different CDKs. In this process the API surface area of the constructs base package was reduced and some functionality has been moved directly to the AWS CDK instead. For more information and the underlying motivation for the changes to the constructs library refer to the Removal of Construct Compatibility Layer RFC.

Moved functionality

  • Aspects are now part of cdktf as they've been removed from constructs. If you use them, you need to change your import statement to import them from the cdktf package. The api also has changed a bit. The new way to register Aspects is Aspects.of(construct).add(aspect) instead of construct.node.applyAspect(aspect).
  • The construct.node.addInfo(), construct.node.addWarning() and construct.node.addError() methods are now available under the Annotations.of(construct) API: e.g. Annotations.of(construct).addWarning('my warning'). Annotations are a part of the cdktf base library.

Removed functionality

  • construct.onPrepare / construct.prepare() has been removed. Instead you can use Aspects.
  • onSynthesize has been removed. If you find yourself needing support for it, please file a new issue on this repo and describe your use-case.

Features

  • feat(hcl2cdk): inform about recommended variable usage #875
  • feat(lib): make asset paths change if asset content changes #769
  • feat(cli): Introduce support for shell completions #943
  • feat(lib): Print a hint when the app has been passed to a backend instead of the stack #945
  • feat(lib): expose unit testing helpers #942
  • feat(cli): detect and validate used node & go version #855
  • feat(lib): expose terraform functions #903

Documentation

  • chore(docs): add a first short note about how to release #864
  • feat(docs): document how to connect CDKTF to Terraform Cloud #874
  • fix(docs): update docs to be correct about outdir since multiple stacks feature #872
  • fix(hcl2cdk): aliased provider missed in graph #876
  • chore(docs): release pre-built providers #892
  • chore(docs): update telemetry.md for 0.6 release #1017
  • chore(docs): remove custom adapter section for now #1021
  • feat(docs): upgrade guide for v0.6 #991

Fixed Bugs

  • fix(lib): keysToSnakeCase needs to ignore intrinsic tokens #902
  • fix(lib): synthesise numbers correctly #899
  • fix(lib): better error for uninitialized provider #896
  • fix(cli): Don't specify --user flag when running in an pip activated virtualenv #912
  • fix(deps): check in husky hooks #919
  • fix(lib): Alternative Validation Approach #911
  • fix(cli): Don't print sensitive outputs when running deploy #940
  • fix(tests): enable windows test with escapes #957
  • fix(hcl2cdk): Fix convert with numeric count #1011
  • fix(lib): Module references to providers synthesizes array instead of map #933
  • fix(tests): disable terraform cloud test for now #955

Chores

  • chore(lib): speed up TS compilation #873
  • chore(deps): ignore tsbuildinfo #894
  • chore(docs): Brief reference for local provider usage #897
  • chore(docs): Link Python Poetry community template #922
  • chore(deps): bump tar from 4.4.13 to 4.4.17 #914
  • chore(tests): remove unused aws provider dependency to speed up test #926
  • chore: fix typos #927
  • chore(lib): BREAKING CHANGE upgrade constructs lib to v10 #921
  • chore(deps): Upgrade yargs to v17 #779
  • chore(tests): Align workflow trigger #931
  • chore(cli): Make sure Python dependencies are working locally #936
  • chore(deps): bump tar from 4.4.17 to 4.4.19 #941
  • chore(release): run all tests on npm test #962
  • chore(hcl2cdk): Provide guidance for imports #949
  • chore(deps): bump axios from 0.21.1 to 0.21.4 #963
  • refactor(lib): use the same jest config everywhere #930
  • feat(cli): Improve telemetry #895

v0.5.0

29 Jul 18:00
12b2312
Compare
Choose a tag to compare

Read the announcement blog post: Announcing CDK for Terraform 0.5

New Features

  • feat(cli): implement hcl2cdk #796
  • feat(cli): add cdktf watch command #817

Documentation

  • chore(docs): link docker integration example #789
  • chore(docs): add google cloud kubernetes example #742
  • chore(docs): python example for gcp cloud function #776
  • chore(docs): Add serverless application guide #786
  • chore(docs): link to serverless e2e example #795
  • chore(docs): add examples for ucloud provider (ts/python/java/c#/go) #790
  • chore(docs): add azure python link #773
  • chore(docs): Enhance readme with Terraform Platform Illustration #778
  • chore(docs): Add Project Maturity section to README #797
  • chore(docs): Add callouts to Learn tutorials #767
  • chore(docs): Create BUGPROCESS.md #815
  • refactor(docs): clarify that we support all providers and modules #783
  • fix(docs): remove Csharp readme in Python for #745 #820
  • fix(docs): add mandatory cdktf get step #784
  • fix(docs): document module generation #848

Fixed Bugs

  • fix(cli): throw explicit error when commands are invoked outside of a cdktf project #854
  • fix(cli): dont compile cdktf output directory #754
  • fix(cli): dont upload .terraform folders #758
  • fix(cli): polish user interaction by switching libraries #850
  • fix(cli): update hint for tfstate file #756
  • fix(cli): parse JSON output #774
  • fix(hcl2cdk): exclude non-registry modules from the cdktf.json #847
  • fix(hcl2cdk): adjust link for label renaming #852
  • fix(hcl2cdk): only run get conditionally #846
  • fix(hcl2cdk): camelCase backend properties #862
  • fix(hcl2cdk): suffix variables and locals #845
  • fix(tests): make less assumptions about environment in config.test.ts #832
  • fix(lib): Add in new optional AWS route attributes #821

Chores

  • chore(deps): use nodejs v14 version of aws jsii/superchain image #843
  • chore(deps): add gcc and gcc-c++ to Dockerfile required for node-gyp #849
  • chore(deps): Upgrade eslint to v7 #819
  • chore(deps): bump ws from 7.4.2 to 7.4.6 #747
  • chore(deps): bump y18n from 4.0.0 to 4.0.3 #777
  • chore(cli): send telemetry on errors #829
  • chore(cli): lint tsx files and clean up React Hooks code #818
  • chore(cli): add prettier #793
  • chore(lib): track overrides and backend types in stack #830
  • chore(tests): Provide global PR workflow status #781