Skip to content

Commit

Permalink
Update tier3.bicep Adding Defender configuration to Tier 3 (#725)
Browse files Browse the repository at this point in the history
* Update tier3.bicep

* Tier 3 Defender Update

Pulling Defender info from the core mlz.bicep deployment
Updating Tier 3 Readme

* Update Tier3. Removing Duplicate parameters and moving comments up

Fixing error with duplicate parameters. Adding Moving description comments to the parameters that pull from mlzDeploymentVariables

* Adding New Outputs to the Bicep Core Readme Documentation

Adding New Outputs to the Bicep Core Readme Documentation

* Removing parameters from the Tier3 Readme that are not needed because they are inherited

With the inheritance pattern proposed in this PR, this will not be necessary to explicitly state here. The state of just using the same default configuration in the original MLZ deployment will be sufficient with the added changes of documenting the additional two outputs.

Co-authored-by: lisamurphy-msft <[email protected]>
  • Loading branch information
LManning-Dev and lisamurphy-msft authored Sep 1, 2022
1 parent d63fa11 commit 82ec9f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bicep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ spokes.value[0..2].subnetResourceId
spokes.value[0..2].subscriptionId
spokes.value[0..2].virtualNetworkName
spokes.value[0..2].virtualNetworkResourceId
deployDefender.value
emailSecurityContact.value
15 changes: 15 additions & 0 deletions src/bicep/add-ons/tier3/tier3.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ param logAnalyticsWorkspaceResourceId string = mlzDeploymentVariables.logAnalyti
param logAnalyticsWorkspaceName string = mlzDeploymentVariables.logAnalyticsWorkspaceName.Value
param firewallPrivateIPAddress string = mlzDeploymentVariables.firewallPrivateIPAddress.Value

@description('When set to "true", enables Microsoft Defender for Cloud for the subscriptions used in the deployment. It defaults to "false".')
param deployDefender bool = mlzDeploymentVariables.deployDefender.Value
@description('Email address of the contact, in the form of [email protected]')
param emailSecurityContact string = mlzDeploymentVariables.emailSecurityContact.Value


@description('The address prefix for the network spoke vnet.')
param virtualNetworkAddressPrefix string = '10.0.125.0/26'

Expand Down Expand Up @@ -193,6 +199,15 @@ module workloadSubscriptionActivityLogging '../../modules/central-logging.bicep'
]
}

module spokeDefender '../../modules/defender.bicep' = if (deployDefender) {
name: 'set-${workloadName}-sub-defender'
scope: subscription(workloadSubscriptionId)
params: {
logAnalyticsWorkspaceId: logAnalyticsWorkspaceResourceId
emailSecurityContact: emailSecurityContact
}
}

output resourceGroupName string = resourceGroup.outputs.name
output location string = resourceGroup.outputs.location
output tags object = resourceGroup.outputs.tags
Expand Down
4 changes: 4 additions & 0 deletions src/bicep/mlz.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,10 @@ output hub object = {
networkSecurityGroupResourceId: hubNetwork.outputs.networkSecurityGroupResourceId
}

output deployDefender bool = deployDefender

output emailSecurityContact string = emailSecurityContact

output logAnalyticsWorkspaceName string = logAnalyticsWorkspace.outputs.name

output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.outputs.id
Expand Down

0 comments on commit 82ec9f1

Please sign in to comment.