This pull request introduces the powerplatform_environment_group resource to the Power Platform Terraform provider. The changes include adding new documentation, examples, and the necessary code to support the creation, reading, updating, and deletion of environment groups.
Documentation and Examples:
Added documentation for the new powerplatform_environment_group resource in docs/resources/environment_group.md.
Included an example usage of the powerplatform_environment_group resource in examples/resources/powerplatform_environment_group/resource.tf.
Provider Code:
Updated internal/powerplatform/provider.go to import the new environment_groups package and register the new resource [1][2].
Added unit tests and acceptance tests for the new resource in internal/powerplatform/provider_test.go[1][2].
Resource Implementation:
Implemented the EnvironmentGroupClient in internal/powerplatform/services/environment_groups/api_environment_group.go to handle API interactions for environment groups.
Defined the data models for environment groups in internal/powerplatform/services/environment_groups/models_environment_group.go.
Created the resource logic in internal/powerplatform/services/environment_groups/resource_environment_group.go with functions for CRUD operations and state import.
Testing:
Added test data for environment groups in internal/powerplatform/services/environment_groups/tests/resources/get_environment_group.json.
Implemented unit and acceptance tests for the environment group resource in internal/powerplatform/resource_environment_group_test.go.This pull request introduces the powerplatform_environment_group resource to manage Environment Groups in the Power Platform. The changes include documentation, examples, new client and resource implementations, and tests.
Documentation and Examples:
docs/resources/environment_group.md: Added documentation for the powerplatform_environment_group resource, including an example usage and schema details.
This pull request introduces the
powerplatform_environment_group
resource to the Power Platform Terraform provider. The changes include adding new documentation, examples, and the necessary code to support the creation, reading, updating, and deletion of environment groups.Documentation and Examples:
powerplatform_environment_group
resource indocs/resources/environment_group.md
.powerplatform_environment_group
resource inexamples/resources/powerplatform_environment_group/resource.tf
.Provider Code:
internal/powerplatform/provider.go
to import the newenvironment_groups
package and register the new resource [1] [2].internal/powerplatform/provider_test.go
[1] [2].Resource Implementation:
EnvironmentGroupClient
ininternal/powerplatform/services/environment_groups/api_environment_group.go
to handle API interactions for environment groups.internal/powerplatform/services/environment_groups/models_environment_group.go
.internal/powerplatform/services/environment_groups/resource_environment_group.go
with functions for CRUD operations and state import.Testing:
internal/powerplatform/services/environment_groups/tests/resources/get_environment_group.json
.internal/powerplatform/resource_environment_group_test.go
.This pull request introduces thepowerplatform_environment_group
resource to manage Environment Groups in the Power Platform. The changes include documentation, examples, new client and resource implementations, and tests.Documentation and Examples:
docs/resources/environment_group.md
: Added documentation for thepowerplatform_environment_group
resource, including an example usage and schema details.examples/resources/powerplatform_environment_group/resource.tf
: Added a Terraform configuration example for thepowerplatform_environment_group
resource.Client and Resource Implementations:
internal/powerplatform/services/environment_groups/api_environment_group.go
: Implemented the client for creating, updating, deleting, and fetching Environment Groups.internal/powerplatform/services/environment_groups/resource_environment_group.go
: Defined the resource schema and implemented the create, read, update, delete, and import functions for thepowerplatform_environment_group
resource.internal/powerplatform/services/environment_groups/models_environment_group.go
: Added data models for Environment Groups.Provider Integration:
internal/powerplatform/provider.go
: Added theenvironment_groups
service to the provider and registered the new resource. [1] [2]Tests:
internal/powerplatform/resource_environment_group_test.go
: Added acceptance and unit tests for thepowerplatform_environment_group
resource.internal/powerplatform/services/environment_groups/tests/resources/get_environment_group.json
: Added a JSON response file for testing the Environment Group resource.