Skip to content

Commit

Permalink
Merge pull request #2588 from sebassem/arcbox_3.0
Browse files Browse the repository at this point in the history
Remove terraform code and add code for Developer SKU of Bastion
  • Loading branch information
janegilring authored Jul 2, 2024
2 parents 9263783 + 766c751 commit 8b85458
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 1,979 deletions.
9 changes: 9 additions & 0 deletions azure_jumpstart_arcbox/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ param githubBranch string = 'arcbox_3.0'
@description('Choice to deploy Bastion to connect to the client VM')
param deployBastion bool = false

@description('Bastion host Sku name. The Developer SKU is currently supported in a limited number of regions: https://learn.microsoft.com/azure/bastion/quickstart-developer-sku')
@allowed([
'Basic'
'Standard'
'Developer'
])
param bastionSku string = 'Basic'

@description('User github account where they have forked https://github.com/microsoft/azure-arc-jumpstart-apps')
param githubUser string = 'microsoft'

Expand Down Expand Up @@ -173,6 +181,7 @@ module mgmtArtifactsAndPolicyDeployment 'mgmt/mgmtArtifacts.bicep' = {
workspaceName: logAnalyticsWorkspaceName
flavor: flavor
deployBastion: deployBastion
bastionSku: bastionSku
location: location
}
}
Expand Down
25 changes: 20 additions & 5 deletions azure_jumpstart_arcbox/bicep/mgmt/mgmtArtifacts.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ param sku string = 'pergb2018'
@description('Choice to deploy Bastion to connect to the client VM')
param deployBastion bool = false

@description('Bastion host Sku name')
@allowed([
'Basic'
'Standard'
'Developer'
])
param bastionSku string = 'Basic'

@description('Name of the Network Security Group')
param networkSecurityGroupName string = 'ArcBox-NSG'

Expand Down Expand Up @@ -77,7 +85,7 @@ var primarySubnet = [
}
}
]
var bastionSubnet = [
var bastionSubnet = bastionSku != 'Developer' ? [
{
name: 'AzureBastionSubnet'
properties: {
Expand All @@ -87,7 +95,7 @@ var bastionSubnet = [
}
}
}
]
] : []
var dataOpsSubnets = [
{
name: aksSubnetName
Expand Down Expand Up @@ -458,11 +466,17 @@ resource publicIpAddress 'Microsoft.Network/publicIPAddresses@2022-01-01' = if (
}
}

resource bastionHost 'Microsoft.Network/bastionHosts@2022-01-01' = if (deployBastion == true) {
resource bastionHost 'Microsoft.Network/bastionHosts@2023-11-01' = if (deployBastion == true) {
name: bastionName
location: location
sku: {
name: bastionSku
}
properties: {
ipConfigurations: [
virtualNetwork: bastionSku == 'Developer' ? {
id: arcVirtualNetwork.id
} : null
ipConfigurations: bastionSku != 'Developer' ? [
{
name: 'IpConf'
properties: {
Expand All @@ -474,7 +488,7 @@ resource bastionHost 'Microsoft.Network/bastionHosts@2022-01-01' = if (deployBas
}
}
}
]
] : null
}
}

Expand All @@ -492,6 +506,7 @@ module keyVault 'br/public:avm/res/key-vault/vault:0.5.1' = {
params: {
name: keyVaultName
enablePurgeProtection: false
enableSoftDelete: false
location: location
}
}
Expand Down
Loading

0 comments on commit 8b85458

Please sign in to comment.