Skip to content

Commit

Permalink
Create _own_nsg_ tag only if created_nsg is true (#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdhowle authored May 21, 2024
1 parent 6223f9f commit 1dfce6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/modules/azure_rm_virtualmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2957,8 +2957,6 @@ def create_default_nic(self):
pip = self.network_models.PublicIPAddress(id=pip_facts.id, location=pip_facts.location, resource_guid=pip_facts.resource_guid, sku=sku)
self.tags['_own_pip_'] = self.name + '01'

self.tags['_own_nsg_'] = self.name + '01'

parameters = self.network_models.NetworkInterface(
location=self.location,
ip_configurations=[
Expand All @@ -2977,6 +2975,7 @@ def create_default_nic(self):
parameters.network_security_group = self.network_models.NetworkSecurityGroup(id=group.id,
location=group.location,
resource_guid=group.resource_guid)
self.tags['_own_nsg_'] = self.name + '01'

parameters.ip_configurations[0].public_ip_address = pip

Expand Down

0 comments on commit 1dfce6c

Please sign in to comment.