Skip to content

Commit

Permalink
initial fix (#11500)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi-cit authored Aug 23, 2024
1 parent bbf4d6c commit 723d418
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,10 @@ func expandNodeConfig(v interface{}) *container.NodeConfig {
}

func expandResourceManagerTags(v interface{}) *container.ResourceManagerTags {
if v == nil {
return nil
}

rmts := make(map[string]string)

if v != nil {
Expand Down Expand Up @@ -1442,6 +1446,10 @@ func flattenNodeConfig(c *container.NodeConfig, v interface{}) []map[string]inte
}

func flattenResourceManagerTags(c *container.ResourceManagerTags) map[string]interface{} {
if c == nil {
return nil
}

rmt := make(map[string]interface{})

if c != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5667,10 +5667,11 @@ func flattenNodePoolDefaults(c *container.NodePoolDefaults) []map[string]interfa
}

func expandNodePoolAutoConfig(configured interface{}) *container.NodePoolAutoConfig {
l := configured.([]interface{})
if len(l) == 0 || l[0] == nil {
l, ok := configured.([]interface{})
if !ok || l == nil || len(l) == 0 || l[0] == nil {
return nil
}

npac := &container.NodePoolAutoConfig{}
config := l[0].(map[string]interface{})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,10 @@ func expandNodeConfig(v interface{}) *container.NodeConfig {
}

func expandResourceManagerTags(v interface{}) *container.ResourceManagerTags {
if v == nil {
return nil
}

rmts := make(map[string]string)

if v != nil {
Expand Down Expand Up @@ -1438,6 +1442,10 @@ func flattenNodeConfig(c *container.NodeConfig, v interface{}) []map[string]inte
}

func flattenResourceManagerTags(c *container.ResourceManagerTags) map[string]interface{} {
if c == nil {
return nil
}

rmt := make(map[string]interface{})

if c != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5664,10 +5664,11 @@ func flattenNodePoolDefaults(c *container.NodePoolDefaults) []map[string]interfa
}

func expandNodePoolAutoConfig(configured interface{}) *container.NodePoolAutoConfig {
l := configured.([]interface{})
if len(l) == 0 || l[0] == nil {
l, ok := configured.([]interface{})
if !ok || l == nil || len(l) == 0 || l[0] == nil {
return nil
}

npac := &container.NodePoolAutoConfig{}
config := l[0].(map[string]interface{})

Expand Down

0 comments on commit 723d418

Please sign in to comment.