File tree Expand file tree Collapse file tree
internal/services/containers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2444,7 +2444,9 @@ func (r KubernetesAutomaticClusterResource) Read() sdk.ResourceFunc {
24442444
24452445 state .LinuxProfile = flattenKubernetesAutomaticClusterLinuxProfile (props .LinuxProfile )
24462446 state .NetworkProfile = flattenKubernetesAutomaticClusterNetworkProfile (props .NetworkProfile )
2447+
24472448 state .WindowsProfile = flattenKubernetesAutomaticClusterWindowsProfile (props .WindowsProfile , metadata )
2449+
24482450 state .WorkloadAutoscalerProfile = flattenKubernetesAutomaticClusterWorkloadAutoscalerProfile (props .WorkloadAutoScalerProfile )
24492451 state .NodeProvisioningProfile = flattenKubernetesAutomaticClusterNodeProvisioningProfile (props .NodeProvisioningProfile )
24502452 state .HTTPProxyConfig = flattenKubernetesAutomaticClusterHttpProxyConfig (props .HTTPProxyConfig )
@@ -3304,7 +3306,10 @@ func flattenKubernetesAutomaticClusterWindowsProfile(profile *managedclusters.Ma
33043306
33053307 adminPassword := ""
33063308 if ! rawConfig .IsNull () {
3307- adminPassword = rawConfig .AsValueMap ()["windows_profile" ].AsValueSlice ()[0 ].AsValueMap ()["admin_password" ].AsString ()
3309+ windowsProfileSlice := rawConfig .AsValueMap ()["windows_profile" ].AsValueSlice ()
3310+ if len (windowsProfileSlice ) > 0 {
3311+ adminPassword = windowsProfileSlice [0 ].AsValueMap ()["admin_password" ].AsString ()
3312+ }
33083313 }
33093314 license := ""
33103315 if profile .LicenseType != nil && pointer .From (profile .LicenseType ) != managedclusters .LicenseTypeNone {
You can’t perform that action at this time.
0 commit comments