Skip to content
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

Support fixed IP addresses for control node #643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

priteau
Copy link
Member

@priteau priteau commented Apr 4, 2025

The variable control_ip_address was documented but not implemented. Since we support multiple networks, change it to control_ip_addresses and implement it.

Closes #642.

The variable control_ip_address was documented but not implemented.
Since we support multiple networks, change it to control_ip_addresses
and implement it.

Closes #642.
@priteau priteau self-assigned this Apr 4, 2025
@priteau priteau requested a review from a team as a code owner April 4, 2025 08:43
@@ -24,6 +24,12 @@ variable "key_pair" {
description = "Name of an existing keypair in OpenStack"
}

variable "control_ip_addresses" {
type = map(string)
description = "Mapping of networks to fixed IP addresses used by control node"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Mapping of networks to fixed IP addresses used by control node"
description = "Mapping of fixed IP addresses for control node, keyed by network name"

subnet_id = data.openstack_networking_subnet_v2.cluster_subnet.id
ip_address = var.control_ip_address
subnet_id = data.openstack_networking_subnet_v2.cluster_subnet.id
ip_address = (var.control_ip_addresses != {})? var.control_ip_addresses[each.key]: null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ip_address = (var.control_ip_addresses != {})? var.control_ip_addresses[each.key]: null
ip_address = (var.control_ip_addresses != {}) ? var.control_ip_addresses[each.key] : null

just makes the ternary clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Production variable control_ip_address is not implemented
2 participants