Skip to content

Commit

Permalink
Renaming the methods to addonProfiles to match the sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Aug 10, 2018
1 parent 403bc1d commit be893dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions azurerm/data_source_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ func dataSourceArmKubernetesClusterRead(d *schema.ResourceData, meta interface{}
return fmt.Errorf("Error setting `linux_profile`: %+v", err)
}

addOnProfile := flattenKubernetesClusterDataSourceAddOnProfiles(props.AddonProfiles)
if err := d.Set("addon_profile", addOnProfile); err != nil {
addonProfiles := flattenKubernetesClusterDataSourceAddonProfiles(props.AddonProfiles)
if err := d.Set("addon_profile", addonProfiles); err != nil {
return fmt.Errorf("Error setting `addon_profile`: %+v", err)
}

Expand Down Expand Up @@ -466,7 +466,7 @@ func flattenKubernetesClusterDataSourceNetworkProfile(profile *containerservice.
return []interface{}{values}
}

func flattenKubernetesClusterDataSourceAddOnProfiles(profile map[string]*containerservice.ManagedClusterAddonProfile) interface{} {
func flattenKubernetesClusterDataSourceAddonProfiles(profile map[string]*containerservice.ManagedClusterAddonProfile) interface{} {
values := make(map[string]interface{}, 0)

routes := make([]interface{}, 0)
Expand Down
10 changes: 5 additions & 5 deletions azurerm/resource_arm_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func resourceArmKubernetesClusterCreate(d *schema.ResourceData, meta interface{}
agentProfiles := expandAzureRmKubernetesClusterAgentProfiles(d)
servicePrincipalProfile := expandAzureRmKubernetesClusterServicePrincipal(d)
networkProfile := expandAzureRmKubernetesClusterNetworkProfile(d)
addOnProfile := expandAzureRmKubernetesClusterAddOnProfile(d)
addonProfiles := expandAzureRmKubernetesClusterAddonProfiles(d)

tags := d.Get("tags").(map[string]interface{})

Expand All @@ -392,7 +392,7 @@ func resourceArmKubernetesClusterCreate(d *schema.ResourceData, meta interface{}
Name: &name,
Location: &location,
ManagedClusterProperties: &containerservice.ManagedClusterProperties{
AddonProfiles: addOnProfile,
AddonProfiles: addonProfiles,
AgentPoolProfiles: &agentProfiles,
DNSPrefix: &dnsPrefix,
KubernetesVersion: &kubernetesVersion,
Expand Down Expand Up @@ -472,7 +472,7 @@ func resourceArmKubernetesClusterRead(d *schema.ResourceData, meta interface{})
return fmt.Errorf("Error setting `linux_profile`: %+v", err)
}

addonProfiles := flattenAzureRmKubernetesClusterAddonProfile(props.AddonProfiles)
addonProfiles := flattenAzureRmKubernetesClusterAddonProfiles(props.AddonProfiles)
if err := d.Set("addon_profile", addonProfiles); err != nil {
return fmt.Errorf("Error setting `addon_profile`: %+v", err)
}
Expand Down Expand Up @@ -796,7 +796,7 @@ func expandAzureRmKubernetesClusterNetworkProfile(d *schema.ResourceData) *conta
return &networkProfile
}

func expandAzureRmKubernetesClusterAddOnProfile(d *schema.ResourceData) map[string]*containerservice.ManagedClusterAddonProfile {
func expandAzureRmKubernetesClusterAddonProfiles(d *schema.ResourceData) map[string]*containerservice.ManagedClusterAddonProfile {
profiles := d.Get("addon_profile").([]interface{})
if len(profiles) == 0 {
return nil
Expand Down Expand Up @@ -833,7 +833,7 @@ func expandAzureRmKubernetesClusterAddOnProfile(d *schema.ResourceData) map[stri
return addonProfiles
}

func flattenAzureRmKubernetesClusterAddonProfile(profile map[string]*containerservice.ManagedClusterAddonProfile) []interface{} {
func flattenAzureRmKubernetesClusterAddonProfiles(profile map[string]*containerservice.ManagedClusterAddonProfile) []interface{} {
values := make(map[string]interface{}, 0)

routes := make([]interface{}, 0)
Expand Down

0 comments on commit be893dc

Please sign in to comment.