Skip to content

avoid tf updates to login/compute on control delete/recreate #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ module "compute" {

# computed
k3s_token = local.k3s_token
control_address = openstack_compute_instance_v2.control.access_ip_v4
# not using openstack_compute_instance_v2.control.access_ip_v4 to avoid
# updates to node metadata on deletion/recreation of the control node:
control_address = openstack_networking_port_v2.control[var.cluster_networks[0].network].all_fixed_ips[0]
security_group_ids = [for o in data.openstack_networking_secgroup_v2.nonlogin: o.id]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ module "login" {
nodes = each.value.nodes
flavor = each.value.flavor

# always taken from top-level value:
cluster_name = var.cluster_name
cluster_domain_suffix = var.cluster_domain_suffix
key_pair = var.key_pair
environment_root = var.environment_root

# can be set for group, defaults to top-level value:
image_id = lookup(each.value, "image_id", var.cluster_image_id)
Expand All @@ -25,9 +28,10 @@ module "login" {
compute_init_enable = []
ignore_image_changes = false

key_pair = var.key_pair
environment_root = var.environment_root
# computed
k3s_token = local.k3s_token
control_address = openstack_compute_instance_v2.control.access_ip_v4
# not using openstack_compute_instance_v2.control.access_ip_v4 to avoid
# updates to node metadata on deletion/recreation of the control node:
control_address = openstack_networking_port_v2.control[var.cluster_networks[0].network].all_fixed_ips[0]
security_group_ids = [for o in data.openstack_networking_secgroup_v2.login: o.id]
}