terraform_data

A built-in resource, available since Terraform 1.4, that stores a value in state and can trigger replacement, without needing any provider.

In more detail

It is the modern replacement for null_resource. Its triggers_replace argument forces replacement when a value changes.

Example

resource "terraform_data" "example" {
  input = var.name
}

Related terms

Taught in

References

Certification courses