Skip to content

Commit 61a928b

Browse files
committed
fix(install): trigger te local exec scripts when the instance is replaced
1 parent dd125c7 commit 61a928b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

terraform/install.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ resource "null_resource" "common_playbook" {
3838
null_resource.mount_data_volume
3939
]
4040

41+
triggers = {
42+
volume_attachment_id = oci_core_volume_attachment.volume_attachment.id # Trigger on volume attachment changes
43+
}
44+
4145
provisioner "local-exec" {
4246
command = "bash ${path.root}/../ansible/playbooks/common/run.sh"
4347
}
@@ -53,6 +57,10 @@ resource "null_resource" "devops_roles" {
5357
null_resource.common_playbook,
5458
]
5559

60+
triggers = {
61+
volume_attachment_id = oci_core_volume_attachment.volume_attachment.id # Trigger on volume attachment changes
62+
}
63+
5664
provisioner "local-exec" {
5765
command = "bash ${path.root}/../ansible/playbooks/for-devops/run.sh"
5866
}

0 commit comments

Comments
 (0)