Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report-prebuilt-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ body:
placeholder: |
- #123
- #456
- https://developer.hashicorp.com/terraform/cdktf/concepts/aspects
- https://cdktn.io/docs/concepts/aspects
validations:
required: false

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ body:
placeholder: |
- #123
- #456
- https://developer.hashicorp.com/terraform/cdktf/concepts/aspects
- https://cdktn.io/docs/concepts/aspects
validations:
required: false

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body:
placeholder: |
- #123
- #456
- https://developer.hashicorp.com/terraform/cdktf/concepts/aspects
- https://cdktn.io/docs/concepts/aspects
validations:
required: false

Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Since long-term support for Node.js 18 has ended, we updated our minimum compati

**AWS Provider changes (breaking)**

The AWS pre-built provider for Go is currently too large to be installed due to a hard limit in Go. This release adds skipping the `statement` block in the `rule` block of the `aws_wafv2_web_acl` and `aws_wafv2_rule_group` resources. Our [resource docs page](https://developer.hashicorp.com/terraform/cdktf/concepts/resources#special-cases) previously already mentioned that these resources have skipped attributes but they weren't actually skipped. This almost doubled AWS provider bindings in size due to the recursive nature of the `statement` block.
The AWS pre-built provider for Go is currently too large to be installed due to a hard limit in Go. This release adds skipping the `statement` block in the `rule` block of the `aws_wafv2_web_acl` and `aws_wafv2_rule_group` resources. Our [resource docs page](https://cdktn.io/docs/concepts/resources#special-cases) previously already mentioned that these resources have skipped attributes but they weren't actually skipped. This almost doubled AWS provider bindings in size due to the recursive nature of the `statement` block.
If you are using any of these two resources, the `statement` now has to be passed as a plain object instead and its keys have to be snake-cased (e.g. `and_statement` or `regex_match_statement`).

### feat
Expand Down Expand Up @@ -358,7 +358,7 @@ If you are using any of these two resources, the `statement` now has to be passe

### Module names / import paths changing

To resolve [\#3026](https://github.com/hashicorp/terraform-cdk/issues/3026) we improved the logic for generating names for [Terraform Modules](https://developer.hashicorp.com/terraform/cdktf/concepts/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.
To resolve [\#3026](https://github.com/hashicorp/terraform-cdk/issues/3026) we improved the logic for generating names for [Terraform Modules](https://cdktn.io/docs/concepts/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

Expand Down Expand Up @@ -1257,7 +1257,7 @@ A broken import that only appeared in the bundled `cdktf-cli` that we publish br
## 0.14.0

**Breaking changes**
Back in October, we [announced significant performance improvements with CDKTF version 0.13](https://www.hashicorp.com/blog/cdk-for-terraform-0-13-significantly-improves-performance). These improvements required breaking changes for which we provided backward-compatible provider bindings in version 0.13. As announced, the 0.12 (non-namespaced) provider bindings will no longer work starting with CDKTF 0.14. Refer to the [upgrade guide for 0.13](https://developer.hashicorp.com/terraform/cdktf/release/upgrade-guide-v0-13) to learn how to update your imports for these changes.
Back in October, we [announced significant performance improvements with CDKTF version 0.13](https://www.hashicorp.com/blog/cdk-for-terraform-0-13-significantly-improves-performance). These improvements required breaking changes for which we provided backward-compatible provider bindings in version 0.13. As announced, the 0.12 (non-namespaced) provider bindings will no longer work starting with CDKTF 0.14. Refer to the [upgrade guide for 0.13](https://cdktn.io/docs/release/upgrade-guide-v0-13) to learn how to update your imports for these changes.

### feat

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ Choose a language:

Refer to the [CDKTF documentation](https://developer.hashicorp.com/terraform/cdktf) for more detail about how to build and manage CDKTN applications, including:

- [Application Architecture](https://developer.hashicorp.com/terraform/cdktf/concepts/cdktf-architecture): Learn the tools and processes that CDKTN uses to leverage the Terraform ecosystem and convert code into Terraform configuration files. It also explains the major components of a CDKTN application and how those pieces fit together.
- [Application Architecture](https://cdktn.io/docs/concepts/cdktn-architecture): Learn the tools and processes that CDKTN uses to leverage the Terraform ecosystem and convert code into Terraform configuration files. It also explains the major components of a CDKTN application and how those pieces fit together.

- [Project Setup](https://developer.hashicorp.com/terraform/cdktf/create-and-deploy/project-setup): Learn how to create a new CDKTN project from a pre-built or custom template. Also learn how to convert an existing HCL project into a CDKTN application.
- [Project Setup](https://cdktn.io/docs/create-and-deploy/project-setup): Learn how to create a new CDKTN project from a pre-built or custom template. Also learn how to convert an existing HCL project into a CDKTN application.

- [Unit Tests](https://developer.hashicorp.com/terraform/cdktf/test/unit-tests): Learn how to test your application in Typescript with jest.
- [Unit Tests](https://cdktn.io/docs/test/unit-tests): Learn how to test your application in Typescript with jest.

- [Examples](https://developer.hashicorp.com/terraform/cdktf/examples-and-guides/examples): Reference example projects in every supported language and review explanatory videos and other resources.
- [Examples](https://cdktn.io/docs/examples-and-guides/examples): Reference example projects in every supported language and review explanatory videos and other resources.

## Community

Expand Down
2 changes: 1 addition & 1 deletion RFCs/RENAME.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ We will need to provide a robust `cdktn upgrade` or `cdktn migrate` command.
* @cdktf/commons -> getPackageVersion(language, "cdktn") (used by cmd handlers and check environment)
* links to old repo blobs, issues, docs, ...
- https://github.com/hashicorp/terraform-cdk/blob/1fb8588095a55d...........
- https://developer.hashicorp.com/terraform/cdktf/............ (until docs site is migrated)
- https://cdktn.io/docs/............ (until docs site is migrated)

## 8. Infra

Expand Down
2 changes: 1 addition & 1 deletion packages/@cdktn/hcl2cdk/lib/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ async function asExpression(
t.addComment(
importExpression,
"leading",
`This import was configured with a provider. CDKTN does support this, but the cdktn convert command does not yet. Please add the provider reference manually. See https://developer.hashicorp.com/terraform/cdktf/concepts/resources#importing-resources for more information.`,
`This import was configured with a provider. CDKTN does support this, but the cdktn convert command does not yet. Please add the provider reference manually. See https://cdktn.io/docs/concepts/resources#importing-resources for more information.`,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MyConvertedCode extends TerraformStack {
ami: "some-ami",
instanceType: "t3.micro",
});
/*This import was configured with a provider. CDKTN does support this, but the cdktn convert command does not yet. Please add the provider reference manually. See https://developer.hashicorp.com/terraform/cdktf/concepts/resources#importing-resources for more information.*/
/*This import was configured with a provider. CDKTN does support this, but the cdktn convert command does not yet. Please add the provider reference manually. See https://cdktn.io/docs/concepts/resources#importing-resources for more information.*/
example.importFrom("i-abcd1234");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { confirm } from "@inquirer/prompts";
export async function askForCrashReportingConsent() {
return await confirm({
message:
"Do you want to send crash reports to the CDKTN team? Refer to https://developer.hashicorp.com/terraform/cdktf/create-and-deploy/configuration-file#enable-crash-reporting-for-the-cli for more information",
"Do you want to send crash reports to the CDKTN team? Refer to https://cdktn.io/docs/create-and-deploy/configuration-file#enable-crash-reporting-for-the-cli for more information",
default: true,
});
}
44 changes: 22 additions & 22 deletions packages/cdktn/lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const noAppFound = (constructPath: string) =>
new Error(
`No app could be identified for the construct at path '${constructPath}' (likely a TerraformStack).
The scope of CDKTN's TerraformStack class is a single App instance created by 'const app = new App()'. The App is your project's root, holding project configuration and validations.
Learn more about the App: https://developer.hashicorp.com/terraform/cdktf/concepts/cdktf-architecture#app-class:~:text=and%20Resource.-,App%20Class,-Each%20CDKTF%20project
Learn more about the App: https://cdktn.io/docs/concepts/cdktn-architecture#app-class
`,
);

Expand All @@ -35,23 +35,23 @@ export const assetOutOfScopeOfCDKTFJson = (id: string, configPath: string) =>

The cdktf.json file is needed to establish the base for the relative path (the '.' in './foo/bar').

Place a cdktf.json at the root of your project. Learn more: https://developer.hashicorp.com/terraform/cdktf/create-and-deploy/configuration-file
Learn more about TerraformAsset: https://developer.hashicorp.com/terraform/cdktf/concepts/assets
Place a cdktf.json at the root of your project. Learn more: https://cdktn.io/docs/create-and-deploy/configuration-file
Learn more about TerraformAsset: https://cdktn.io/docs/concepts/assets
`,
);

export const assetExpectsDirectory = (id: string, configPath: string) =>
new Error(
`TerraformAsset ${id} expects path to point to a directory. Instead, this file was passed: '${configPath}'. Please correct the path to point to a directory.
Learn more about TerraformAsset: https://developer.hashicorp.com/terraform/cdktf/concepts/assets
Learn more about TerraformAsset: https://cdktn.io/docs/concepts/assets
`,
);

export const assetTypeNotImplemented = () =>
new Error(`Asset type is not implemented.
Possible Asset types include: FILE, DIRECTORY, and ARCHIVE.
Take one of these values from the AssetType Enum.
Learn more about TerraformAsset: https://developer.hashicorp.com/terraform/cdktf/concepts/assets
Learn more about TerraformAsset: https://cdktn.io/docs/concepts/assets
`);

export const dynamicBlockNotSupported = (_foreachExpression: string) =>
Expand Down Expand Up @@ -116,7 +116,7 @@ export const movedToResourceOfDifferentType = (
The destination "${moveTarget}"'s resource type ${destinationResourceType} differs from the original resource type (${originalResourceType}) you are trying to move.

If this was intentional, try importing the existing resource into your target instead. Learn more:
https://developer.hashicorp.com/terraform/cdktf/concepts/resources#importing-resources
https://cdktn.io/docs/concepts/resources#importing-resources

Note that you must manually remove the original resource from your state file after importing it. Use the "terraform state rm" command in the output directory of the stack you defined this resource in. Learn more:
https://developer.hashicorp.com/terraform/cli/commands/state/rm
Expand All @@ -138,7 +138,7 @@ Move by id: {

Only one move operation can occur per plan/apply. Remove one of the operations.

Learn more about moving resources: https://developer.hashicorp.com/terraform/cdktf/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
Learn more about moving resources: https://cdktn.io/docs/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
`);

export const resourceGivenTwoMoveOperationsById = (
Expand All @@ -160,7 +160,7 @@ The resource ${id} has been given two different move operations.

Only one move operation can occur per plan/apply. Remove one of the operations.

Learn more about moving resources: https://developer.hashicorp.com/terraform/cdktf/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
Learn more about moving resources: https://cdktn.io/docs/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
`);

export const resourceGivenTwoMoveOperationsByTarget = (
Expand All @@ -172,7 +172,7 @@ export const resourceGivenTwoMoveOperationsByTarget = (

A resource can only be moved once per plan/apply.

Learn more about moving resources: https://developer.hashicorp.com/terraform/cdktf/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
Learn more about moving resources: https://cdktn.io/docs/examples-and-guides/refactoring#:~:text=Moving%20%26%20Renaming%20Resources%20Within%20a%20Stack
`);

export const stackContainsDisallowedChar = (
Expand All @@ -198,7 +198,7 @@ export const noStackForConstruct = (constructPath: string, hint: string) =>

You can only use constructs as part of a TerraformStack.

To learn more about Constructs vs. TerraformStacks, refer to: https://developer.hashicorp.com/terraform/cdktf/concepts/constructs#:~:text=Constructs%20vs.%20Stacks
To learn more about Constructs vs. TerraformStacks, refer to: https://cdktn.io/docs/concepts/constructs#:~:text=Constructs%20vs.%20Stacks
`);

export const stackHasCircularDependency = (
Expand All @@ -209,7 +209,7 @@ export const stackHasCircularDependency = (

TerraformStack ${dependency} is already dependent on ${thisStack} directly, or dependent on a TerraformStack within ${thisStack}.

To learn more about circular dependency references, refer to: https://developer.hashicorp.com/terraform/cdktf/concepts/stacks#:~:text=Cross%2DStack%20References
To learn more about circular dependency references, refer to: https://cdktn.io/docs/concepts/stacks#:~:text=Cross%2DStack%20References
`);

export const stackValidationFailure = (errorList: string) =>
Expand All @@ -225,7 +225,7 @@ Ensure you are passing the result of Testing.fullSynth('stack instance') to '${f

Testing.fullSynth returns a file path to a temporary testing environment. Testing.synth returns the JSON representation of your stack.

To learn more about testing in CDKTN, refer to: https://developer.hashicorp.com/terraform/cdktf/test/unit-tests`);
To learn more about testing in CDKTN, refer to: https://cdktn.io/docs/test/unit-tests`);

export const matchersFoundErrorsInStack = (
errorCount: any,
Expand All @@ -242,13 +242,13 @@ export const jestNotInstantiated = () =>

Ensure you have a 'setup.js' file in your project's directory that calls 'cdktn.Testing.setupJest()'.

To learn more about setting up testing, refer to: https://developer.hashicorp.com/terraform/cdktf/test/unit-tests#:~:text=Add%20Testing%20to%20Your%20Application
To learn more about setting up testing, refer to: https://cdktn.io/docs/test/unit-tests#:~:text=Add%20Testing%20to%20Your%20Application
`);

export const expectNotGloballyAccessible = () =>
new Error(`The expect function is not globally accessible.

To learn more about setting up testing, refer to: https://developer.hashicorp.com/terraform/cdktf/test/unit-tests#:~:text=Add%20Testing%20to%20Your%20Application
To learn more about setting up testing, refer to: https://cdktn.io/docs/test/unit-tests#:~:text=Add%20Testing%20to%20Your%20Application
`);

export const invalidStack = (functionName: string, stackContent: string) =>
Expand All @@ -262,13 +262,13 @@ Testing.synth returns the JSON representation of your stack. CDKTN can use asser

Testing.fullSynth returns a file path to a temporary testing environment.

To learn more about testing in CDKTN, refer to: https://developer.hashicorp.com/terraform/cdktf/test/unit-tests
To learn more about testing in CDKTN, refer to: https://cdktn.io/docs/test/unit-tests
`);

export const targetNotResolvableWithOverrides = (target: string) =>
new Error(`Target (${target}) cannot be a resolvable token if you specified overrides. Replace the value of the field you are overriding with a static value.

To learn more about Tokens, refer to: https://developer.hashicorp.com/terraform/cdktf/concepts/tokens
To learn more about Tokens, refer to: https://cdktn.io/docs/concepts/tokens
`);

export const sourceOrTargetNotAnObject = (
Expand Down Expand Up @@ -301,7 +301,7 @@ new CloudBackend(stack, {
workspaces: new NamedCloudWorkspace("my-app"),
});

To learn more about Remote Backends, refer to: https://developer.hashicorp.com/terraform/cdktf/concepts/remote-backends
To learn more about Remote Backends, refer to: https://cdktn.io/docs/concepts/remote-backends
`);

export const valueContainsUnescapedQuotes = (value: string) =>
Expand All @@ -314,7 +314,7 @@ Fn.rawString('${value}')

Doing this ensures CDKTN and Terraform interpret your values correctly.

To learn more about built in Terraform functions within CDKTN, refer to: https://developer.hashicorp.com/terraform/cdktf/concepts/functions
To learn more about built in Terraform functions within CDKTN, refer to: https://cdktn.io/docs/concepts/functions
`,
);

Expand Down Expand Up @@ -469,8 +469,8 @@ Because we don't know the length of the list, we can not differentiate if the li
- If you want to access a singular item, use 'Fn.element(list, 0)'. Do not use 'list[0]'.
- If you want to loop over the list use 'TerraformIterator.fromList(list)'. Do not use a 'for' or 'forEach' loop.

Learn more about tokens: https://developer.hashicorp.com/terraform/cdktf/concepts/tokens
Learn more about iterators: https://developer.hashicorp.com/terraform/cdktf/concepts/iterators`;
Learn more about tokens: https://cdktn.io/docs/concepts/tokens
Learn more about iterators: https://cdktn.io/docs/concepts/iterators`;

const MAP_ERROR_EXPLANATION = `
In CDKTN, we represent maps, with values unknown until after runtime, as objects with a single key-value pair where the value is a string token. For example: '{ "&{TfToken[Token.1]}": "String Map Token Value" }'.
Expand All @@ -482,8 +482,8 @@ Because we don't know the contents of the map, we can not differentiate if the m
- To access a singular item use 'Fn.lookup(map, key)'. Do not use 'map[key]'.
- If you want to loop over the map use 'TerraformIterator.fromMap(map)'. Do not use a 'for' loop or iterate over 'Object.entries(map)' with 'forEach'.

Learn more about tokens: https://developer.hashicorp.com/terraform/cdktf/concepts/tokens
Learn more about iterators: https://developer.hashicorp.com/terraform/cdktf/concepts/iterators`;
Learn more about tokens: https://cdktn.io/docs/concepts/tokens
Learn more about iterators: https://cdktn.io/docs/concepts/iterators`;

export const encodedListTokenInScalarStringContext = () =>
new Error(`Found an encoded list token string in a scalar string context.
Expand Down
Loading
Loading