The encode_tfvars function produces a string representation of an object using the same syntax as for ".tfvars" files used in Terraform CLI.