Skip to content

tftest.hcl command conversion #108

Open
@konradzagozda

Description

@konradzagozda

I have file with test sth.tftest.hcl:

run "test_nothing" {
    command = plan
}

I attempt to convert it to json:
and i get:

{
  "run": {
    "test_nothing": [
      {
        "command": "${plan}"
      }
    ]
  },
}

when I try to run terraform test on first version it's fine but when i try to run it on json version it errors with:

│ Error: Invalid "command" keyword
│ 
│   on tests-out/sth.tftest.json line 5, in run.test_nothing[0]:
│    5:         "command": "${plan}"
│ 
│ The "command" argument requires one of the following keywords without
│ quotes: apply or plan.

Is this hcl2json conversion issue or terraform issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions