hashicorp / terraform-cdk

Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
https://www.terraform.io/cdktf
Mozilla Public License 2.0
4.83k stars 449 forks source link

Handle Not Existing Org / Workspaces in Terraform Cloud #488

Closed skorfmann closed 3 years ago

skorfmann commented 3 years ago

Community Note

Description

When using Terraform Cloud as remote runner, cdktf will zip the ./cdktf.out folder contents and uploads it to the TerraformCloud API. The entire diff / deploy / destroy cycle is then running remotely. That's done in via the TerraformCloud handler within the cdktf-cli package, which is relying on this api wrapper. All interactions with the Terraform Cloud API are relying on valid credentials and correct configuration for the organization / workspace.

The organization and workspace configuration is sourced from the synthesized stack. When one the values is misconfigured, it looks like the raw error from axios is being printed out. This should be more expressive and actionable to the user.

Screenshot 2021-01-13 at 14 48 18

I think it would make sense to add some basic error handling to the TerraformCloud class, which takes care of making the errors more expressive.

References

ansgarm commented 3 years ago

Resolved via #626

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.