Releases: hashicorp/terraform-cdk
v0.10.0
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
v0.9.3
v0.9.2
v0.9.1
feat
- feat(cli): show help when no command is passed #1540
fix
- fix(tests): run package before running unit tests in release pipelines #1563
- fix(hcl2cdk): handle no providers passed and add cdktf import for remote state data sources #1561
- fix(cli): Fix template for Go not adding jsii import when using Terraform Cloud #1556
- fix(lib): Add missing regex Function #1531
- fix(cli): add better messaging on inint #1524
- fix(docs): fix a typo in serverless-application-typescript.md #1517
- fix(provider-generator): Replace jsii incompatible names #1516
- fix(provider-generator): don't build generated edge provider output as part of building the provider-generator #1509
- fix(tests): add
--ci
flag to jest invocations when in CI #1498 - fix: stringValue rated valid strings as unescaped double quotes #1566
- chore(deps): upgrade jsii (substantially improves cdktf get performance for Go) #1558
- fix(cli): reflect correct node version requirement #1573
chore
- chore(docs): we now support cross stack refs, the section is no longer needed #1571
- chore(docs): remove old docs files #1542
- chore(docs): Update main from stable-website #1529
- chore(docs): remove old layouts folder #1522
- chore(docs): Merge stable-website into main #1515
- chore(docs): add 0.9 upgrade guide #1512
test
- test(hcl2cdk): check if produced code can generate HCL #1539
v0.9.0
Breaking Changes
Standardize IResolvable Usage #1299
This is an effort to make sure attributes can be freely passed between resources for all different types.
There is a minor breaking change:
count
on resources and data sources has gone fromnumber | cdktf.IResolvable
tonumber
. If code was previously passing anIResolvable
, it will now need to useToken.asNumber()
Map Tokens #1411
As part of an effort to use more native types, there are now tokens for maps of primitive values.
As a result, there is a minor breaking change:
- Map attributes have gone from
{ [key: string]: TYPE } | cdktf.IResolvable
to{ [key: string]:TYPE }
whenTYPE
isstring, number, or boolean
.- The most common impact is maps created by using Terraform functions (
Fn.(...)
) will now need to be passed toToken.as<String/Number/Boolean>Map()
before assigning to a resource attribute.
- The most common impact is maps created by using Terraform functions (
Number[] Tokens #1471
As part of an effort to use more native types, there are now tokens for number[]
.
This is mostly an internal change, but there is now Token.asNumberList()
which can be used to convert other values into number[]
.
As a result of some standardization, there is a minor breaking change:
- Boolean[] attributes have gone from
boolean[]
toArray<boolean | IResolvable> | IResolvable
.- This is done because neither
boolean
orboolean[]
is representable by a token. - This should make it easier to pass around
boolean[]
between resources and fuctions. - For jsii languages (especially Java and C#), these types will end up as
List<Object>
.
- This is done because neither
feat
- feat(cli): output command #1495
- feat(lib): cross-stack references #1416
- feat(lib): cross stack references other backends #1488
- feat(lib): Allow relative assets #1346
- feat(lib): Create assets for local modules #1476
- feat(lib): number[] Tokens #1471
- feat(lib): produce stable
cdk.tf.json
output #1454 - feat(lib): Initial improvements for set support #1415
- feat(lib): Map Tokens #1411
- feat(provider-generator): reference computed values nested in lists #1468
- feat(tests): add test which confirms that modules now support sets #1497
fix
- fix(cli): speed up shell autocompletions #1496
- fix(cli): remove deprecated -state option #1461
- fix(lib): resolve objects correctly in cross stack references #1487
- fix(docs): fix typo #1387
- fix: increase memory for
integration:update
command #1490
chore
- chore(examples): Added go/azurerm examples #1275
- chore(lib): Standardize IResolvable usage #1299
- chore(docs): document pinning state to stack #1504
- chore(docs): link to AWS Constructs base class #1473
- chore(docs): Final Docs Migration Cleanup #1431
- chore(docs): Manual windows testing #1407
- chore: migrate docs to mdx #1421
- chore: store website nav files #1434
- chore: update example for azure app service #1484
- chore: add tooling for an automated issue dashboard #1474
- chore: decrease update speed of the project board #1485
- chore: npm-check-updates && yarn upgrade #1477
- chore: npm-check-updates && yarn upgrade #1489
- chore: npm-check-updates && yarn upgrade #1503
- chore: remove patch file created through update automation #1491