Skip to content

Comments

feat(misconf): support for azurerm_network_interface_security_group_association #10215

Open
Dharma-09 wants to merge 2 commits intoaquasecurity:mainfrom
Dharma-09:feat/azurerm-nic-nsg-association
Open

feat(misconf): support for azurerm_network_interface_security_group_association #10215
Dharma-09 wants to merge 2 commits intoaquasecurity:mainfrom
Dharma-09:feat/azurerm-nic-nsg-association

Conversation

@Dharma-09
Copy link
Contributor

Description

The network_security_group_id attribute on azurerm_network_interface has been deprecated and removed in newer AzureRM provider versions. The recommended approach is now to associate a Network Security Group (NSG) using the separate azurerm_network_interface_security_group_association resource.

This PR adds support for resolving NSGs attached via the azurerm_network_interface_security_group_association resource when adapting network interfaces in the Azure Terraform parser.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

Comment on lines +302 to +306
{
name: "with network interface security group association",
terraform: `
resource "azurerm_windows_virtual_machine" "example" {
name = "example-machine"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add this test for the compute service?

Copy link
Contributor Author

@Dharma-09 Dharma-09 Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review. Here is my reasoning:
It’s related through the VM adaptation path.

I add compute test because I want to validate the real failing path (VM -> NIC -> NSG association), not just NIC parsing in isolation. We can avoid this test by adding regression test for AZU-0068

Copy link
Contributor

@nikpivkin nikpivkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I left one comment.

@nikpivkin nikpivkin added this pull request to the merge queue Feb 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(misconf): support for azurerm_network_interface_security_group_association

2 participants