This pull request includes various updates to the Power Platform Terraform provider, focusing on documentation improvements, test adjustments, and schema modifications to enhance the functionality and maintainability of the codebase.
Documentation Updates:
Added comprehensive documentation for the powerplatform_environment_group_rule_set resource, including example usage and schema details. (docs/resources/environment_group_rule_set.md)
Test Adjustments:
Updated test assertions to check for empty strings instead of missing attributes for linked_app_type, linked_app_id, and linked_app_url in TestUnitEnvironmentsDataSource_Validate_Read. (internal/services/environment/datasource_environments_test.go)
Schema Modifications:
Introduced plan modifiers to various schema attributes to ensure they use state values for unknown fields in resource_environment.go. This includes attributes like billing_policy_id, unique_name, administration_mode_enabled, background_operation_enabled, url, domain, version, linked_app_type, linked_app_id, and linked_app_url. (internal/services/environment/resource_environment.go) [1][2][3][4][5]
Added a custom plan modifier SetUrlValueUnknownIfDomainChange to handle domain changes affecting the url attribute. (internal/services/environment/set_url_value_unknown_if_domin_change_modifier.go)
Code Refactoring:
Refactored import statements to ensure consistency and remove unnecessary aliasing. (internal/services/rest/resource_rest.go) [1][2]
Model Adjustments:
Adjusted the convertSourceModelFromEnvironmentDto function to set empty strings instead of null values for linked_app_type, linked_app_id, and linked_app_url. (internal/services/environment/models.go)
These changes collectively improve the accuracy, maintainability, and functionality of the Power Platform Terraform provider.
This pull request includes various updates to the Power Platform Terraform provider, focusing on documentation improvements, test adjustments, and schema modifications to enhance the functionality and maintainability of the codebase.
Documentation Updates:
powerplatform_environment_group_rule_set
resource, including example usage and schema details. (docs/resources/environment_group_rule_set.md
)Test Adjustments:
linked_app_type
,linked_app_id
, andlinked_app_url
inTestUnitEnvironmentsDataSource_Validate_Read
. (internal/services/environment/datasource_environments_test.go
)Schema Modifications:
resource_environment.go
. This includes attributes likebilling_policy_id
,unique_name
,administration_mode_enabled
,background_operation_enabled
,url
,domain
,version
,linked_app_type
,linked_app_id
, andlinked_app_url
. (internal/services/environment/resource_environment.go
) [1] [2] [3] [4] [5]SetUrlValueUnknownIfDomainChange
to handle domain changes affecting theurl
attribute. (internal/services/environment/set_url_value_unknown_if_domin_change_modifier.go
)Code Refactoring:
internal/services/rest/resource_rest.go
) [1] [2]Model Adjustments:
convertSourceModelFromEnvironmentDto
function to set empty strings instead of null values forlinked_app_type
,linked_app_id
, andlinked_app_url
. (internal/services/environment/models.go
)These changes collectively improve the accuracy, maintainability, and functionality of the Power Platform Terraform provider.