samy-dougui/ptf

Add local variables

Opened this issue · 0 comments

The goal would be to able to create local variables (module scoped) as locals in terraform.

Syntax should be like in Terraform:

How to define a local variable

locals {
    foo = bar
}

How to use a local variable

my_rule_attribute = local.foo

Creation of the hcl context

The load of the local variables should be done during the creation of the hcl context as it would be used inside the rule block.