Skip to content

Releases: hashicorp/terraform-cdk

v0.11.2

08 Jun 19:46
aad55ab
Compare
Choose a tag to compare

feat

  • feat(cli): support custom Terraform Enterprise instances #1857
  • feat(hcl2json): expose hcl expression parser #1794

chore

  • chore: synthesize all boolean as iresolvable tests #1849
  • chore(docs): Fix Environment Variables and Best Practices #1839

v0.11.1

02 Jun 15:56
b00b909
Compare
Choose a tag to compare

fix

  • fix(cli): Fix package version check on Windows #1831
  • fix(docs): fix code blocks in "create and deploy" documentation #1826
  • fix(release): update changelog #1824

chore

  • chore(cli): filter usage errors from error reporting #1828
  • chore: document debug command #1812
  • chore: add best practice page #1790

v0.11.0

24 May 19:45
91bef8d
Compare
Choose a tag to compare

Breaking Changes

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

TF_VAR_ prefixed environment variables can no longer be accessed at synth time

These environment variables will now be filtered out in the synth phase since they are only intended to be used during diff (plan) and deploy (apply) phases to supply values for TerraformVariables. This inhibits accidentally inlining those values into the generated cdk.tf.json config.

Environment variable and CLI option changes

  • DEBUG is replaced by setting CDKTF_LOG_LEVEL=debug, setting the CDKTF_LOG_LEVEL to debug will now also behave like DEBUG=1 and include logs from the provider generation
  • CDKTF_DISABLE_LOGGING=false is replaced by setting CDKTF_LOG_FILE_DIRECTORY=/path/to/logs/directory. If left empty no logs will be written.
  • --disable-logging was removed, instead use the environment variable CDKTF_LOG_LEVEL=off
  • DISABLE_VERSION_CHECK, CDKTF_DISABLE_PLUGIN_CACHE_ENV need to be set to true or 1, before anything worked.

Stack ids can no longer contain whitespaces

A TerraformStack may no longer contain whitespace characters, since we rely on paths being whitespace free. If you have a stack with an id containing a whitespace, please replace it with a hyphen. If the stack was already deployed with the default LocalBackend you might need to rename your statefile to match the new stack id.

Computed Map References are referenced through getter

For computed maps, the reference is now through a getter.

To access { property = "value" }, instead of resource.mapAttribute("property") you can now use resource.mapAttribute.lookup("property").

Use ComplexLists and ComplexMaps for complex assignable properties #1725

Assignable properties of the form Object[] or { [key: string]: Object } no longer have setters; they instead have putX methods. The getter return type is also changed to be a derivative of either ComplexList or ComplexMap.

fix

  • fix(docs): Make sure code example works #1807
  • fix(lib): Delay complex object fqn so that override id can still be used #1793
  • fix(provider-generator): strictly adhere to the provider schema #1792
  • fix: Avoid unstable fqn for TerraformElements #1779
  • fix(cli): Respect CDKTF_HOME environment variable for checkpoint telemetry #1778
  • fix(docs): remove outdated docs from the previous watch implementation #1768
  • fix(cli): throw an error if a stack contains a whitespace #1750

feat

  • feat(lib): add docstrings to gcs/http/local backend resources #1803
  • feat(lib): add a warning about id fields #1802
  • feat(docs): add guidance around secrets and warn that those values might be inlined in the generated Terraform config #1801
  • feat(lib): add docstrings to cos/etcd/etcdv3 backend resources #1783
  • feat(lib): add docstrings to artifactory/azurerm/consul backend resources #1781
  • feat(lib): add docstrings to S3 backend resource #1780
  • feat(release): support running releases on backport-release branches besides only on main #1770
  • feat(cli): add cdktf provider add command #1761
  • feat(provider-generator): Use ComplexList for any complex list #1725

test

  • test(lib): ensure list mapper does not fail when passed IResolvables #1791

chore

  • chore: group needs to be prefixed per type #1813
  • chore: limit CI concurrency to the latest pushed commits #1810
  • chore(cli): add sentry error reporting #1809
  • chore: document computed map reference documentation #1775
  • chore(release): Update changelog to contain backported release for 0.10.4 #1773
  • chore(docs): document how to debug cdktf programs #1758

v0.10.4

04 May 14:49
abbf494
Compare
Choose a tag to compare

fix

  • fix(cli): Stop pinning jest in TS init template #1769

v0.10.3

28 Apr 08:12
1d3fb97
Compare
Choose a tag to compare

feat

  • feat(provider-generator): emit a versions.json file to the output directory, containing the used provider versions #1749
  • feat(cli): debug command #1731

chore

  • chore(cli): add environment variable to disable version checks #1757
  • chore: drop Terraform v0.15.7 from Docker image and replace with v1.1.9 for running tests #1747
  • chore: add Terraform v1.1.9 to Docker image #1743
  • chore(docs): update env var usage #1693

fix

  • fix(lib): Add new optional AWS route attributes #1755
  • fix(cli): handle version check more defensively #1753
  • fix(cli): we should not send wait for approval if a stop has been issued #1740
  • fix(cli): Fix indentation of RemoteBackend in CSharp and Java template #1733
  • fix(cli): fix templates to properly indent cdktf.json and add RemoteBackend in TS template #1732

v0.10.2

19 Apr 14:43
f4723df
Compare
Choose a tag to compare

fix

  • fix(tests): pin awscc version #1727
  • fix(cli): return non-zero exit code in case of error when using cdktf diff #1726
  • fix(cli): allow init command to run in a directory containing a README.md #1722
  • fix(provider-generator): Include "arn" when assignable #1716
  • fix(hcl2cdk): detect list extensions in strings and wrap them in an array #1707
  • fix(lib): override values containing intrinsic tokens caused an infinite loop #1702
  • fix(lib): contextualize error messages in terraform functions #1699
  • fix(cli): fix path for .terraform directory #1694
  • fix(cli): improve cli error handling #1687

chore

  • chore: align versions to an unpublished version #1718
  • chore(docs): update convert docs #1701
  • chore(docs): update aspect docs #1690
  • chore: npm-check-updates && yarn upgrade #1683

test

  • test(hcl2cdk): add test case for property renaming #1709

feat

  • feat(cli): warn users about misaligned CLI and library versions #1700
  • feat(lib): improve error messages around misused list mutation #1691

v0.10.1

01 Apr 15:23
9a59a03
Compare
Choose a tag to compare

fix

  • fix(cli): fix convert single blocks as array bug #1680
  • fix(cli): Only print error that's thrown #1678

refactor

  • refactor(tests): move from table driven tests to functional way #1679
  • refactor(cli): remove xstate as state machine #1670

chore

  • chore(docs): update project maturity statement #1676
  • chore(docs): add sidebar link #1674
  • chore: add extra column for PRs outside our main repo #1673

feat

  • feat(cli): support HTTP_PROXY for Terraform Cloud #1507

v0.10.0

30 Mar 15:28
178d43f
Compare
Choose a tag to compare

Breaking Changes

Remove cdktf synth --json Option #1640

If you are using cdktf synth --json <stack-name> to get the synthesized JSON configuration for your Stack, you will now need to run cdktf synth && cat ./cdktf.out/stacks/<stack-name>/cdk.tf.json instead. The ./cdktf.out part is your output directory (set by cdktf.json or via the --output flag).

Model ComplexComputedLists as ComplexLists and ComputedObjects #1499

In an effort to streamline the interfaces of resources, computed attributes of the type list and set are now modeled as a separate ComplexList type instead of being a method that directly takes an index and returns an item. This change also did change the type of the index from string to number.

Typescript

// previously
const firstItemId = resource.listAttribute("0").id;

// new
const firstItemId = resource.listAttribute.get(0).id;
const firstItem = resource.listAttribute.get(0); // now possible

Python

first_item_id = resource.list_attribute("0").id;

v0.9.4

24 Feb 16:14
b9a68c7
Compare
Choose a tag to compare

fix

  • fix(lib): check for null objects and don't try to reverse undefined or null #1592

chore

  • chore(cli): fix typo in test assertion #1591

v0.9.3

24 Feb 13:29
f8406c4
Compare
Choose a tag to compare

feat

  • feat(examples): Add Scaleway Golang example #1576

fix

  • fix(cli): convert failed with a single provider passed #1588
  • fix(tests): Windows needs special docker host override to work #1567