Skip to content

Cannot load HCL vars files with -var-file argument #8781

@mechastorm

Description

@mechastorm

Overview of the Issue

Can't seem to load .pkrvars.hcl files with the -var-file argument. I am not sure if it a bug with packer or the way I am using packer.

Reproduction Steps

I run the command

packer build -var-file=env/networking.pkrvars.hcl .

The contents of env/networking.pkrvars.hcl

ssh_username = "ubuntu"

I get the following error instead

invalid value "env/networking.pkrvars.hcl" for flag -var-file: Error reading variables in 'env/networking.pkrvars.hcl': invalid character 's' looking for beginning of value

Packer version

1.5.4

Operating system and Environment details

mac OS X 10.13.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions