You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description:
There is an issue with the NSG module where security rules are not being removed when nsg_rule_names is set to an empty list. This behavior is inconsistent with the initial creation of NSG rules, where no rules are added if nsg_rule_names is empty.
No changes. Your infrastructure matches the configuration.
Expected Behaviour
The NSG rules should be removed when nsg_rule_names is set to an empty list.
Actual Behaviour
The NSG rules are not removed when nsg_rule_names is set to an empty list.
Initial Behavior
When nsg_rule_names is initially set to an empty list, no NSG rules are added, which works as expected.
Steps to Reproduce
Define a subnet with nsg_rule_names containing some rules.
Apply the Terraform configuration to create the NSG and rules.
Update the subnet to set nsg_rule_names to an empty list.
Apply the Terraform configuration again.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
satenderrathee
changed the title
[BUG] Issue with NSG Rules Not Being Removed When nsg_rule_names is Empty
Issue with NSG Rules Not Being Removed When nsg_rule_names is Empty
Feb 3, 2025
Community Note
Description:
There is an issue with the NSG module where security rules are not being removed when nsg_rule_names is set to an empty list. This behavior is inconsistent with the initial creation of NSG rules, where no rules are added if nsg_rule_names is empty.
Terraform Version
1.9.4
AzureRM Provider Version
3.117.0
Affected Resource(s)/Data Source(s)
azurerm_network_security_group
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The NSG rules should be removed when nsg_rule_names is set to an empty list.
Actual Behaviour
The NSG rules are not removed when nsg_rule_names is set to an empty list.
Initial Behavior
When nsg_rule_names is initially set to an empty list, no NSG rules are added, which works as expected.
Steps to Reproduce
Define a subnet with nsg_rule_names containing some rules.
Apply the Terraform configuration to create the NSG and rules.
Update the subnet to set nsg_rule_names to an empty list.
Apply the Terraform configuration again.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: