Skip to main content
In this tutorial, you will set up state management and connect it to your local terraform or opentofu. If you prefer a visual walkthrough you can follow along the following loom tutorial:

1

Create first unit

Create your first unit from the UI. give it a name and hit create
2

Configure cloud block

Configure your terraform cloud block locally by pasting it into the terraform code
3

Authenticate with Opentofu

Using the cli you can run the following command to authenticate:
tofu login otaco.app
Or if using terraform
terraform login otaco.app
You will have to confirm and will then be redirected to a token generation page. This page will allow you to generate a token and you can copy paste it back into the cli. You should see a message saying
Success! Logged in to Terraform Enterprise (otaco.app)
4

try to run plan and apply

Using terraform or opentofu run init, plan and apply commands. It should all succeed to be created If this is the case then well done! You have successfully created your first unit

Next steps

Try to setup PR automation so that you can collaborate on your opentofu as a team. You can follow the guides for terraform, opentofu or terragrunt respectively.