{"id":25022890,"url":"https://github.com/epomatti/powerapps-vnet-integration","last_synced_at":"2026-05-09T00:35:58.091Z","repository":{"id":272430277,"uuid":"864218361","full_name":"epomatti/powerapps-vnet-integration","owner":"epomatti","description":"Power Apps private connectivity with Azure SQL Database","archived":false,"fork":false,"pushed_at":"2025-02-05T02:01:56.000Z","size":359,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T02:39:54.582Z","etag":null,"topics":["azure","powerapps","private-endpoint","sql","sqlserver","terraform","virtual-network","vnet"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epomatti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-27T18:02:59.000Z","updated_at":"2025-02-05T02:02:00.000Z","dependencies_parsed_at":"2025-01-14T11:54:55.685Z","dependency_job_id":"cd71cd48-6d99-4076-8d4c-2a8b7fc57fe5","html_url":"https://github.com/epomatti/powerapps-vnet-integration","commit_stats":null,"previous_names":["epomatti/azure-powerapps-private-vnet-integration","epomatti/powerapps-vnet-integration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fpowerapps-vnet-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fpowerapps-vnet-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fpowerapps-vnet-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fpowerapps-vnet-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/powerapps-vnet-integration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246318518,"owners_count":20758172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","powerapps","private-endpoint","sql","sqlserver","terraform","virtual-network","vnet"],"created_at":"2025-02-05T14:19:29.796Z","updated_at":"2026-05-09T00:35:53.051Z","avatar_url":"https://github.com/epomatti.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Power Apps Virtual Network integration\n\nEnabling private network RFC 1918 connectivity from Power Apps managed environments to Azure SQL Server using [Virtual Network support][1], a native alternative to using data gateways.\n\n\u003cimg src=\".assets/azure-powerapps-vnet.png\" /\u003e\n\n## Infrastructure\n\n### Requirements\n\n\u003e [!NOTE]\n\u003e A license that allows that enables self-service sign-up and managed environments is required.\n\n- A Power Apps license (E.g.: Power Apps Premium, Power Apps Developer). \n- Use [managed environments][2]. Make sure to enable it after the environment creation.\n- Azure subscription with `Microsoft.PowerPlatform` provider enabled.\n\n### Deployment\n\nCreate the `.auto.tfvars` file:\n\n```sh\ncp config/local.auto.tfvars .auto.tfvars\n```\n\nIdentify the IP address from which you'll be administering the resources:\n\n```sh\ncurl ifconfig.me\n```\n\nSet the required variables to your preferences:\n\n\u003e [!IMPORTANT]\n\u003e Make sure to match the Azure and the Power Apps locations to your environment.\n\n```terraform\nsubscription_id       = \"\u003cSUBSCRIPTION id\u003e\"\nallowed_public_ips    = [\"\u003cYOUR IP ADDRESS\u003e\"]\nentraid_tenant_domain = \"\u003cENTRA ID DOMAIN\u003e\"\n```\n\nCreate the resources:\n\n```sh\nterraform init\nterraform apply -auto-approve\n```\n\n## Setup\n\nIn the new Power App UI experience, the Enterprise Policies seem to have been migrated to the URL below, and are identified as `Virtual Network policies`:\n\n```\nhttps://admin.powerplatform.microsoft.com/security/dataprotection\n```\n\nEnterprise policy for network injection must be configured via the CLI (or so it seems). Microsoft has provided a [collection os scripts](https://learn.microsoft.com/en-us/power-platform/admin/vnet-support-setup-configure) to assist with that, of which the step [7. Set Subnet Injection for an environment](https://github.com/microsoft/PowerApps-Samples/tree/master/powershell/enterprisePolicies#7-set-subnet-injection-for-an-environment) would be the one required for this configuration.\n\nDownload the `microsoft/PowerApps-Samples` code base. Start by reading the [How to run setup scripts](https://github.com/microsoft/PowerApps-Samples/blob/master/powershell/enterprisePolicies/README.md#how-to-run-setup-scripts) section and make sure the requirements are met.\n\n\u003e [!TIP]\n\u003e I had issues running these scripts on Linux. Code in this section was run on a Windows environment with PS7.\n\n\u003e [!NOTE]\n\u003e Run this script from a elevated terminal. It`ll install several required packages. **Bypass the execution at your own discretion**.\n\n```ps1\ncd .\\PowerApps-Samples-master\\powershell\\enterprisePolicies\n\npwsh -executionpolicy bypass -file .\\InstallPowerAppsCmdlets.ps1\n```\n\n\u003e [!TIP]\n\u003e Close the elevated terminal and start a standard one\n\nExecute the required script that will perform the subnet injection into the Power Apps environment:\n\n```ps1\n# You'll need to `cd` into this directory first:\ncd .\\SubnetInjection\\\n\n# And then run the script\npwsh -executionpolicy bypass -file .\\NewSubnetInjection.ps1\n```\n\nRetrieve the registration status of the enterprise policy to the environment:\n\n\u003e [!NOTE]\n\u003e It might take some time until the connectivity is functional and usable when connecting to data from Power Apps.\n\n```ps1\npwsh -executionpolicy bypass -file GetSubnetInjectionEnterprisePolicyForEnvironment.ps1\n```\n\nCheck the environment history to confirm the change was successful:\n\n\u003cimg src=\".assets/azure-powerapps-policy-succeeded.png\" width=700 /\u003e\n\n## Reference documentation\n\nQuick links to relevant Microsoft documents:\n\n- [Set up Virtual Network support for Power Platform](https://learn.microsoft.com/en-us/power-platform/admin/vnet-support-setup-configure)\n- [Virtual Network support overview](https://learn.microsoft.com/en-in/power-platform/admin/vnet-support-overview)\n- [7. Set Subnet Injection for an environment](https://github.com/microsoft/PowerApps-Samples/tree/master/powershell/enterprisePolicies#7-set-subnet-injection-for-an-environment)\n- [Managed Environments overview](https://learn.microsoft.com/en-in/power-platform/admin/managed-environment-overview)\n\n## 🧹 Clean-up\n\nRemove the subnet injection:\n\n```ps1\npwsh -executionpolicy bypass -file .\\RevertSubnetInjection.ps1\n```\n\nYou should now be able to delete the Power App managed environment.\n\nDestroy the Azure resources:\n\n```sh\nterraform destroy -auto-approve\n```\n\n[1]: https://learn.microsoft.com/en-in/power-platform/admin/vnet-support-setup-configure\n[2]: https://learn.microsoft.com/en-in/power-platform/admin/managed-environment-overview\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fpowerapps-vnet-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Fpowerapps-vnet-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fpowerapps-vnet-integration/lists"}