-
Notifications
You must be signed in to change notification settings - Fork 377
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
fix: static validation error and BCP error in avm.res.dev-ops-infrastructure.pool
#3333
fix: static validation error and BCP error in avm.res.dev-ops-infrastructure.pool
#3333
Conversation
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.
🆗️
@eriqua, @johnlokerse, the test deployments seem to have failed (the module is not published): https://github.com/Azure/bicep-registry-modules/actions/runs/10950416993 |
@matebarabas @eriqua This is error comes up due to incorrect quotas in the region that the MDP resource is deployed to. I know Alexander has tested a deployment on his side. I believe he tested it in northeurope, due to capacity limits in westeurope. See prereqs docs: https://learn.microsoft.com/en-us/azure/devops/managed-devops-pools/prerequisites?view=azure-devops&tabs=azure-portal#create-a-quota-support-request What is the best way to approach this? Hardcode the deployment location if we are sure which location @AlexanderSehr has deployed to? |
On it @johnlokerse |
Hey @johnlokerse, I'm retrieving a list of allowed locations for our target environment. Let me know if any additional prerequisite, so that we can test a successful deployment of all e2e tests before enforcing specific locations in code as a next step. Update: I've manually assigned required permissions to the DevOpsInfrastructure service principal, but would suggest to instead use the CI secret feature, similarly to what this module already does for devops parameters. Currently both max and waf-aligned tests are failing due to missing devops permissions for the deployment spn. Let's please connect offline to identify the required prerequisites so that the module can pass required validation and get published. |
Hey @eriqua, the permissions on the virtual network are set through the // Network Contributor role assignment
resource roleAssignments 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
name: guid(subscription().subscriptionId, 'DevOpsInfrastructure', 'Network Contributor', 'max')
properties: {
principalId: devOpsInfrastructureObjectID // DevOpsInfrastructure service principal
#disable-next-line use-resource-id-functions
roleDefinitionId: '/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7'
principalType: 'ServicePrincipal'
}
scope: virtualNetwork
} The deployment uses the new CI secret feature. My validation deployments are done through that way. As far as I can see it is also the case in the AVM test deployment (https://github.com/Azure/bicep-registry-modules/actions/runs/10963081104/job/30458820341#step:4:542): @eriqua What are the deployment permission differences between Default and Max or WAF? The AVM validation deployment has a successful Default deployment, which also deploys an agent pool in Azure DevOps. Below the output of a Defaults deployment (agent pool in AzDo): |
Hi @johnlokerse thanks for the above details and sorry if I'm not aligned if discussions already happened prior to raising this PR. As you know, as per the new CI secrets feature, we should also set up the brm environment in the same way you did for yours. That includes setting up secrets in the BRM keyvault. I see we have secrets created in our keyvault too, but we are missing values. I'd appreciate if we could connect offline so that I can support setting the above in order to publish this module. |
@eriqua Reached out to you via Teams 😄 |
🚀 The module is published 🚀 Just providing updates here for future reference:
|
Hey @eriqua & @johnlokerse, was #3 added to the test/documentation by any chance? |
Hey @AlexanderSehr I believe there are conversations ongoing with the PG to investigate why documented permissions were not enough. @johnlokerse please chime in if any news. |
@AlexanderSehr @eriqua I have not heard anything back yet. I will post something here when I hear something (or just add it to the docs ;-)) |
I see. Thanks for elaborating 💪 |
Description
This pull request fixes the following:
Tagging @matebarabas @AlexanderSehr
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.