fix
This commit is contained in:
@@ -117,12 +117,28 @@ resource "azurerm_virtual_machine" "vm" {
|
||||
|
||||
}
|
||||
|
||||
module "linux-common" {
|
||||
|
||||
source = "git::https://gitlab.com/qmi/qmi-cloud-tf-modules.git//linux-common"
|
||||
|
||||
depends_on = [
|
||||
azurerm_virtual_machine.vm
|
||||
]
|
||||
|
||||
os_type = "centos"
|
||||
private_ip_address = module.qmi-nic.private_ip_address
|
||||
admin_username = local.admin_username
|
||||
admin_password = var.initial_password
|
||||
resize = false
|
||||
update = false
|
||||
}
|
||||
|
||||
resource "null_resource" "post-vm-fromsnapshot-linux" {
|
||||
|
||||
count = var.initial_password != null? 1 : 0
|
||||
|
||||
depends_on = [
|
||||
azurerm_virtual_machine.vm
|
||||
module.linux-common
|
||||
]
|
||||
|
||||
provisioner "file" {
|
||||
@@ -162,20 +178,6 @@ resource "null_resource" "post-vm-fromsnapshot-linux" {
|
||||
|
||||
}
|
||||
|
||||
module "linux-common" {
|
||||
|
||||
source = "git::https://gitlab.com/qmi/qmi-cloud-tf-modules.git//linux-common"
|
||||
|
||||
depends_on = [
|
||||
null_resource.post-vm-fromsnapshot-linux
|
||||
]
|
||||
|
||||
os_type = "centos"
|
||||
private_ip_address = module.qmi-nic.private_ip_address
|
||||
admin_username = local.admin_username
|
||||
admin_password = local.admin_password
|
||||
resize = false
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user