[common] Create a group of hosts using 2nd element of Module.Path
uthng opened this issue · 0 comments
uthng commented
Attribute Path
of each module indicates current module or submodule. It is a list. If there is only element root
, it means that terraform has no module or submodule. If the length of Path
> 1, it means that Terraform uses module/submodule. Generally, in the case of module, the 2nd element of Path indicates the name of the module declared with instruction:
module "uthng-blog" {
.....
}
{
"path": [
"root",
"uthng-blog",
"scaleway-servers"
],
"outputs": {
......
},
"resources": {
........
}
The elements at nth position with n >= 2 indicates submodules.