code: def get_backend_tfvars_file(path, environment, region):
      
      backend_filenames = gen_backend_tfvars_files(environment, region)
      for name in backend_filenames:
          if os.path.isfile(os.path.join(path, name)):
              return name
      return backend_filenames[-1]
docs: Determine Terraform backend file.