Skip to content

Commit

Permalink
r/kubernetes_cluster: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
evenh committed Jan 23, 2020
1 parent 6bf5589 commit b9dc97f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ func expandKubernetesClusterNetworkProfile(input []interface{}) (*containerservi
}

func expandLoadBalancerProfile(d []interface{}, loadBalancerType string) (*containerservice.ManagedClusterLoadBalancerProfile, error) {
if len(d) == 0 {
if len(d) == 0 || d[0] == nil {
return nil, nil
}

Expand Down Expand Up @@ -1529,7 +1529,7 @@ func resourceReferencesToIds(refs *[]containerservice.ResourceReference) []strin
return ids
}

return ids
return nil
}

func flattenKubernetesClusterNetworkProfile(profile *containerservice.NetworkProfileType) []interface{} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ func testAccAzureRMKubernetesCluster_conflictingLoadBalancerProfile(t *testing.T
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
CheckDestroy: testCheckAzureRMKubernetesClusterDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMKubernetesCluster_conflictingLoadBalancerProfileConfig(data, clientId, clientSecret),
Expand Down Expand Up @@ -560,6 +561,7 @@ func testAccAzureRMKubernetesCluster_prefixedLoadBalancerProfile(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
CheckDestroy: testCheckAzureRMKubernetesClusterDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMKubernetesCluster_prefixedLoadBalancerProfileConfig(data, clientId, clientSecret),
Expand Down

0 comments on commit b9dc97f

Please sign in to comment.