Skip to content

Fix plugin crashes if terraform apply is re run after directory_services_v2 creates #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Haroon-Dweikat-Ntx
Copy link
Collaborator

@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx commented Mar 17, 2025

Fixes:

Previously, the plugin was crashing because it mishandled the service account password. The directory service response did not return the actual password—instead, it returned "*****"—which is required for the update operation. To resolve this, we re-read the password from the Terraform script file, password handled as sensitive attribute so it will be saved in state file as *****.

@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx changed the base branch from release/2.1 to master April 16, 2025 09:55
@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Haroon-Dweikat-Ntx commented Apr 16, 2025

/ok-to-test TestAccV2NutanixDirectoryService*

Acceptance test run status: success
📌 View GitHub Actions Run
Current line coverage (1.2) is below threshold (50). Kindly add more acceptance tests.

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Haroon-Dweikat-Ntx commented Apr 16, 2025

/ok-to-test TestAccV2NutanixDirectoryService*

Acceptance test run status: success
📌 View GitHub Actions Run
Current line coverage (1.7) is below threshold (50). Kindly add more acceptance tests.

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Test summery:

==================================================🧪 TEST SUMMARY 🧪=================================================================================
Total Test Cases Run 🐹🚀: 12
Total Test Cases Passed 🐹✅: 1*** (83 %)
Total Test Cases Failed 🐹❌: 1 (8 %)
Total Test Cases Skipped 🐹⚠️: 1 (8 %)
==================================================================================================================================================
================================================== TESTS SUCCEEDED ✅ =============================================================================
✅ TestAccV2NutanixDirectoryServiceDatasource_Basic
✅ TestAccV2NutanixDirectoryServicesDatasource_Basic
✅ TestAccV2NutanixDirectoryServicesDatasource_WithFilter
✅ TestAccV2NutanixDirectoryServicesDatasource_WithLimit
✅ TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYAlreadyExists
✅ TestAccV2NutanixDirectoryServicesResource_WithNoName
✅ TestAccV2NutanixDirectoryServicesResource_WithNoUrl
✅ TestAccV2NutanixDirectoryServicesResource_WithNoDomainName
✅ TestAccV2NutanixDirectoryServicesResource_WithNoDirectoryType
✅ TestAccV2NutanixDirectoryServicesResource_WithNoServiceAccount
===================================================================================================================================================
================================================== TESTS FAILED ❌ ================================================================================
❌ TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYService
===================================================================================================================================================
================================================== TESTS SKIPPED ⚠️ ==============================================================================
⚠️ TestAccV2NutanixDirectoryServicesResource_CreateOpenLDAPService   : Reason: ➡️ :      resource_nutanix_directory_services_v2_test.go:54: Skipping test as OpenLDAP waiting for LDAP configuration
===================================================================================================================================================

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Haroon-Dweikat-Ntx commented Apr 17, 2025

/ok-to-test TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYService

Acceptance test run status: success
📌 View GitHub Actions Run
Current line coverage (1.4) is below threshold (50). Kindly add more acceptance tests.

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

Haroon-Dweikat-Ntx commented Apr 17, 2025

/ok-to-test TestAccV2NutanixDirectoryService*

Acceptance test run status: success
📌 View GitHub Actions Run
Current line coverage (1.8) is below threshold (50). Kindly add more acceptance tests.

@Haroon-Dweikat-Ntx
Copy link
Collaborator Author

All Tests Passed:

==================================================🧪 TEST SUMMARY 🧪=================================================================================
Total Test Cases Run 🐹🚀: 12
Total Test Cases Passed 🐹✅: 11 (91 %)
Total Test Cases Failed 🐹❌: ***
*** ( %)
Total Test Cases Skipped 🐹⚠️: 1 ( %)
==================================================================================================================================================
================================================== TESTS SUCCEEDED ✅ =============================================================================

✅ TestAccV2NutanixDirectoryServiceDatasource_Basic
✅ TestAccV2NutanixDirectoryServicesDatasource_Basic
✅ TestAccV2NutanixDirectoryServicesDatasource_WithFilter
✅ TestAccV2NutanixDirectoryServicesDatasource_WithLimit
✅ TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYService
✅ TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYAlreadyExists
✅ TestAccV2NutanixDirectoryServicesResource_WithNoName
✅ TestAccV2NutanixDirectoryServicesResource_WithNoUrl
✅ TestAccV2NutanixDirectoryServicesResource_WithNoDomainName
✅ TestAccV2NutanixDirectoryServicesResource_WithNoDirectoryType
✅ TestAccV2NutanixDirectoryServicesResource_WithNoServiceAccount
===================================================================================================================================================
================================================== TESTS FAILED ❌ ================================================================================
===================================================================================================================================================
================================================== TESTS SKIPPED ⚠️ ==============================================================================
⚠️ TestAccV2NutanixDirectoryServicesResource_CreateOpenLDAPService   : Reason: ➡️ :      resource_nutanix_directory_services_v2_test.go:54: Skipping test as OpenLDAP waiting for LDAP configuration
===================================================================================================================================================

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.

directory_services_v2 creates directory if terraform apply is re run plugin crashes
2 participants