Some days ago Hashicorp announced the availability of the free-to-use collaboration features in the Terraform cloud. This allows individuals and teams to easily store state information in the cloud and make it accessible from anywhere.
First you need create your account. Then, you can create a new organization.
Now create either a personal or a team token to get access to your organization. For this example I created a team token.
Now create your Terraform config file and configure it to use the Terraform cloud backend. To keep things simple, I added the token directly into the configuration file (which is not a very good practice of course).
- Hostname > app.terraform.io
- Organization > Your organization name in the Terraform cloud
- Workspace > Your workspace name (will be created automatically)
- Token > The created token for authentication
Save the file and start the Terraform process using ‘init’, ‘plan’ and ‘apply’ as normal. Once completed, the state information is available in the Terraform cloud. The local box does not store details about the state other than the information where the remote state is stored.
As the post title mentions, that’s it for the quick introduction. I will probably post some more stuff around this soon.
Pingback: Using the Terraform Cloud with multiple Workspaces | marcelzehner.ch