-
Notifications
You must be signed in to change notification settings - Fork 15
Add powerplatform_environment_application_admin resource #786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mawasile <50197777+mawasile@users.noreply.github.com>
powerplatform_environment_application_admin
resource
internal/services/environment_application_admin/resource_environment_application_admin.go
Dismissed
Show dismissed
Hide dismissed
internal/services/environment_application_admin/resource_environment_application_admin.go
Dismissed
Show dismissed
Hide dismissed
internal/services/environment_application_admin/api_environment_application_admin.go
Outdated
Show resolved
Hide resolved
"github.com/microsoft/terraform-provider-power-platform/internal/helpers" | ||
) | ||
|
||
// NewEnvironmentApplicationAdminResource creates a new instance of the resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should end in a period (godot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added period to comment in d1989f9
internal/services/environment_application_admin/resource_environment_application_admin.go
Outdated
Show resolved
Hide resolved
return | ||
} | ||
|
||
// If the application user doesn't exist, remove resource from state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should end in a period (godot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added period to comment in d1989f9
internal/services/environment_application_admin/resource_environment_application_admin.go
Outdated
Show resolved
Hide resolved
Co-authored-by: mawasile <50197777+mawasile@users.noreply.github.com>
This PR implements the
powerplatform_environment_application_admin
resource that ensures a service principal exists as an application user with the System Administrator role in a Dataverse environment.Key Features
{environment_id}/{application_id}
Technical Implementation
POST /providers/Microsoft.BusinessAppPlatform/scopes/admin/enroll
to add the application user{environment_id}/{application_id}
Example Usage
This resource is especially useful for imported environments where service principals don't already have Dataverse access.
Fixes #782.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint-api.hashicorp.com
/tmp/go-build2494529128/b001/environment_application_admin.test -test.testlogfile=/tmp/go-build2494529128/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true
(dns block)tfplugindocs generate --provider-name powerplatform --rendered-provider-name Power Platform
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.