
    H                     Z    S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	r	SSK
r
S rg)	zParser for tfvar files.    )absolute_import)division)unicode_literals)errors)filesNc                      [         R                  " U 5      n[        R                  " U5      nU$ ! [         a8  n[
        R                  " SU -   S-   [        R                  " U5      -   5      eSnAff = f)zParses a `tfvar` file and returns a dictionary of configuration values.

Args:
  filename: The path to the `tfvar` file.

Returns:
  A dictionary of configuration values.
z Error encountered while parsing z: N)	r   ReadFileContentshcl2loads	Exceptionr   InvalidDataErrorsix	text_type)filenamefconfiges       =lib/googlecloudsdk/command_lib/infra_manager/tfvars_parser.pyParseTFvarFiler      sg    x(AZZ]FM	 

!
!*X5<s}}Q?OO s   -0 
A23A--A2)__doc__
__future__r   r   r   (googlecloudsdk.command_lib.infra_managerr   googlecloudsdk.core.utilr   r
   r   r        r   <module>r      s$     &  ' ; *  
r   