Skip to main content
CloudFebruary 5, 20263 min read

Terraform 1.8 Released with Provider Functions

HashiCorp releases Terraform 1.8 with provider-defined functions, improved refactoring support, and better state management capabilities.

Terraform 1.8 Released with Provider Functions

HashiCorp has released Terraform 1.8, introducing provider-defined functions - the most significant language enhancement since Terraform 1.0. This release also includes improved refactoring support and state management improvements.

Provider-Defined Functions

Providers can now expose custom functions callable directly in HCL configuration. The AWS provider, for example, offers functions for ARN parsing and CIDR calculations:

locals {
  account_id = provider::aws::arn_parse(var.role_arn).account_id
  subnets    = provider::aws::cidr_subnets("10.0.0.0/16", 8, 8, 8, 8)
}

This eliminates the need for external data sources or complex regex patterns that were previously required for common operations.

Improved Refactoring with Removed Block

The new removed block allows declaring that a resource has been removed from Terraform management without destroying it:

removed {
  from = aws_instance.legacy_server
  lifecycle { destroy = false }
}

State Management

Terraform 1.8 improves state file handling for large configurations, reducing plan times by up to 40 percent for configurations managing thousands of resources.

Upgrade Path

Terraform 1.8 is backward compatible with 1.x configurations. The state file format has not changed, so upgrades are safe to perform in place. Review your lock file after upgrading to ensure provider versions are compatible.

Terraform 1.8 is a recommended upgrade for all teams using Terraform, with no breaking changes and meaningful developer experience improvements.

Talk to the engineer who will own your stack.

No account managers, no offshore handoff. Senior DevOps, direct. Tell us what you are dealing with and you get a straight answer.