File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
azure/services/agentpools Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,11 @@ func (s *AgentPoolSpec) Parameters(ctx context.Context, existing interface{}) (p
265265 if s .SKU != "" {
266266 sku = & s .SKU
267267 }
268+ tags := converters .TagsToMap (s .AdditionalTags )
269+ if tags == nil {
270+ // Make sure we send a non-nil, empty map if AdditionalTags are nil as this tells AKS to delete any existing tags.
271+ tags = make (map [string ]* string , 0 )
272+ }
268273 var vnetSubnetID * string
269274 if s .VnetSubnetID != "" {
270275 vnetSubnetID = & s .VnetSubnetID
@@ -352,7 +357,7 @@ func (s *AgentPoolSpec) Parameters(ctx context.Context, existing interface{}) (p
352357 VnetSubnetID : vnetSubnetID ,
353358 EnableNodePublicIP : s .EnableNodePublicIP ,
354359 NodePublicIPPrefixID : s .NodePublicIPPrefixID ,
355- Tags : converters . TagsToMap ( s . AdditionalTags ) ,
360+ Tags : tags ,
356361 LinuxOSConfig : linuxOSConfig ,
357362 },
358363 }
You can’t perform that action at this time.
0 commit comments