Skip to content

Comments

Add Azure Network Private Endpoint resources and fixture coverage#737

Open
dwizzle204 wants to merge 4 commits intoinspec:mainfrom
dwizzle204:feat/721-private-endpoints
Open

Add Azure Network Private Endpoint resources and fixture coverage#737
dwizzle204 wants to merge 4 commits intoinspec:mainfrom
dwizzle204:feat/721-private-endpoints

Conversation

@dwizzle204
Copy link
Contributor

Summary

Adds support for Azure Private Endpoints in inspec-azure by introducing new static resources and test fixture coverage for Microsoft.Network/privateEndpoints.

Fixes #721

What Changed

New resources

  • Added singular resource: azure_network_private_endpoint
  • Added plural resource: azure_network_private_endpoints

Files:

  • libraries/azure_network_private_endpoint.rb
  • libraries/azure_network_private_endpoints.rb

Backward compatibility

  • Added deprecated aliases:
    • azurerm_network_private_endpoint
    • azurerm_network_private_endpoints
  • Added alias default API version fallback:
    • opts[:api_version] ||= '2020-05-01'

Unit tests

  • Added constructor tests for both resources.
  • Fixed non-executed test methods in plural test (test_ prefix).
  • Added singular accessor method coverage:
    • subnet_id
    • network_interface_ids
    • private_link_service_connection_ids
    • manual_private_link_service_connection_ids
    • nil behavior when resource does not exist

Files:

  • test/unit/resources/azure_network_private_endpoint_test.rb
  • test/unit/resources/azure_network_private_endpoints_test.rb

Integration fixture + controls

  • Added optional Terraform fixture for a private endpoint against storage blob.
  • Added dedicated subnet for private endpoint and expanded VNet CIDR.
  • Added outputs for integration controls:
    • private_endpoint_name
    • private_endpoint_id

Files:

  • terraform/variables.tf
  • terraform/azure.tf
  • terraform/outputs.tf
  • test/integration/verify/controls/azure_network_private_endpoint.rb
  • test/integration/verify/controls/azure_network_private_endpoints.rb

Documentation

  • Added new resource entries to static resource and azurerm mapping tables.
  • Added optional component documentation for private endpoint fixture.

File:

  • README.md

Validation Performed

  • RuboCop on changed Ruby files: pass
  • Targeted unit tests:
    • test/unit/resources/azure_network_private_endpoint_test.rb pass
    • test/unit/resources/azure_network_private_endpoints_test.rb pass

Notes

  • Integration controls are only_if-guarded and rely on Terraform output private_endpoint_name.
  • Existing repository-wide Terraform legacy typing constraints still affect terraform validate output in this environment; no additional Terraform type modernizations were introduced in this PR.

@dwizzle204 dwizzle204 requested a review from a team as a code owner February 21, 2026 15:16
@netlify
Copy link

netlify bot commented Feb 21, 2026

Deploy Preview for inspec-azure canceled.

Name Link
🔨 Latest commit 5b6148c
🔍 Latest deploy log https://app.netlify.com/projects/inspec-azure/deploys/6999d9c90167d100088e3d63

Signed-off-by: Dwayne Medeiros <dwayne.medeiros@gmail.com>
Signed-off-by: Dwayne Medeiros <dwayne.medeiros@gmail.com>
Signed-off-by: Dwayne Medeiros <dwayne.medeiros@gmail.com>
Signed-off-by: Dwayne Medeiros <dwayne.medeiros@gmail.com>
@dwizzle204 dwizzle204 force-pushed the feat/721-private-endpoints branch from 964761e to 5b6148c Compare February 21, 2026 16:13
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.

Add azure_network_privateEndpoints resource type

2 participants