sassoftware / viya4-iac-azure

This project contains Terraform configuration files to provision infrastructure components required to deploy SAS Viya platform products on Microsoft Azure Cloud.
Apache License 2.0
72 stars 88 forks source link

fix: (IAC-1321) updates to create NSG in network rg #365

Closed riragh closed 6 months ago

riragh commented 7 months ago

Changes:

All network related resources should get created into a vnet resource group if supplied by user. VNET gets created correctly in network resource group if vnet_resource_group_name is provided however, NSG creation was not following the same pattern. This PR corrects that behavior to follow the same logic.

If vnet_resource_group_name is provided without nsg_name, IAC will create NSG for you in the provided vnet resource group else NSG will created in the AKS resource group like before.

Tests:

Verified following scenarios, see test details in internal ticket: Scenario Provider Task kubectl version order cadence notes
1 Azure Defaults 1.27.9 ** fast:2020 NSG is created in aks rg
2 Azure Defaults, vnet_resource_group_name = "rp-vnet-rg-t02" 1.27.9 ** fast:2020 NSG is created in provided vnet rg