0.8.8

Latest release in branch 0.8
Released 9 years ago (March 02, 2017)

Software Terraform
Branch 0.8
Status
End of life
End of security fixes May 02, 2017
First official release version 0.8.0
First official release date 9 years ago (December 13, 2016)
Release notes https://github.com/hashicorp/terraform/blob/v0.8/CHANGELOG.md
Source code https://github.com/hashicorp/terraform/tree/v0.8
Documentation https://developer.hashicorp.com/terraform/docs
Download https://releases.hashicorp.com/terraform/
Terraform 0.8 Releases View full list

What Is New in Terraform 0.8

Terraform 0.8 brings foundational improvements to state management and introduces new ways to handle environment-specific configurations. This release focuses on making complex infrastructure setups more manageable and less error-prone.

Category Key Changes
New Features Environment-aware state, Interpolation in backend config
Improvements Enhanced backend configuration, Better state isolation
Backwards Incompatibilities Legacy remote state behavior changes

How does environment-aware state work?

The new environment-aware state feature fundamentally changes how Terraform handles multiple environments like staging and production. Instead of a single state file, Terraform now automatically manages separate state files for each named environment.

You create and switch between environments using the new terraform env commands. This approach prevents accidental changes to the wrong environment's infrastructure, a common operational headache. Each environment maintains its own state file, variables, and resource definitions.

What changed with backend configuration?

Backend configuration received significant enhancements, most notably the ability to use interpolation within the backend block. This allows for dynamic backend configuration based on variables and other Terraform expressions.

In practice, this means you can now reference variables like var.environment to determine your state storage path. For example, you can dynamically set an S3 bucket key based on the environment name, making your backend configuration much more flexible and DRY.

terraform {
  backend "s3" {
    bucket = "my-terraform-state"
    key    = "environments/${var.environment}/terraform.tfstate"
    region = "us-east-1"
  }
}

Are there any breaking changes I should know about?

Yes, the legacy remote state behavior has been modified in ways that might affect existing setups. The old method of handling remote state via the terraform remote command has been replaced by the new backend system.

If you were using the legacy remote state configuration, you'll need to migrate to the new backend configuration. The upgrade process is straightforward but requires explicit action - Terraform provides commands to help migrate your existing state to the new backend format.

FAQ

How do I create a new environment in Terraform 0.8?
Use terraform env new <name> to create a new environment and terraform env select <name> to switch between them. Each environment gets its own isolated state file.

Can I use variables in my backend configuration now?
Yes, this is a major enhancement. You can now use interpolation syntax like ${var.environment} within your backend block to dynamically configure state storage locations.

What happens to my existing remote state setup?
You'll need to migrate it to the new backend system. Use the terraform init command with your backend configuration defined, and Terraform will prompt you to migrate existing state.

Does this affect how modules work with different environments?
Modules work the same way, but now you can more easily parameterize them per environment using the environment-specific variables and state isolation.

Can I have different backends for different environments?
While possible, it's not the intended pattern. The backend configuration is typically defined once in your root module, but you can use interpolation to vary settings like state file paths based on environment.

Releases In Branch 0.8

Version Release date
0.8.8 9 years ago
(March 02, 2017)
0.8.7 9 years ago
(February 15, 2017)
0.8.6 9 years ago
(February 07, 2017)
0.8.5 9 years ago
(January 26, 2017)
0.8.4 9 years ago
(January 11, 2017)
0.8.3 9 years ago
(January 10, 2017)
0.8.2 9 years ago
(December 21, 2016)
0.8.1 9 years ago
(December 15, 2016)
0.8.0 9 years ago
(December 13, 2016)
0.8.0-rc3 9 years ago
(December 09, 2016)
0.8.0-rc2 9 years ago
(December 02, 2016)
0.8.0-rc1 9 years ago
(November 23, 2016)
0.8.0-beta2 9 years ago
(November 16, 2016)
0.8.0-beta1 9 years ago
(November 11, 2016)