github hashicorp/terraform-cdk v0.11.0

latest releases: v0.20.9, v0.21.0-pre.128, v0.21.0-pre.127...
2 years ago

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

Don't miss a new terraform-cdk release

NewReleases is sending notifications on new releases.