forked from Azure/Azure-Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#11617 from anders-alex/mdvm-connector-updates
Deployment fixes and updates.
- Loading branch information
Showing
12 changed files
with
711 additions
and
406 deletions.
There are no files selected for viewing
643 changes: 424 additions & 219 deletions
643
DataConnectors/M365Defender-VulnerabilityManagement/azureDeploy.json
Large diffs are not rendered by default.
Oops, something went wrong.
313 changes: 170 additions & 143 deletions
313
DataConnectors/M365Defender-VulnerabilityManagement/main.bicep
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...nnectors/M365Defender-VulnerabilityManagement/maintenance/deployLatestFunctionPackage.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
DataConnectors/M365Defender-VulnerabilityManagement/modules/functionApp.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
param FunctionAppName string | ||
param Location string | ||
param UserAssignedMiId string | ||
param UserAssignedMiPrincipalId string | ||
param HostingPlanId string | ||
param EnablePrivateNetworking bool | ||
param FunctionAppSubnetId string = '' | ||
param AppSettings array | ||
param DeployFunctionCode bool | ||
param RoleIdOwner string | ||
|
||
resource functionApp 'Microsoft.Web/sites@2024-04-01' = { | ||
name: FunctionAppName | ||
location: Location | ||
identity: { | ||
type: 'UserAssigned' | ||
userAssignedIdentities: { | ||
'${UserAssignedMiId}': {} | ||
} | ||
} | ||
kind: 'functionapp' | ||
properties: { | ||
serverFarmId: HostingPlanId | ||
keyVaultReferenceIdentity: UserAssignedMiId | ||
httpsOnly: true | ||
clientCertEnabled: true | ||
clientCertMode: 'OptionalInteractiveUser' | ||
virtualNetworkSubnetId: EnablePrivateNetworking == true ? FunctionAppSubnetId : (null) | ||
vnetContentShareEnabled: EnablePrivateNetworking == true ? true : false | ||
vnetRouteAllEnabled: EnablePrivateNetworking == true ? true : false | ||
siteConfig: { | ||
appSettings: AppSettings | ||
powerShellVersion: '7.4' | ||
minTlsVersion: '1.2' | ||
ftpsState: 'Disabled' | ||
http20Enabled: true | ||
alwaysOn: true | ||
publicNetworkAccess: 'Enabled' | ||
cors: { | ||
allowedOrigins: [ | ||
'https://portal.azure.com' | ||
] | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource roleAssignmentFa 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (DeployFunctionCode == true) { | ||
name: guid(subscription().id, resourceGroup().id, UserAssignedMiId) | ||
scope: functionApp | ||
properties: { | ||
principalId: UserAssignedMiPrincipalId | ||
roleDefinitionId: RoleIdOwner | ||
principalType: 'ServicePrincipal' | ||
} | ||
} | ||
|
||
output functionAppName string = functionApp.name | ||
output functionAppId string = functionApp.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.