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

feat(new): Azure Data Explorer (Kusto) #440

Merged
merged 54 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
44b8b17
add event hub and cosmosdb with tests
dciborow Apr 7, 2023
9a6c15d
set version number
dciborow Apr 7, 2023
41c9575
add missing descriptions
dciborow Apr 7, 2023
42ba999
update formatting
dciborow Apr 7, 2023
e3680ae
adding new test case
dciborow Apr 7, 2023
746093e
Autogenerate Bicep Files
dciborow Apr 7, 2023
7b3d2a9
Merge branch 'main' into dciborow/kusto
dciborow Apr 8, 2023
207ea96
Autogenerate Bicep Files
dciborow Apr 8, 2023
a3ce2cd
Update main.json
dciborow Apr 8, 2023
19bd357
Update main.bicep
dciborow Apr 8, 2023
0614513
generate arm template
dciborow Apr 8, 2023
2aba28e
Create gpt-pr-review.yml
dciborow Apr 12, 2023
5c19e73
Merge pull request #23 from dciborow/dciborow-patch-4
dciborow Apr 12, 2023
94a579b
Update gpt-pr-review.yml
dciborow Apr 13, 2023
c943568
Merge pull request #24 from dciborow/dciborow-patch-5
dciborow Apr 13, 2023
d069521
Update gpt-pr-review.yml
dciborow Apr 13, 2023
46acb81
Update gpt-pr-review.yml
dciborow Apr 13, 2023
0521a24
Update gpt-pr-review.yml
dciborow Apr 13, 2023
741b8d5
Update gpt-pr-review.yml
dciborow Apr 14, 2023
15b1b93
Merge branch 'Azure:main' into main
dciborow Apr 14, 2023
51973ea
Merge branch 'Azure:main' into main
dciborow Apr 16, 2023
086aa89
Update fork-on-push-brm-generate.yml
dciborow Apr 16, 2023
9acd100
Update fork-on-push-brm-generate.yml
dciborow Apr 16, 2023
5048260
Merge branch 'Azure:main' into main
dciborow Apr 17, 2023
49800e5
Merge branch 'Azure:main' into main
dciborow Apr 17, 2023
f1a3cfc
Update gpt-pr-review.yml
dciborow Apr 18, 2023
a01ca2f
Merge pull request #33 from dciborow/dciborow-patch-8
dciborow Apr 18, 2023
26300bd
Merge branch 'Azure:main' into main
dciborow Apr 19, 2023
9bb512f
Merge branch 'main' into dciborow/kusto
dciborow Apr 21, 2023
539a026
Update main.bicep
dciborow Apr 21, 2023
b4e4c9a
Update fork-on-push-brm-generate.yml
dciborow May 5, 2023
9614a1f
Merge pull request #35 from dciborow/dciborow/update-ci-trigger
dciborow May 5, 2023
3133790
Update fork-on-push-brm-generate.yml
dciborow May 5, 2023
90aa21d
Merge branch 'Azure:main' into main
dciborow May 5, 2023
6a0fa14
Update and rename gpt-pr-review.yml to on-pull-request-target-review.yml
dciborow May 9, 2023
6322859
Merge branch 'main' into dciborow/kusto
dciborow May 9, 2023
fc1dc94
ci: add GPT based code review
dciborow May 15, 2023
291e90e
Apply suggestions from code review
dciborow May 15, 2023
57889ff
Update .github/workflows/on-pull-request-target-review.yml
dciborow May 15, 2023
772831e
Update on-pull-request-target-review.yml
dciborow May 15, 2023
d2b7a09
Merge branch 'dciborow/gpt-review' into dciborow/kusto
dciborow May 15, 2023
55f89c9
feat(new): Azure Data Explorer (Kusto)
vlahane Jul 6, 2023
b8dc54d
removed file
vlahane Jul 6, 2023
61c94d6
brm generate
vlahane Jul 6, 2023
f7a4484
non module file
vlahane Jul 6, 2023
7010aea
added bicepconfig
vlahane Jul 6, 2023
d66d67d
Autogenerate Bicep Files
vlahane Jul 6, 2023
ec367df
support for principalAssignments
vlahane Jul 7, 2023
3b679b8
added roleAssignments
vlahane Jul 7, 2023
2733bba
fix: added more prop for eventhub connection
vlahane Jul 13, 2023
b19c14f
Autogenerate Bicep Files
vlahane Jul 13, 2023
241076e
any workaround
vlahane Aug 19, 2023
5765acb
Autogenerate Bicep Files
vlahane Aug 19, 2023
05b9c78
Merge branch 'main' into vlahane-kusto
vlahane Aug 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
param location string
param tags object
param manualApprovalEnabled bool
param privateEndpoints array

var varPrivateEndpoints = [for (p, i) in privateEndpoints: {
name: p.name
privateLinkServiceId: p.privateLinkServiceId
groupIds: p.groupIds
subnetId: p.subnetId
privateDnsZones: contains(p, 'privateDnsZones') ? p.privateDnsZones : []
customNetworkInterfaceName: contains(p, 'customNetworkInterfaceName') ? p.customNetworkInterfaceName : null
}]

@batchSize(1)
resource privateEndpoint 'Microsoft.Network/privateEndpoints@2022-05-01' = [for endpoint in varPrivateEndpoints: {
name: '${endpoint.name}-${uniqueString(endpoint.name, endpoint.subnetId, endpoint.privateLinkServiceId)}'
location: location
tags: tags
properties: {
privateLinkServiceConnections: manualApprovalEnabled ? null : [
{
name: endpoint.name
properties: {
privateLinkServiceId: endpoint.privateLinkServiceId
groupIds: !empty(endpoint.groupIds) ? endpoint.groupIds : null
}
}
]
manualPrivateLinkServiceConnections: manualApprovalEnabled ? [
{
name: endpoint.name
properties: {
privateLinkServiceId: endpoint.privateLinkServiceId
groupIds: !empty(endpoint.groupIds) ? endpoint.groupIds : null
}
}
] : null
subnet: {
id: endpoint.subnetId
}
customNetworkInterfaceName: endpoint.customNetworkInterfaceName
}
}]

@batchSize(1)
resource privateDnsZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2022-05-01' = [for (endpoint, i) in varPrivateEndpoints: {
name: 'default'
parent: privateEndpoint[i]
properties: {
privateDnsZoneConfigs: [for privateDnsZone in endpoint.privateDnsZones: {
name: contains(privateDnsZone, 'name') ? privateDnsZone.name : 'default'
properties: {
privateDnsZoneId: privateDnsZone.zoneId
}
}]
}
}]
67 changes: 67 additions & 0 deletions modules/storage/data-explorer/.bicep/nested_rbac.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@sys.description('Required. The IDs of the principals to assign the role to.')
param principalIds array

@sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
param roleDefinitionIdOrName string

@sys.description('Required. The resource Id of the Kusto cluster.')
param resourceId string

@sys.description('Optional. The principal type of the assigned principal ID.')
@allowed([
'ServicePrincipal'
'Group'
'User'
'ForeignGroup'
'Device'
''
])
param principalType string = ''

@sys.description('Optional. The description of the role assignment.')
param description string = ''

@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container".')
param condition string = ''

@sys.description('Optional. Version of the condition.')
@allowed([
'2.0'
])
param conditionVersion string = '2.0'

@sys.description('Optional. Id of the delegated managed identity resource.')
param delegatedManagedIdentityResourceId string = ''

var builtInRoleNames = {
Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f37683f-2463-46b6-9ce7-9b788b988ba2')
'App Compliance Automation Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fbdf93bf-df7d-467e-a4d2-9458aa1360c8')
'Log Analytics Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '73c42c96-874c-492b-b04d-ab87d138a893')
'Log Analytics Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '92aaf0da-9dab-42b6-94a3-d43ce8d16293')
'Managed Application Operator Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c7393b34-138c-406f-901b-d8cf2b17e6ae')
'Managed Applications Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b9331d33-8a36-4f8c-b097-4f54124fdb44')
'Monitoring Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '43d0d8ad-25c7-4714-9337-8ba259a9fe05')
'Resource Policy Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'Resource Policy Contributor')
'Managed Application Contributor Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '641177b8-a67a-45b9-a033-47bc880bb21e')
'Monitoring Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '749f88d5-cbae-40b8-bcfc-e573ddc772fa')
'Monitoring Metrics Publisher': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3913510d-42f4-4e42-8a64-420c390055eb')
}

resource kustoClusters 'Microsoft.Kusto/clusters@2022-12-29' existing = {
name: last(split(resourceId, '/'))
}

@batchSize(1)
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
name: guid(kustoClusters.name, principalId, roleDefinitionIdOrName)
properties: {
description: description
roleDefinitionId: contains(builtInRoleNames, roleDefinitionIdOrName) ? builtInRoleNames[roleDefinitionIdOrName] : roleDefinitionIdOrName
principalId: principalId
principalType: !empty(principalType) ? any(principalType) : null
condition: !empty(condition) ? condition : null
conditionVersion: !empty(conditionVersion) && !empty(condition) ? conditionVersion : null
delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : null
}
scope: kustoClusters
}]
Loading