Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cloud/services/network/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (s *Service) reconcileSubnets() error {

// Update subnet spec with the existing subnet details
existingSubnet.DeepCopyInto(sub)
sub.Tags = subnetTags

if err := wait.WaitForWithRetryable(wait.NewBackoff(), func() (bool, error) {
buildParams := s.getSubnetTagParams(unmanagedVPC, existingSubnet.GetResourceID(), existingSubnet.IsPublic, existingSubnet.AvailabilityZone, subnetTags, existingSubnet.IsEdge())
Expand Down
13 changes: 2 additions & 11 deletions pkg/cloud/services/network/subnets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ func TestReconcileSubnets(t *testing.T) {
AvailabilityZone: "us-east-1a",
CidrBlock: "10.0.10.0/24",
IsPublic: true,
Tags: infrav1.Tags{},
},
},
expect: func(m *mocks.MockEC2APIMockRecorder) {
Expand Down Expand Up @@ -782,15 +781,13 @@ func TestReconcileSubnets(t *testing.T) {
AvailabilityZone: "us-east-1a",
CidrBlock: "10.0.10.0/24",
IsPublic: true,
Tags: infrav1.Tags{},
},
{
ID: "subnet-2",
ResourceID: "subnet-2",
AvailabilityZone: "us-east-1b",
CidrBlock: "10.0.11.0/24",
IsPublic: true,
Tags: infrav1.Tags{},
},
},
expect: func(m *mocks.MockEC2APIMockRecorder) {
Expand Down Expand Up @@ -4144,10 +4141,7 @@ func TestDiscoverSubnets(t *testing.T) {
CidrBlock: "10.0.10.0/24",
IsPublic: true,
RouteTableID: aws.String("rtb-1"),
Tags: infrav1.Tags{
"Name": "provided-subnet-public",
},
ZoneType: ptr.To[infrav1.ZoneType]("availability-zone"),
ZoneType: ptr.To[infrav1.ZoneType]("availability-zone"),
},
{
ID: "subnet-2",
Expand All @@ -4156,10 +4150,7 @@ func TestDiscoverSubnets(t *testing.T) {
CidrBlock: "10.0.11.0/24",
IsPublic: false,
RouteTableID: aws.String("rtb-2"),
Tags: infrav1.Tags{
"Name": "provided-subnet-private",
},
ZoneType: ptr.To[infrav1.ZoneType]("availability-zone"),
ZoneType: ptr.To[infrav1.ZoneType]("availability-zone"),
},
},
},
Expand Down
Loading