Skip to content

Commit

Permalink
Added worker subnet sql firewall rules and condition for SonarCloud p…
Browse files Browse the repository at this point in the history
…ublish task (#2254)
  • Loading branch information
CloudPlatformer authored Feb 9, 2022
1 parent 5557a52 commit 2610297
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ steps:

- task: SonarCloudPublish@1
displayName: 'Publish results on build summary'
condition: and(succeeded(), or(in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/main'), eq(variables['Build.Reason'], 'PullRequest')))
inputs:
pollingTimeoutSec: '300'

Expand Down
28 changes: 26 additions & 2 deletions azure/accounts.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
"defaultValue": [
]
},
"sharedSQLServerName": {
"type": "string"
},
"sharedEnvVirtualNetworkName": {
"type": "string"
},
Expand Down Expand Up @@ -358,7 +361,7 @@
},
{
"apiVersion": "2020-06-01",
"name": "worker-subnet",
"name": "eas-accounts-worker-subnet",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"properties": {
Expand Down Expand Up @@ -386,6 +389,27 @@
}
}
},
{
"apiVersion": "2021-04-01",
"name": "eas-accounts-worker-sql-firewall-rule",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'), 'sql-server-firewall-rules.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serverName": {
"value": "[parameters('sharedSQLServerName')]"
},
"subnetResourceIdList": {
"value": "[createArray(reference('eas-accounts-worker-subnet').outputs.SubnetResourceId.value)]"
}
}
}
},
{
"apiVersion": "2020-06-01",
"name": "WorkerAppServicePlan",
Expand Down Expand Up @@ -435,7 +459,7 @@
"value": "[variables('resourceGroupName')]"
},
"subnetResourceId": {
"value": "[reference('worker-subnet').outputs.SubnetResourceId.value]"
"value": "[reference('eas-accounts-worker-subnet').outputs.SubnetResourceId.value]"
},
"appServiceAppSettings": {
"value": {
Expand Down
28 changes: 26 additions & 2 deletions azure/finance.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"type": "array",
"defaultValue": []
},
"sharedSQLServerName": {
"type": "string"
},
"sharedEnvVirtualNetworkName": {
"type": "string"
},
Expand Down Expand Up @@ -383,7 +386,7 @@
},
{
"apiVersion": "2020-06-01",
"name": "worker-subnet",
"name": "eas-finance-worker-subnet",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"properties": {
Expand Down Expand Up @@ -411,6 +414,27 @@
}
}
},
{
"apiVersion": "2021-04-01",
"name": "eas-finance-worker-sql-firewall-rule",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'), 'sql-server-firewall-rules.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serverName": {
"value": "[parameters('sharedSQLServerName')]"
},
"subnetResourceIdList": {
"value": "[createArray(reference('eas-finance-worker-subnet').outputs.SubnetResourceId.value)]"
}
}
}
},
{
"apiVersion": "2020-06-01",
"name": "WorkerAppServicePlan",
Expand Down Expand Up @@ -460,7 +484,7 @@
"value": "[variables('resourceGroupName')]"
},
"subnetResourceId": {
"value": "[reference('worker-subnet').outputs.SubnetResourceId.value]"
"value": "[reference('eas-finance-worker-subnet').outputs.SubnetResourceId.value]"
},
"appServiceAppSettings": {
"value": {
Expand Down

0 comments on commit 2610297

Please sign in to comment.