@@ -2516,10 +2516,10 @@ func expandClusterAddonsConfig(configured interface{}) *containerBeta.AddonsConf
25162516 return ac
25172517}
25182518
2519- func expandIPAllocationPolicy (configured interface {}, networking_mode string ) (* containerBeta.IPAllocationPolicy , error ) {
2519+ func expandIPAllocationPolicy (configured interface {}, networkingMode string ) (* containerBeta.IPAllocationPolicy , error ) {
25202520 l := configured .([]interface {})
25212521 if len (l ) == 0 || l [0 ] == nil {
2522- if networking_mode == "VPC_NATIVE" {
2522+ if networkingMode == "VPC_NATIVE" {
25232523 return nil , fmt .Errorf ("`ip_allocation_policy` block is required for VPC_NATIVE clusters." )
25242524 }
25252525 return & containerBeta.IPAllocationPolicy {
@@ -2530,14 +2530,14 @@ func expandIPAllocationPolicy(configured interface{}, networking_mode string) (*
25302530
25312531 config := l [0 ].(map [string ]interface {})
25322532 return & containerBeta.IPAllocationPolicy {
2533- UseIpAliases : networking_mode == "VPC_NATIVE" ,
2533+ UseIpAliases : networkingMode == "VPC_NATIVE" || networkingMode == " " ,
25342534 ClusterIpv4CidrBlock : config ["cluster_ipv4_cidr_block" ].(string ),
25352535 ServicesIpv4CidrBlock : config ["services_ipv4_cidr_block" ].(string ),
25362536
25372537 ClusterSecondaryRangeName : config ["cluster_secondary_range_name" ].(string ),
25382538 ServicesSecondaryRangeName : config ["services_secondary_range_name" ].(string ),
25392539 ForceSendFields : []string {"UseIpAliases" },
2540- UseRoutes : networking_mode == "ROUTES" ,
2540+ UseRoutes : networkingMode == "ROUTES" ,
25412541 }, nil
25422542}
25432543
0 commit comments