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

Providing custom resources for Blob, KeyVault, OpenAI, Search, or AI Services fails provisioning during role assignments #245

Open
colincmac opened this issue Nov 12, 2024 · 0 comments

Comments

@colincmac
Copy link

colincmac commented Nov 12, 2024

You are able to provide overrides for various services that are pre-existing, however the role assignment and a few Private Link Bicep modules are not scoped pre-defined resource groups.

Reproduce:

  1. Provide custom Azure OpenAI services via the ENV variables
  2. Get error
    ResourceNotFound: The Resource 'Microsoft.CognitiveServices/accounts/<my-service>' under resource group '<my-rg>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

This is due to the role assignments starting in these places not specifying the correct resource group in their scope

Access Policies (Links to lines where the RBAC assignments fail)

Private Links (2 individual failures)

  • module searchStoragePrivatelink 'core/search/search-private-link.bicep' = if (_networkIsolation && !_vnetReuse) {
  • module searchFuncAppPrivatelink 'core/search/search-private-link.bicep' = if (_networkIsolation && !_vnetReuse) {

Fix by changing the scope of the module to:
az.resourceGroup(_azureReuseConfig.myOverride)

Likely the value of _azureReuseConfig properties will need to be the actual values, rather than optional overrides. This is a common practice in the Bicep Modules Registry.

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

No branches or pull requests

1 participant