tenantgenerator/tenant/utils/terraform.py

6 lines
244 B
Python

def create_tfvars_file(variables, filepath):
with open(filepath, "w") as tfvars_file:
for key, value in variables.items():
# Writing variable assignments to the file
tfvars_file.write(f'{key} = "{value}"\n')