Skip to content

Commit e9aa93b

Browse files
committed
azure: tag installer-created LB resources
Adds tags to the load balancer and public IP created in hooks.
1 parent 304af67 commit e9aa93b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/infrastructure/azure/azure.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ func (p *Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput
335335
subscriptionID: session.Credentials.SubscriptionID,
336336
lbClient: lbClient,
337337
pipClient: networkClientFactory.NewPublicIPAddressesClient(),
338+
tags: p.Tags,
338339
}
339340

340341
intLoadBalancer, err := updateInternalLoadBalancer(ctx, lbInput)

pkg/infrastructure/azure/loadbalancer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type lbInput struct {
1717
subscriptionID string
1818
pipClient *armnetwork.PublicIPAddressesClient
1919
lbClient *armnetwork.LoadBalancersClient
20+
tags map[string]*string
2021
}
2122

2223
type vmInput struct {
@@ -49,6 +50,7 @@ func createPublicIP(ctx context.Context, in *lbInput) (*armnetwork.PublicIPAddre
4950
DomainNameLabel: to.Ptr(in.infraID),
5051
},
5152
},
53+
Tags: in.tags,
5254
},
5355
nil,
5456
)
@@ -129,6 +131,7 @@ func createExternalLoadBalancer(ctx context.Context, pip *armnetwork.PublicIPAdd
129131
},
130132
},
131133
},
134+
Tags: in.tags,
132135
}, nil)
133136

134137
if err != nil {

0 commit comments

Comments
 (0)