Provider-defined functions are functions exposed by providers (e.g., AWS, GCP) that can be called directly in HCL as provider::namespace::function_name(args). For example, provider::aws::arn_build("s3", var.bucket_name, var.region) to construct an ARN without string interpolation. They differ from: (1) templatefile — renders a file template with variables; it's a built-in function, provider-defined functions go beyond what built-ins can offer, like parsing cloud-specific resource IDs. (2) local values — computed expressions used to reduce repetition; provider functions can be called inside locals but are not a replacement — they add new computational capabilities that previously required external data sources or null_resource with local-exec. (3) terraform_data — a resource used as a container for arbitrary data; provider functions replace many use cases where you needed a terraform_data to call an external script just to compute something provider-specific. The key difference: provider functions are pure computation — they don't create, read, or manage infrastructure state, so they can be used in locals, variables, and outputs without creating additional resources in the state file.