diff --git a/examples/java/aws/imports/constraints.json b/examples/java/aws/imports/constraints.json new file mode 100644 index 0000000000..3b0dcd81cb --- /dev/null +++ b/examples/java/aws/imports/constraints.json @@ -0,0 +1,6 @@ +{ + "cdktf": "0.18.2", + "providers": { + "aws": "~> 3.0" + } +} diff --git a/examples/java/aws/imports/versions.json b/examples/java/aws/imports/versions.json new file mode 100644 index 0000000000..de4034fda6 --- /dev/null +++ b/examples/java/aws/imports/versions.json @@ -0,0 +1,3 @@ +{ + "registry.terraform.io/hashicorp/aws": "3.76.1" +} diff --git a/packages/cdktf-cli/src/bin/cmds/helper/init.ts b/packages/cdktf-cli/src/bin/cmds/helper/init.ts index 35b9dbf26c..bb4407581f 100644 --- a/packages/cdktf-cli/src/bin/cmds/helper/init.ts +++ b/packages/cdktf-cli/src/bin/cmds/helper/init.ts @@ -372,6 +372,12 @@ async function gatherInfo( token ); + if (organizationIds.length == 0) { + throw Errors.Usage( + `You must be part of an organization in Terraform Cloud in order to use it as a RemoteBackend or CloudBackend.\n` + ); + }; + // todo: add validation for the organization name and workspace. add error handling const organizationSelect = await select({ message: "Terraform Cloud Organization Name",