Hi All
been working on terraform for only a short time, but something seemingly straightforward has be most confused in behavior. Could be something simple that I misunderstand, but hoping for some assistance.
I have a couple of projects (both happen to be vsphere ones). I have stripped out provider references which seems self defeating in the re-usable code aspect as it makes them now either a module or a standalone project but I digress.
So both work fine. One creates a win DC and one creates a win member server. I cannot of course have the member server being created at the same time as the DC as the DC will not be up for it to join.
So in my parent TF plan, I simply call the DC module, then set a depends_on to the DC module within the second module which creates the member server.
The issue is when doing so, I then get errors relating to the module containing the depends_on (in this case one relating to not defining the drive0 size), but this is declared from the clone template in fact.
If I remove the depends_on clause, both module calls will work fine just in parallel rather than sequential. Am I missing some impact regarding the use of depends_on? I have done much reading but cannot seem to see anything that would cause this issue.
Simplified code snip which will fail:
provider “vsphere” {
user = var.vsphere_user
password = var.vsphere_password
vsphere_server = var.vsphere_server
allow_unverified_ssl = true
}
module “DC_Builder”{
source = my_source_git_module
#variables to pass to the module here
}
module “Winserver_Builder” {
source = my_source_git_module
#variables to pass to the module here
depends_on = [module.DC_Builder]
}
Thanks for any input