dheeraj12347 opened a new pull request, #335:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/335

   ## Summary
   
   Add acceptance coverage for the `cloudstack_project` `display_text` 
migration and fix an import-state compatibility issue discovered during testing.
   
   The existing resource supports the new snake_case `display_text` field while 
retaining the deprecated `displaytext` field for backwards compatibility. These 
changes exercise both paths against the CloudStack simulator and verify that 
existing project behavior remains intact.
   
   ## Changes
   
   * Add an acceptance test for projects configured with `display_text`.
   * Add acceptance coverage for precedence when both `display_text` and 
deprecated `displaytext` are configured.
   * Verify updating the effective `display_text` value.
   * Fix `Read()` state handling for cases where neither display-text field is 
present in configuration, such as resource import.
   * Preserve the legacy `displaytext` state representation in that case to 
avoid an import-state mismatch.
   
   ## Validation
   
   The complete `cloudstack_project` acceptance test suite passes:
   
   * `TestAccCloudStackProject_basic`
   * `TestAccCloudStackProject_displayText`
   * `TestAccCloudStackProject_displayTextPrecedence`
   * `TestAccCloudStackProject_update`
   * `TestAccCloudStackProject_import`
   * `TestAccCloudStackProject_account`
   * `TestAccCloudStackProject_updateAccount`
   * `TestAccCloudStackProject_emptyDisplayText`
   * `TestAccCloudStackProject_updateUserid`
   * `TestAccCloudStackProject_updateAccountid`
   * `TestAccCloudStackProject_list`
   
   Result: **11/11 passing**
   
   Also verified with:
   
   ```text
   make test
   git diff --check
   ```
   
   Both pass successfully.
   
   ## Regression found during validation
   
   The initial full acceptance run exposed an import-state mismatch where the 
imported resource contained `displaytext` while the provider read populated 
`display_text`.
   
   The `Read()` logic was adjusted to distinguish between:
   
   1. legacy `displaytext` configurations,
   2. new `display_text` configurations, and
   3. imported resources where neither field is configured.
   
   The import acceptance test now passes without affecting the existing project 
acceptance tests.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to