Releases: hashicorp/terraform-cdk
v0.20.0
Breaking changes
Module names / import paths changing
To resolve #3026 we improved the logic for generating names for Terraform Modules. This makes the default module names nicer, but also leads to breaking changes for Python, C#, and Java. When updating CDKTF, please generate the new bindings with cdktf get
after updating the CLI and update your module imports.
Removal of deprecated backends
We have removed deprecated backends artifactory, etcd, etcdv3, manta, and swift. CDK for Terraform v0.14 deprecated these backends initially. Terraform removed these backends in v1.3. For migration paths from these removed backends, refer to Upgrading to Terraform v1.3.
Python 3.7 is no longer supported
We have dropped support for Python 3.7, please update to Python 3.8 or higher.
feat
- feat: Synthesis in HCL #3365
- feat(lib): update backend options #3352
- feat: add Terraform 1.6.5 to Docker image #3336
- feat(docs): Add note to address having the same name as new Terraform stacks feature #3333
- feat(lib): Add support for the built-in Terraform data resource #3317
- feat(lib): add
.allWithMapKey
iterator to lists #3299 - feat(lib): Add DynamicListTerraformIterator with support for lists or sets with objects that have properties that are only known at apply time #3273
- feat(lib): allow chaining of TerraformIterator created resources #3272
- feat(lib): add move workflows for specifying ids directly #3231
fix
- fix pipenv build #3364
- fix(cli): Handle overlapping resource names in augmented logs #3343
- fix: Terraform Modules relatively referencing each other with generated bindings #3341
- fix(lib): respect AppOption.outdir before env var #3334
- fix(provider-generator): use module name that does not collide commonly #3332
- fix(lib): Fix handling of replaceTriggeredBy lifecycle attribute #3322
- fix(cli): error message for non-existent tf cloud orgs #3308
- fix(provider-generator): provided name does not need to match name in source #3305
- fix(provider-generator): don't require attributes to be set on nested_type #3304
- fix(lib): improve error messages for token resolution #3300
- fix: Use unique names to see if Github filters can pick it up #3291
- fix(tests): Update provider version in C# snapshot test #3289
- fix: Use an additional results step to ensure dynamic matrix jobs can… #3288
- fix(provider-generator): fix oci provider by skipping attributes that conflict after being camel cased #3285
- fix(lib): expose
conditional
#3264 - fix: lower cache usage by reusing more of the yarn caches #3162
chore
- chore: cd into dist/python #3400
- chore: simplify python release #3399
- chore: remove set in gh action script #3398
- chore: fix python publishing #3397
- chore: Upgrade dependencies for @cdktf/hcl2json #3392
- chore: Upgrade dependencies for @cdktf/provider-schema #3391
- chore: Upgrade dependencies for cdktf #3390
- chore: Upgrade dependencies for @cdktf/cli-core #3389
- chore: Upgrade dependencies for @cdktf/commons #3388
- chore: Upgrade dependencies for @cdktf/provider-generator #3387
- chore: set include-system-site-packages=true for python release #3386
- chore: set include-system-site-packages=true for python release #3385
- chore: activate virtual env in same shell #3384
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3383
- chore: use publib for releases #3382
- chore: enable python virtual environment before releasing #3381
- chore: run python tests in virtual env #3379
- chore: npm-check-updates && yarn upgrade #3377
- chore: Upgrade dependencies for @cdktf/commons #3375
- chore: Upgrade dependencies for @cdktf/cli-core #3373
- chore: Upgrade dependencies for cdktf #3371
- chore: run prettier #3369
- chore: update required python version in examples #3368
- chore: use --break-system-packages to install pipenv and pipx globally #3367
- chore: use activated virtual env in docker #3366
- chore: update docker base image #3363
- chore: fix aspects documentation #3362
- chore: Use locally built bindings for ts provider doc example #3359
- chore: add a subshell #3357
- chore: full checkout and deal with empty lists #3356
- chore: disable test for TF 1.5.5 #3354
- chore: delete old branches before docs rollout #3353
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3351
- chore: Upgrade dependencies for @cdktf/provider-generator #3347
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3346
- chore: document correct environment variable #3344
- chore: pin all dependencies #3340
- chore: update CI to run against TF 1.6.5 and 1.5.5 #3338
- chore: update CI to run against TF 1.5 and 1.4 #3335
- chore: Upgrade dependencies for @cdktf/provider-generator #3330
- chore: Upgrade dependencies for @cdktf/provider-schema #3324
- chore: update terraform functions #3319
- chore(provider-generator): fix typo in docstring #3316
- chore: remove label action #3315
- chore(tests): re-enable provider schema tests #3314
- chore(lib): Formalize error messages in lib #3312
- chore: ignore nx cache #3303
- chore: re-enable operator example #3302
- chore: remove reference to mergeLists #3301
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3293
- chore: Run all tests per PR unless skipped #3286
- chore: remove tabs in documentation #3284
- chore: Upgrade dependencies for @cdktf/hcl2json #3283
- chore: U...
v0.19.2
v0.19.1
feat
- feat(cli): Include provider info in cdktf debug #3190
fix
- fix(cli): Don't send telemetry events if request body is larger than 8KB #3255
chore
- chore: disable provider schema tests #3257
- chore: update cdktf version being used in documentation tool #3256
- chore: fix provider-schema tests #3254
- chore: update registry docs version #3249
- chore: Upgrade dependencies for @cdktf/hcl2json #3248
- chore: Upgrade dependencies for cdktf #3247
- chore: Upgrade dependencies for @cdktf/provider-schema #3246
- chore: Upgrade dependencies for @cdktf/provider-generator #3245
- chore: Upgrade dependencies for @cdktf/commons #3241
- chore: use no scope for commit message #3240
- chore: run yarn upgrade per package #3212
- chore: fix link to refactoring guide #3211
- chore: add tags to jsii-terraform image #3210
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3208
- chore: add @cdktf/provider-schema tests to CI #3203
- chore: update zod #3200
v0.19.0
Breaking changes
Minimum required Node.js version updated to 18.12
Since the long-term support for Node.js 16 ended on 2023-09-11, we updated our minimum compatible Node.js version to 18.12.
Potential provider naming collision with instance function moveTo
on TerraformResource
We have added support for resource refactoring and renaming with the addition of the instance function moveTo
on TerraformResource
. We forsee the potential for naming collision with providers using moveTo
as an attribute. In instances where provider bindings fail to compile due to the collision, regenerate your provider bindings and replace the provider related usage of moveTo
to moveToAttribute
in your configuration if applicable.
Java: codeMakerOutput
needs to be set to a company identifier
We did not honor the codeMakerOutput
setting in the cdktf.json
previously, this is fixed now.
To have no changes in the generated code you can set codeMakerOutput: "imports"
.
If you like, you can now set it to your company name, e.g. codeMakerOutput: "com.hashicorp"
so that the provider is generated under the com.hashicorp.aws
namespace for example. Omitting the codeMakerOutput
will lead to the default value .gen
being used and results in an error.
feat
- feat(lib): add resource move functionality #3152
- feat: add import capabilities to cdktf #2972
- feat!: update minimum required Node.js version to 18.12 (LTS) #3181
fix
- fix(provider-generator): java akamai provider generation #3185
- fix: use codemaker output in java #3000
chore
v0.18.2
v0.18.1
fix
- fix(docs): Fix typo in example of using TFVAR to set TerraformVariable #3116
- fix(provider-generator): make sanitize comments function robust against diverse inputs #3131
- fix(cli): fix help template spelling #3146
- fix(cli): ensure terraform output fails with a proper error #3135
- fix: make sure noColor option is honored #3138
- fix(hcl2cdk): Try to fix TF checksum errors in tests by running them in band #3163
- fix: use whl to install local python #3119
- fix: fix Github workflow caches to restore successfully more often #3154
- fix: set specific copywrite tool version to fix CI #3150
- fix: unpin version of copywrite #3151
chore
- chore: Upgrade docker image to use Node 18 #3107
- chore: fix passing additional providers #3092
- chore(docs): fix grammar and spelling on Performance page #3098
- chore: fix typo #3091
- chore(cli): fixes typo (#3120) #3121
- chore: fix typo in registry workflow #3100
- chore: fix remove-waiting-on-answer workflow #3097
- chore: ensure GitHub treats us as a TypeScript project #3099
- chore: update registry tool #3101
- chore: update dependencies for @cdktf/commons #3096
- chore: update cdktf version #3090
- chore: remove obsolete comment #3137
refactor
- refactor: move schema reading logic into package #3124
v0.18.0
chore
- chore: Disable windows integration tests temporarily #3086
- chore: update jsii-srcmak #3081
- chore: fix assertion of java tests #3079
- chore: add wget #3075
- chore: use gh cli to create PRs #3074
- chore(deps): roll back trusted workflow updates #3073
- chore: add gradle as a dependency for our tests #3066
- chore: new lookup functionality changes assertion #3065
- chore: update terraform versions we test again #3064
- chore: add link to performance page #3060
- chore(examples): update TS examples to use explicit imports #3053
- chore: update tfe docs as well #3050
- chore: remove waiting-on-answer label on comments #3046
- chore(deps): pin trusted workflows based on HashiCorp TSCCR #3040
- chore: add workflow to rollout provider documentation #3039
- chore: clean up code a bit #3037
- chore: fix links in README #3016
fix
- fix: provider add java integration test failures due to test setup #3083
- fix: Gradle related provider add/list/upgrade #3080
- fix(cli): cdktf debug to read gradle package versions #3077
- fix(provider-generator): Handle */ in docstrings better, try 3 #3076
- fix(lib): improve error message for passing an app to a construct #3062
- fix(tests): remove only in test suite 😅 #3055
- fix: install pipenv in Docker #3052
- fix: install python3-venv and pin base image #3049
- fix: correctly handle if version constraint is defined as star #3045
- fix: fix single quote escaping #3018
- fix(hcl2cdk): correctly keep escape sequences for interpolations in template expressions #3017
- fix(examples): Properly set the Aspect on the stack instead of on the S3Bucket only #3003
feat
- feat(hcl2cdk): use Fn.lookupNested() instead of propertyAccess() #3056
- feat(cli): move java template to gradle #3048
- feat(cli): support gradle projects in provider add and list #3047
- feat(docs): Link Registry docs blog post #3043
- feat: remove root-level import of all modules in python #3030
- feat(provider-generator): handle 'tuple' type for variable #2964
Breaking changes
Python performance improvements disable root-level provider imports
When using a Provider in python one could previously import the resource and data source namespaces on the root level. This is no longer possible and the namespaces must be imported through specifying the paht in the import. The syntax was supported before as well, so you can change your code within 0.17.x
and then upgrade to 0.18.x
.
Before:
from constructs import Construct
from cdktf import App, TerraformStack
from imports.aws import provider, sns_topic, lambda_function, iam_role
class MyStack(TerraformStack):
def __init__(self, scope: Construct, ns: str):
super().__init__(scope, ns)
provider.AwsProvider(self, 'Aws', region='eu-central-1')
sns_topic.SnsTopic(self, 'Topic', display_name='my-first-sns-topic')
role = iam_role.IamRole(self, 'Role', name='lambda-role',
assume_role_policy='{}')
lambda_function.LambdaFunction(self, 'Lambda', function_name='my-first-lambda-function',
role=role.arn, handler='index.handler', runtime='python3.6')
app = App()
MyStack(app, "before-change")
app.synth()
After:
from constructs import Construct
from cdktf import App, TerraformStack
from imports.aws.provider import AwsProvider
from imports.aws.sns_topic import SnsTopic
from imports.aws.lambda_function import LambdaFunction
from imports.aws.iam_role import IamRole
class MyStack(TerraformStack):
def __init__(self, scope: Construct, ns: str):
super().__init__(scope, ns)
AwsProvider(self, 'Aws', region='eu-central-1')
SnsTopic(self, 'Topic', display_name='my-first-sns-topic')
role = IamRole(self, 'Role', name='lambda-role',
assume_role_policy='{}')
LambdaFunction(self, 'Lambda', function_name='my-first-lambda-function',
role=role.arn, handler='index.handler', runtime='python3.6')
app = App()
MyStack(app, "after-change")
app.synth()
v0.17.3
v0.17.2
feat
- feat(cli): allow skipping synth #2993
fix
- fix(provider-generator): wrap dynamic block iterator .key and .value in Token.asString as simply concatenating it won't work in non-TS languages #3014
- fix: remove old lerna option causing it to fail when building a matrix in CI runs #3004
- fix: quote files in shared workflows #2994
- fix: let workflow checkout different repositories #2991
- fix(provider-generator): sanitize all comments #2990
chore
- chore: fix link to examples #3015
- chore: build example script should show stdout and stderr #3013
- chore: retry pushing converted code in registry conversion #2999
- chore: Convert should use a typescript project to convert within #2992
- chore: update cdk.tf links #2989
- chore: add registry translation workflow #2958
v0.17.1
fix
- fix: Handle */ sequences within variable descriptions and defaults for variables in modules #2986
- fix: Upgrade @inquirer/prompts to resolve #2952 #2977
- fix(tests): update integration test snapshot #2962
- fix(cli): catch possible errors when trying to open a url #2961
- fix(cli): Support PNPM when retrieving package dependency information #2959
- fix(hcl2cdk): parse handling of null providers and aliases #2947
- fix(hcl2cdk): use correct import path per language #2935
- fix: do not always overwrite global.performance #2922
chore
- chore(deps): upgrade semver version #2981
- chore(docs): update doc links to new URLs #2979
- chore: Add regression test for input on init #2978
- chore: Update diagram in docs with new provider count #2974
- chore: trigger project board update when issues modified #2973
- chore: remove project board update script #2970
- chore: use resource name only unless conflict #2956
- chore: remove dependency updates #2950
- chore: correct constructs docs "Through Validations" example #2927