elmundio87 / terraform_validate

Assists in the enforcement of user-defined standards in Terraform
GNU General Public License v3.0
257 stars 43 forks source link

Give the user the option to disable expanding of variables when the default value exists #8

Closed elmundio87 closed 8 years ago

elmundio87 commented 8 years ago

This allows the user to call .disable_variable_expansion() on the validator object, to check the value of a property without referring to any of the variables

resource "foo" "bar" {
   bizz = ${var.buzz}
}

var "buzz" {
    default = "1"
}

Before: terraform_config thinks that bizz = 1
After (default): terraform_config thinks that bizz = 1
After (with .disable_variable_expansion): terraform_config thinks that bizz = "${var.buzz}"}