Skip to content

Conversation

Haroon-Dweikat-Ntx
Copy link
Collaborator

What this PR does

  • Introduces a new Terraform data source: nutanix_stigs_v2.
  • Uses the Nutanix V4 Security API (List STIGs endpoint) to fetch and expose Security Technical Implementation Guide (STIG) controls.
  • Allows Terraform users to query available STIGs directly and reference them in their configurations.

Why this is needed

  • Provides Terraform support for managing and integrating STIG compliance controls from the Nutanix V4 API.
  • Enables automation and policy enforcement by letting users consume STIG definitions programmatically.
  • Ensures consistency across infrastructure by exposing STIG data for use in Terraform-managed workflows.

How it was tested

  • Implemented and ran local builds of the provider with the new data source.
  • Queried the nutanix_stigs_v2 data source against a Nutanix environment with available STIGs.
  • Verified returned attributes match the V4 API response schema (e.g., extId, title, ruleId).
  • Confirmed Terraform plan/apply outputs display the expected STIG details.

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Haroon-Dweikat-Ntx commented Sep 1, 2025

/ok-to-test TestAccV2NutanixStigsControlsDatasource

  • 🧪 Build Status: success
  • 📌 GitHub Action: View GitHub Actions Run
  • 📊 Code Coverage: Current line coverage (1.2) is below threshold (50). Kindly add more acceptance tests.
  • 📝 Test Summary:
==================================================🧪 TEST SUMMARY 🧪=================================================================================
Total Test Cases Run 🚀: 2
Total Test Cases Passed ✅: 2 (100 %)
Total Test Cases Failed ❌: 0 (0 %)
Total Test Cases Skipped ⚠️: 0 (0 %)
==================================================================================================================================================

================================================== TESTS SUCCEEDED ✅ =============================================================================

✅ TestAccV2NutanixStigsControlsDatasource_Basic
✅ TestAccV2NutanixStigsControlsDatasource_Filtered
===================================================================================================================================================

================================================== TESTS FAILED ❌ ================================================================================
🎉💃 No tests failed 🕺🎉
===================================================================================================================================================

================================================== TESTS SKIPPED ⚠️ ==============================================================================
🎉💃 No tests skipped 🕺🎉
===================================================================================================================================================

@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx changed the title Support for STIG controls V4 Module in terraform Support for STIG controls V4 Module in terraform [code, tests, docs and example] Sep 1, 2025
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.

Feature Request: Add data source to fetch STIG controls details

1 participant