diff --git a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go index 9d1bb70606f44..166afc0939f89 100644 --- a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go +++ b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go @@ -36,7 +36,6 @@ type VirtualNetwork struct { ResourceGroup *ResourceGroup CIDR *string Tags map[string]*string - Subnets []*network.Subnet Shared *bool } @@ -90,9 +89,8 @@ func (n *VirtualNetwork) Find(c *fi.CloudupContext) (*VirtualNetwork, error) { ResourceGroup: &ResourceGroup{ Name: n.ResourceGroup.Name, }, - CIDR: addrPrefixes[0], - Tags: found.Tags, - Subnets: found.Properties.Subnets, + CIDR: addrPrefixes[0], + Tags: found.Tags, }, nil } @@ -144,7 +142,6 @@ func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Virtu AddressSpace: &network.AddressSpace{ AddressPrefixes: []*string{e.CIDR}, }, - Subnets: e.Subnets, }, Tags: e.Tags, } diff --git a/upup/pkg/fi/cloudup/new_cluster.go b/upup/pkg/fi/cloudup/new_cluster.go index 14e9e3ee9b6ce..7162d98ac34f3 100644 --- a/upup/pkg/fi/cloudup/new_cluster.go +++ b/upup/pkg/fi/cloudup/new_cluster.go @@ -696,8 +696,8 @@ func setupZones(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.Stri return nil, err } - // We create default subnets named the same as the regions - subnetName := location + // We create default subnets named the same as the cluster + subnetName := cluster.Name subnet := model.FindSubnet(cluster, subnetName) if subnet == nil {