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

Remove terraform code and add code for Developer SKU of Bastion #2588

Merged
merged 6 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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