Skip to content
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

Error with creating enterprise policy for subnet injection #620

Open
robjdav opened this issue Aug 5, 2024 · 2 comments
Open

Error with creating enterprise policy for subnet injection #620

robjdav opened this issue Aug 5, 2024 · 2 comments

Comments

@robjdav
Copy link

robjdav commented Aug 5, 2024

Identical to this issue (closed with no resolution provided) , I'm trying to create a power platform enterprise policy for subnet injection with Bicep. However, the deployment fails with the following error:

"Failed to create or update the enterprise policy, request body is null. (Code: InputValidationError)"

Bicep code for this is below (taken from here )

resource enterprisePolicy 'Microsoft.PowerPlatform/enterprisePolicies@2020-10-30-preview' = {
  name: 'policyName'
  location: 'UK'
  kind: 'NetworkInjection'
  properties: {
    networkInjection: {
      virtualNetworks: {
        value: [
          {
            id: vNet.id
            subnet: {
              name: 'PPSubnet1'
            }
          }
          {
            id: vNet.id
            subnet: {
              name: 'PPSubnet2'
            }
          }
        ]
      }
    }
  }
}
@Haps1976
Copy link

HI I am looking for the bicep code whcih can run enterprise policy to integrate powerapps with azure... I need to automate this please help em if you have it

@sadjadbp
Copy link

sadjadbp commented Nov 5, 2024

Looks like the internal contract is

virtualNetworks: [
   {
      id: vNet.id
      subnet: {
        name: 'PPSubnet1'
      }
   },
   {
       id: vNet.id
       subnet: {
         name: 'PPSubnet2'
       }
   }
]

we are looking at why the docs and contract are different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants