Skip to content
Open
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
51 changes: 20 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ The following steps are required to deploy the infrastructure from the command l

1. Login and set subscription if it is needed

```bash
az login
az account set --subscription xxxxx
```
```bash
az login
az account set --subscription xxxxx
```

1. Obtain App gateway certificate
Azure Application Gateway support for secure TLS using Azure Key Vault and managed identities for Azure resources. This configuration enables end-to-end encryption of the network traffic using standard TLS protocols. For production systems you use a publicly signed certificate backed by a public root certificate authority (CA). Here, we are going to use a self signed certificate for demonstrational purposes.
Expand Down Expand Up @@ -61,29 +61,18 @@ The following steps are required to deploy the infrastructure from the command l

1. Update the infra-as-code/parameters file

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"value": ""
},
"sqlAdministratorLogin": {
"value": ""
},
"sqlAdministratorLoginPassword": {
"value": ""
},
"developmentEnvironment": {
"value": true
},
"appGatewayListenerCertificate": {
"value": "[base64 cert data from $APP_GATEWAY_LISTENER_CERTIFICATE_APPSERV_BASELINE]"
}
}
}
```
```bicep
using './main.bicep'

param location = 'westus3'
param baseName = ''
param sqlAdministratorLogin = ''
param sqlAdministratorLoginPassword = ''
param customDomainName = 'contoso.com'
param appGatewayListenerCertificate = '[base64 cert data from $APP_GATEWAY_LISTENER_CERTIFICATE_APPSERV_BASELINE]'
param developmentEnvironment = true
param publishFileName = 'SimpleWebApp.zip'
```

Note: Take into account that sql database enforce [password complexity](https://learn.microsoft.com/sql/relational-databases/security/password-policy?view=sql-server-ver16#password-complexity)

Expand All @@ -93,18 +82,18 @@ Note: Take into account that sql database enforce [password complexity](https://
- The BASE_NAME contains only lowercase letters and is between 6 and 12 characters. All resources will be named given this basename.
- You choose a valid resource group name

```bash
```bash
LOCATION=westus3
BASE_NAME=<base-resource-name (between 3 and 6 characters)>
BASE_NAME=<base-resource-name (between 6 and 12 characters)>

RESOURCE_GROUP=<resource-group-name>
az group create --location $LOCATION --resource-group $RESOURCE_GROUP

az deployment group create --template-file ./infra-as-code/bicep/main.bicep \
--resource-group $RESOURCE_GROUP \
--parameters @./infra-as-code/bicep/parameters.json \
--parameters ./infra-as-code/bicep/main.bicepparam \
--parameters baseName=$BASE_NAME
```
```

### Publish the web app

Expand Down
11 changes: 11 additions & 0 deletions infra-as-code/bicep/main.bicepparam
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using './main.bicep'

param baseName = ''
param sqlAdministratorLogin = ''
param sqlAdministratorLoginPassword = ''
param location = 'westus3'
param customDomainName = 'contoso.com'
param appGatewayListenerCertificate = ''
param developmentEnvironment = false
param publishFileName = 'SimpleWebApp.zip'

21 changes: 0 additions & 21 deletions infra-as-code/bicep/parameters.json

This file was deleted.

2 changes: 2 additions & 0 deletions infra-as-code/bicep/storage.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*/

@description('This is the base name for each Azure resource name (6-12 chars)')
@minLength(6)
@maxLength(12)
param baseName string

@description('The resource group location')
Expand Down