mirror of https://github.com/kubernetes/kops.git
Support dualstack NLBs with Terraform
This commit is contained in:
parent
9d61e527e8
commit
af4f9671e6
|
|
@ -524,6 +524,7 @@ resource "aws_launch_template" "nodes-minimal-ipv6-example-com" {
|
|||
resource "aws_lb" "api-minimal-ipv6-example-com" {
|
||||
enable_cross_zone_load_balancing = false
|
||||
internal = false
|
||||
ip_address_type = "dualstack"
|
||||
load_balancer_type = "network"
|
||||
name = "api-minimal-ipv6-example--jhj9te"
|
||||
subnet_mapping {
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ resource "aws_launch_template" "nodes-minimal-ipv6-example-com" {
|
|||
resource "aws_lb" "api-minimal-ipv6-example-com" {
|
||||
enable_cross_zone_load_balancing = false
|
||||
internal = false
|
||||
ip_address_type = "dualstack"
|
||||
load_balancer_type = "network"
|
||||
name = "api-minimal-ipv6-example--jhj9te"
|
||||
subnet_mapping {
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ resource "aws_launch_template" "nodes-minimal-ipv6-example-com" {
|
|||
resource "aws_lb" "api-minimal-ipv6-example-com" {
|
||||
enable_cross_zone_load_balancing = false
|
||||
internal = false
|
||||
ip_address_type = "dualstack"
|
||||
load_balancer_type = "network"
|
||||
name = "api-minimal-ipv6-example--jhj9te"
|
||||
subnet_mapping {
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ resource "aws_launch_template" "nodes-minimal-ipv6-example-com" {
|
|||
resource "aws_lb" "api-minimal-ipv6-example-com" {
|
||||
enable_cross_zone_load_balancing = false
|
||||
internal = false
|
||||
ip_address_type = "dualstack"
|
||||
load_balancer_type = "network"
|
||||
name = "api-minimal-ipv6-example--jhj9te"
|
||||
subnet_mapping {
|
||||
|
|
|
|||
|
|
@ -506,6 +506,7 @@ resource "aws_launch_template" "nodes-minimal-ipv6-example-com" {
|
|||
resource "aws_lb" "api-minimal-ipv6-example-com" {
|
||||
enable_cross_zone_load_balancing = false
|
||||
internal = false
|
||||
ip_address_type = "dualstack"
|
||||
load_balancer_type = "network"
|
||||
name = "api-minimal-ipv6-example--jhj9te"
|
||||
subnet_mapping {
|
||||
|
|
|
|||
|
|
@ -733,6 +733,7 @@ type terraformNetworkLoadBalancer struct {
|
|||
Name string `cty:"name"`
|
||||
Internal bool `cty:"internal"`
|
||||
Type string `cty:"load_balancer_type"`
|
||||
IPAddressType *string `cty:"ip_address_type"`
|
||||
SubnetMappings []terraformNetworkLoadBalancerSubnetMapping `cty:"subnet_mapping"`
|
||||
CrossZoneLoadBalancing bool `cty:"enable_cross_zone_load_balancing"`
|
||||
AccessLog *terraformNetworkLoadBalancerAccessLog `cty:"access_logs"`
|
||||
|
|
@ -768,6 +769,9 @@ func (_ *NetworkLoadBalancer) RenderTerraform(t *terraform.TerraformTarget, a, e
|
|||
Tags: e.Tags,
|
||||
CrossZoneLoadBalancing: fi.ValueOf(e.CrossZoneLoadBalancing),
|
||||
}
|
||||
if fi.ValueOf(e.IpAddressType) == "dualstack" {
|
||||
nlbTF.IPAddressType = e.IpAddressType
|
||||
}
|
||||
|
||||
for _, subnetMapping := range e.SubnetMappings {
|
||||
nlbTF.SubnetMappings = append(nlbTF.SubnetMappings, terraformNetworkLoadBalancerSubnetMapping{
|
||||
|
|
|
|||
Loading…
Reference in New Issue