Hi, all
module "cp_os_update" {
depends_on = [module.vsphere_cp]
}
module "cp_pre_install" {
depends_on = [module.cp_os_update]
}
module "cp_install" {
depends_on = [module.cp_pre_install]
}
module "cp_config" {
depends_on = [module.cp_install]
}
module "cp_ssh_config" {
depends_on = [
module.cp_install,
module.hv_install,
module.hv_xen_reboot,
module.bs_install,
module.ds_install,
module.cp_config,
]
}
module "cp_cloudboot" {
depends_on = [
module.cp_config,
module.cp_install,
]
}
resource "null_resource" "cp_wait_httpd" {
depends_on = [
module.cp_ssh_config,
module.cp_cloudboot,
module.cp_config,
]
}
resource "null_resource" "cp_configuration_done" {
depends_on = [
null_resource.cp_wait_httpd,
]
}
This modules dependency are working fine, like excepted:
module.vsphere_cp.vsphere_virtual_machine.server: Creating...
module.vsphere_cp.vsphere_virtual_machine.server: Still creating... [10s elapsed]
...
module.vsphere_cp.vsphere_virtual_machine.server: Still creating... [1m50s elapsed]
module.vsphere_cp.vsphere_virtual_machine.server: Creation complete after 1m54s [id=421f732e-5c11-1912-915f-ca9911e9799e]
module.cp_os_update.null_resource.update: Creating...
module.cp_os_update.null_resource.update: Provisioning with 'remote-exec'...
but if I remove module.cp_config from depends_on of null_resource.cp_wait_httpd the order creating resources are changed
resource "null_resource" "cp_wait_httpd" {
depends_on = [
module.cp_ssh_config,
module.cp_cloudboot,
]
}
null_resource.cp_wait_httpd: Creating...
null_resource.cp_wait_httpd: Provisioning with 'local-exec'...
null_resource.cp_wait_httpd: Still creating... [10s elapsed]
module.vsphere_cp.vsphere_virtual_machine.server: Still creating... [10s elapsed]
null_resource.cp_wait_httpd: Still creating... [30s elapsed]
module.vsphere_cp.vsphere_virtual_machine.server: Still creating... [30s elapsed]
null_resource.cp_wait_httpd: Still creating... [40s elapsed]
module.vsphere_cp.vsphere_virtual_machine.server: Still creating... [40s elapsed]
null_resource.cp_wait_httpd: Still creating... [50s elapsed]
Why null_resource.cp_wait_httpd started before module.vsphere_cp
but not the end of configuration?