linode / terraform-provider-linode

Terraform Linode provider
https://www.terraform.io/docs/providers/linode/
Mozilla Public License 2.0
191 stars 92 forks source link

[Feature]: Export "private_ipv4" attribute of the Nodebalancer resource #1442

Open slepix opened 1 month ago

slepix commented 1 month ago

Description

Linode Nodebalancer resource currently exports the following attributes:

hostname - This NodeBalancer's hostname, ending with .nodebalancer.linode.com

ipv4 - The Public IPv4 Address of this NodeBalancer

ipv6 - The Public IPv6 Address of this NodeBalancer

created - When this NodeBalancer was created

updated - When this NodeBalancer was last updated.

transfer - The network transfer stats for the current month

firewalls - A list of Firewalls assigned to this NodeBalancer.

Can you please also export the private IP address or private IP address range of the Nodebalancer so it can be easily integrated into a firewall configuration which will be assigned to the Linode instances. Goal is to have firewall rules which are assigned to a Linode be scoped down and automated as much as possible.

New or Affected Terraform Resources

linode_nodebalancer linode_firewall

Potential Terraform Configuration

resource "linode_firewall" "server-fw" {
  label = "webserver-firewall"

  inbound {
    label    = "allow-https-from-lb"
    action   = "ACCEPT"
    protocol = "TCP"
    ports    = "443"
    ipv4     = [linode_nodebalancer.mynodebalancer.private_ip_address] # <-- this is what it would be nice to have
  }

  inbound_policy = "DROP"
  outbound_policy = "ACCEPT"
  linodes = [linode_instance.my_webserver.id]
}
zliang-akamai commented 1 month ago

@slepix Thank you for the feature request, we will be looking into this. I will update it here if there is any progress.

github-actions[bot] commented 5 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days