This pull request to the internal/services/environment package introduces changes to improve the validation of environment details during creation and update operations. The most important changes include renaming existing validation methods for clarity, adding new methods for update validation, and updating the corresponding data transfer objects (DTOs) and tests.
internal/services/environment/dto.go: Renamed validateEnvironmentDetailsDto to validateCreateEnvironmentDetailsDto and added a new validateUpdateEnvironmentDetailsDto for update validation.
This pull request to the
internal/services/environment
package introduces changes to improve the validation of environment details during creation and update operations. The most important changes include renaming existing validation methods for clarity, adding new methods for update validation, and updating the corresponding data transfer objects (DTOs) and tests.Improvements to validation methods:
internal/services/environment/api_environment.go
: RenamedValidateEnvironmentDetails
toValidateCreateEnvironmentDetails
to better reflect its purpose. [1] [2] [3]internal/services/environment/api_environment.go
: Added a new methodValidateUpdateEnvironmentDetails
for validating environment details during updates.Updates to DTOs:
internal/services/environment/dto.go
: RenamedvalidateEnvironmentDetailsDto
tovalidateCreateEnvironmentDetailsDto
and added a newvalidateUpdateEnvironmentDetailsDto
for update validation.Test enhancements:
internal/services/environment/resource_environment_test.go
: Added a new testTestAccEnvironmentsResource_Validate_Domain_Uniqueness_On_Update
to validate domain uniqueness during environment updates.