diff --git a/azure/scope/managedcontrolplane.go b/azure/scope/managedcontrolplane.go index 8aa40656d40..6bc8837fe4f 100644 --- a/azure/scope/managedcontrolplane.go +++ b/azure/scope/managedcontrolplane.go @@ -298,6 +298,9 @@ func (s *ManagedControlPlaneScope) VNetSpec() azure.ResourceSpecGetter { // AzureFleetsMemberSpec returns the fleet spec. func (s *ManagedControlPlaneScope) AzureFleetsMemberSpec() azure.ASOResourceSpecGetter[*asocontainerservicev1preview.FleetsMember] { + if s.AzureFleetMembership() == nil { + return nil + } return &fleetsmember.AzureFleetsMemberSpec{ Name: s.AzureFleetMembership().Name, Namespace: s.Cluster.Namespace,