terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

Automatically Create Terraform Cloud Workspace

Open skorfmann opened this issue 3 years ago • 4 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

References

When using multiple stacks, it'd be pretty neat if the CLI would offer to create a configured workspace if it doesn't exist.

Right now we see the following error:

⠙ synthesizing server...
TerraformCloud returned an HTTP 404 error. Please make sure the configured organization (some-tf-cloud-user) and workspace (foo-bar-stack) exist and you have the correct access rights.

skorfmann avatar May 02 '21 13:05 skorfmann

Related to this / might be addressed with this: When initializing a new project from a template that supports multiple stacks, only a single Terraform Cloud Workspace is created. In the case of my multi stack remote template the name of the project can also differ from the name of the stacks, so the TFC Workspace that gets created in init might not even match the ones defined in the template.

ansgarm avatar May 03 '21 09:05 ansgarm

Yes - I think this should be moved to the synth stage. Essentially collect all backend configs and check for the existence. I'm tempted to try to building this on top of #682

skorfmann avatar May 04 '21 08:05 skorfmann

This is somewhat offtopic, but is there a doc for using cdktf on terraform cloud? I was unable to locate it so came here looking for a "terraform cloud support" issue to upvote. Thanks in advance!

matschaffer avatar Feb 07 '22 02:02 matschaffer

@matschaffer: There are notes on that (somewhat hidden) in the Project Setup Docs.

ansgarm avatar Feb 08 '22 13:02 ansgarm

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.

github-actions[bot] avatar Feb 17 '23 01:02 github-actions[bot]