null_resource

A resource from the hashicorp/null provider that creates nothing real, used as a placeholder or to run actions when its triggers change.

In more detail

Changing any value in its triggers map replaces it, which makes it handy for demonstrating plans, state and dependencies without a cloud. The course uses it to model a network and its subnets locally. Since Terraform 1.4 the built-in terraform_data resource does the same job without an extra provider.

Example

resource "null_resource" "network" {
  triggers = { name = var.name }
}

Related terms

Taught in

References

Certification courses