azurenoops / terraform-azurerm-overlays-workload-spoke

Terraform module overlay to create SCCA compliant Workload Spoke based on the Microsoft Azure Hub-Spoke Architecture using with Azure NoOps.
MIT License
0 stars 0 forks source link

Update Workload Spoke subnet & NSG generated naming to use the passed name rather than the section key #36

Open sstjean opened 1 year ago

sstjean commented 1 year ago

Is there an existing issue for this?

Description

The Management Hub, Management Spoke, and Workload Spoke modules generate subnet and NSG names using the subnet key rather than the subnet name. This means that the Name value, while required, is never used. I think it would be more consistent for the subnets and NSGs to use the provided Name value rather than the key when generating their names.

New or Affected Resource(s)/Data Source(s)

subnet, nsg

Potential Terraform Configuration

Change naming.tf: line 22 to

suffixes      = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, each.value.name, local.name_suffix, var.use_naming ? "" : "snet"])

Change naming.tf: line 33 to

  suffixes      = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, each.value.name, local.name_suffix, var.use_naming ? "" : "nsg"])

References

Child of https://github.com/orgs/azurenoops/projects/1?pane=issue&itemId=37752862