Motivation
I tend to use a main.hcl file and from there call all the necessary modules.
Given
main.hcl
param "cred_user" {}
param "cred_password" {}
module "<src>" "setup_x" {
params = {
cred_user = "{{param `cred_user`}}"
cred_password = "{{param `cred_password`}}"
}
}
module "<src>" "setup_y" {
cred_user = "{{param `cred_user`}}"
cred_password = "{{param `cred_password`}}"
}
...
In order for this to work as of 0.6.0 I need to pass all the parameters required by the modules every time.
When there are quite a few modules it is cumbersome to keep specifying the same parameters.
Modest proposal
main.hcl
#Option 1
param "global" "cred_user" {}
param "global" "cred_password" {}
...
#Option 2
param "cred_user" {
type = "global"
}
param "cred_password" {
type = "global"
}
...
module "setup_x" {}
module "setup_y" {}
...
Motivation
I tend to use a
main.hclfile and from there call all the necessary modules.Given
main.hcl
In order for this to work as of
0.6.0I need to pass all the parameters required by the modules every time.When there are quite a few modules it is cumbersome to keep specifying the same parameters.
Modest proposal
main.hcl