Skip to content

Commit

Permalink
tf(harbor-standalone): add ignore_changes to vm to fix perma diff
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannibaratta committed Jan 26, 2024
1 parent 65df76a commit 4b190d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion terraform/modules/harbor-standalone/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
11 changes: 8 additions & 3 deletions terraform/modules/harbor-standalone/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ locals {
authorized_key : var.vm_authorized_key
harbor_install_playbook : base64encode(local.harbor_playbook)
harbor_conf : base64encode(local.harbor_conf)
harbor_service: base64encode(file("${path.module}/files/harbor-systemd.service"))
harbor_service : base64encode(file("${path.module}/files/harbor-systemd.service"))
})
}

resource "vsphere_virtual_machine" "harbor" {
name = "harbor"
name = "harbor"
resource_pool_id = var.vsphere.resource_pool_id
datastore_id = var.vsphere.datastore_id

Expand Down Expand Up @@ -76,8 +76,13 @@ resource "vsphere_virtual_machine" "harbor" {

vapp {
properties = {
"user-data" = base64encode(local.harbor_user_data)
"user-data" = base64encode(local.harbor_user_data)
"public-keys" = var.vm_authorized_key
}
}

# Perma diff
lifecycle {
ignore_changes = [ept_rvi_mode, hv_mode, clone]
}
}

0 comments on commit 4b190d5

Please sign in to comment.