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

   Add `Computed: true` to optional zone fields that are set by the Read 
function. This prevents Terraform from detecting false drift when these fields 
are not explicitly set in the configuration but have values returned by the 
CloudStack API.
   
   Fields fixed:
   - `guest_cidr_address`
   - `dns2`
   - `internal_dns2`
   - `ip6_dns1`
   - `ip6_dns2`
   
   The issue occurred because these fields were Optional but not Computed. When 
a user removed a previously set value from their config, Terraform would:
   1. Expect the field to be null (not in config)
   2. Read a non-null value from the API
   3. Detect drift and plan to remove it
   4. Send an update with the field omitted
   5. CloudStack would retain the old value (no explicit clear)
   6. Loop back to step 2
   
   With Optional + Computed, Terraform accepts API-provided values even when 
not explicitly set in the configuration, breaking the update loop.


-- 
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