-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add DNS role assignement #1227
base: main
Are you sure you want to change the base?
Add DNS role assignement #1227
Conversation
var dnsZoneContributor = subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'befefa01-2a29-4197-83a8-272ff33ce314') | ||
|
||
// SafeDnsIntApplication object ID use to delegate child DNS | ||
var safeDnsIntAppObjectId = 'c54b6bce-1cd3-4d37-bebe-aa22f4ce4fbc' |
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.
please introduce a new config field for this so we can define this in config per env.
for RH you can use the same ID as we use for aroDevopsMsiId
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.
update PR title and description
@@ -19,6 +19,9 @@ param grafanaAdminGroupPrincipalId string | |||
@description('MSI that will be used during pipeline runs to Azure resources') | |||
param aroDevopsMsiId string | |||
|
|||
@description('SafeDnsIntApplication object ID use to delegate child DNS') | |||
param safeDnsIntAppObjectId string |
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.
what is safeDnsIntAppObjectId for?
var grafanaAdmin = { | ||
principalId: grafanaAdminGroupPrincipalId | ||
principalType: 'group' | ||
} | ||
|
||
resource grafanaInstance 'Microsoft.Dashboard/grafana@2023-09-01' = { |
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.
grafana
|
||
// Azure Managed Grafana Workspace Contributor: Can manage Azure Managed Grafana resources, without providing access to the workspaces themselves. | ||
// https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/monitor#azure-managed-grafana-workspace-contributor | ||
var contributor = '5c2d7e57-b7c2-4d8a-be4f-82afa42c6e95' |
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.
grafanaContributor
|
||
// Grafana Admin: Perform all Grafana operations, including the ability to manage data sources, create dashboards, and manage role assignments within Grafana. | ||
// https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/monitor#grafana-admin | ||
var admin = '22926164-76b3-42b3-bc55-97df8dab3e41' |
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.
grafanaAdmin
@@ -19,6 +19,9 @@ param grafanaAdminGroupPrincipalId string | |||
@description('MSI that will be used during pipeline runs to Azure resources') |
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.
line 20 why do we need this? we can output from ev2MSI
var grafanaAdmin = { | ||
principalId: grafanaAdminGroupPrincipalId | ||
principalType: 'group' | ||
} |
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.
grafanaAdminGroup
resource grafanaDevopsAccess 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(grafanaInstance.id, aroDevopsMsiId, grafanaEditorRole) | ||
resource contributorRole 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(grafanaInstance.id, aroDevopsMsiId, contributor) | ||
scope: grafanaInstance | ||
properties: { | ||
principalId: reference(aroDevopsMsiId, '2023-01-31').principalId |
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.
line 101 ev2MSI.principalId
type: 'SystemAssigned' | ||
} | ||
} | ||
|
||
module grafana 'br:arointacr.azurecr.io/grafana.bicep:metrics.20240814.1' = { |
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.
remove line 88 - 95
What this PR does
We need to allow SafeDnsIntApplication manage DNS zones and record sets in Azure DNS in order for the DelegateChildZone to work
Jira:
Link to demo recording:
Special notes for your reviewer