Skip to content

Commit

Permalink
Merge branch 'main' into use-terraform-cli-for-tfc
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Jul 25, 2022
2 parents c60cdbd + cccfe3d commit daf70d7
Show file tree
Hide file tree
Showing 137 changed files with 175,313 additions and 26,157 deletions.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Question
url: https://discuss.hashicorp.com/c/terraform-core/cdk-for-terraform/47
about: 🙋 For usage questions that may not require a core maintainer to answer, post in our community forum
- name: Terraform Cloud/Enterprise Troubleshooting
url: https://support.hashicorp.com/hc/en-us/requests/new
about: For issues related to the Terraform Cloud/Enterprise platform, please submit a HashiCorp support request or email tf-cloud@hashicorp.support
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ packages/**/dist
dist
packages/@cdktf/provider-generator/edge-provider-bindings
test/edge-provider-bindings
!tools/documentation-generation/generate-documentation.js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

Previously we would throw an error and exit with 1 if there were no provider or module specifications in the `cdktf.json` file. This can be inconvenient if `cdktf get` is part of a workflow.

### `Fn.merge` is split into `Fn.mergeLists` and `Fn.mergeMaps`

The Terraform `merge` function can merge both lists and maps, but this can cause [issues](https://github.com/hashicorp/terraform-cdk/issues/1653) when using the result in a typed language. Therefore we split it into `Fn.mergeLists` and `Fn.mergeMaps`, this means you need to change your cdktf programs code.

## 0.11.2

### feat
Expand Down
44 changes: 40 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,53 @@ For development, you'd likely want to run:
$ yarn watch
```

This will watch for changes for the packages `cdktf` and `cdktf-cli`.
This will watch for changes in all packages.

### CLI changes

If your changes target only CLI and packages used by the CLI, running `yarn watch` will be sufficient. Although it's technically a bit different from what we ship you should be able to use a direct path to our binary entry point to execute commands. You can put this in a shell alias like this:

```shell
alias cdktfl='/path/to/terraform-cdk/packages/cdktf-cli/bin/cdktf' # For running cdktf locally
alias cdktfld='node --inspect-brk /path/to/terraform-cdk/packages/cdktf-cli/bin/cdktf.js' # For running cdktf locally with debugging

$ cdktfl get
```

### Library changes

If you make changes to the library you need to run `yarn build && yarn package` to run tests against the new version. You should be able to use the typescript examples by just running `yarn watch`.

## Tests

If you just want to run the tests:

```shell
$ yarn test
$ yarn test # to run all tests at once
$ yarn test:watch # to run all tests in watch mode
```

To run integration tests, package and run integration tests.

```shell
$ yarn package
$ yarn integration
$ yarn integration # For all integration tests
$ yarn integration:single -- typescript/synth-app # For a single integration test
```

````
If you need to update the snapshot tests, please run this for the unit tests:
```shell
$ yarn test:update
````

To update the integration tests, please run this:

```shell
$ yarn integration:update # For all integration tests
$ yarn integration:single -- -u typescript/synth-app # For a single integration test
```

## Local Usage
Expand Down Expand Up @@ -207,7 +239,7 @@ reset the `FEATURE_FLAGS` map for the next cycle.

## Debugging

We recommend enabling logging when you develop new features. To get detailed information about CDKTF operations, set `CDKTF_LOG_LEVEL` to `verbose`.
We recommend enabling logging when you develop new features. To get detailed information about CDKTF operations, set `CDKTF_LOG_LEVEL` to `debug`.

## Releasing

Expand Down Expand Up @@ -314,3 +346,7 @@ Here are GitHub links that help this process:
## Reproducing Bugs on Windows

A good way to tackle windows related things is to use an AWS EC2 instance running Windows. Here's a Terraform repo with a bit of guideline on how to connect via Remote Desktop or VS Code Remote SSH https://github.com/skorfmann/windows-test-machine

## Documentation

The markdown files containing the documentation for CDK for Terraform are in the [`/website`](./website) directory. Refer to the [website README](./website/README.md) for more information.
4 changes: 2 additions & 2 deletions examples/typescript/aws-cloudfront-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/aws-kubernetes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/aws-multiple-stacks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"typescript": "^3.9.10",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"cdktf-cli": "0.0.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/aws-prebuilt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/azure-app-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
"node": ">=14.0"
},
"dependencies": {
"@cdktf/provider-azurerm": "^0.8.4",
"@cdktf/provider-azurerm": "^0.8.15",
"cdktf": "^0.6.2",
"constructs": "^10.0.25"
},
"devDependencies": {
"@types/jest": "^27.5.2",
"@types/node": "^16.11.43",
"@types/node": "^16.11.45",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/azure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/backends/azurerm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/backends/gcs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
6 changes: 2 additions & 4 deletions examples/typescript/backends/remote/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"//": "This example test is disabled via the 'private' attribute since it needs credentials (I assume at least)",
"name": "@examples/typescript-backends-remote",
"private": true,
"version": "1.0.0",
"main": "main.js",
"types": "main.ts",
Expand All @@ -26,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/backends/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"ts-node": "^10.8.2",
"@types/node": "^14.18.22",
"ts-node": "^10.9.1",
"typescript": "^3.9.10",
"jest": "^27.5.1",
"cdktf-cli": "0.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/google-cloudrun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/google/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/kubernetes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
6 changes: 3 additions & 3 deletions examples/typescript/provisioner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"constructs": "^10.0.25"
},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "^14.18.12",
"ts-node": "^10.7.0",
"@types/jest": "27.5.2",
"@types/node": "^14.18.22",
"ts-node": "^10.9.1",
"typescript": "^3.9.10",
"jest": "^27.5.1",
"cdktf-cli": "0.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/ucloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
4 changes: 2 additions & 2 deletions examples/typescript/vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
},
"devDependencies": {
"@types/jest": "27.5.2",
"@types/node": "^14.18.21",
"@types/node": "^14.18.22",
"cdktf-cli": "0.0.0",
"jest": "^27.5.1",
"ts-node": "^10.8.2",
"ts-node": "^10.9.1",
"typescript": "^3.9.10"
}
}
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"examples/java/*",
"examples/csharp/*",
"examples/go/*",
"test/*"
"test/*",
"tools/*"
],
"npmClient": "yarn",
"useWorkspaces": true,
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"link-packages": "lerna exec --scope 'cdktf*' --scope @cdktf/* yarn link",
"integration": "cd test && yarn edge:install && ./run-against-dist npx jest --runInBand",
"integration:update": "cd test && yarn && yarn edge:install && NODE_OPTIONS='--max-old-space-size=7168' ./run-against-dist npx jest -u --runInBand",
"integration:single": "cd test && ./run-against-dist npx jest --runInBand",
"integration:typescript": "cd test && ./run-against-dist npx jest --runInBand typescript",
"integration:python": "cd test && ./run-against-dist npx jest --runInBand python",
"integration:csharp": "cd test && ./run-against-dist npx jest --runInBand csharp",
Expand All @@ -38,7 +39,8 @@
"prepare": "husky install",
"prepare-next-release": "standard-version --prerelease pre --release-as minor --skip.changelog=true --skip.commit=true",
"prepare-release": "tools/prepare-release.sh",
"release": "standard-version"
"release": "standard-version",
"generate-docs": "cd tools/documentation-generation && yarn && yarn docs && npx prettier --write ../../website/docs/cdktf/api-reference/*.mdx"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -78,6 +80,7 @@
"standard-version": "^9.5.0"
},
"lint-staged": {
"packages/cdktf": "yarn docs",
"**/*.{ts,tsx,js,css,md}": "prettier --write"
},
"eslintConfig": {
Expand Down

0 comments on commit daf70d7

Please sign in to comment.