Skip to content

Terraform fails for depends_on and list("string") cases #12

@PetrusHahol

Description

@PetrusHahol

Hello.
hcl2json works nice, but there are some cases that after conversion don't work.

Here you can see a list of fixtures used for different converter.
Passing of those tests almost garanties that json file will be executable and valid for terraform.

Terraform init/plan fails for at least two cases. depens_on(depends_on.hcl) case and type case.
Depends_on case has to be without interpolation.
In case of type - interpolation don't has to present as well. type is reserved key for variables.
Example :

variable "availability_zones" {
  type    = list(string)
  default = ["az1", "az2", "az3"]
}

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions