Skip to content

Commit 7d87456

Browse files
committed
Cleanup bicep
1 parent 3f1a721 commit 7d87456

File tree

2 files changed

+53
-8
lines changed

2 files changed

+53
-8
lines changed

az-deploy-test.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# === Defaults (edit these for local testing) ===
5+
RESOURCE_GROUP="rg-quickscan"
6+
TEMPLATE_FILE="infra/main.bicep"
7+
WEBAPP_NAME="devopsquickscan"
8+
DOCKERHUB_USERNAME="[email protected]"
9+
DOCKERHUB_TOKEN="F3EzzY8w9LGvc9"
10+
DOMAIN_NAME="quickscan.duijzer.com"
11+
12+
# === Allow overriding via command-line args ===
13+
# Usage: ./test-deploy.sh <resourceGroup> <webAppName> <dockerUser> <dockerToken> <domain>
14+
if [ $# -ge 1 ]; then RESOURCE_GROUP="$1"; fi
15+
if [ $# -ge 2 ]; then WEBAPP_NAME="$2"; fi
16+
if [ $# -ge 3 ]; then DOCKERHUB_USERNAME="$3"; fi
17+
if [ $# -ge 4 ]; then DOCKERHUB_TOKEN="$4"; fi
18+
if [ $# -ge 5 ]; then DOMAIN_NAME="$5"; fi
19+
20+
echo
21+
echo "======================================================"
22+
echo " Azure Bicep Test Deployment (Resource Group scope)"
23+
echo "======================================================"
24+
echo " Resource Group : $RESOURCE_GROUP"
25+
echo " Template File : $TEMPLATE_FILE"
26+
echo " WebApp Name : $WEBAPP_NAME"
27+
echo " DockerHub User : $DOCKERHUB_USERNAME"
28+
echo " Domain Name : $DOMAIN_NAME"
29+
echo
30+
31+
# === Run what-if ===
32+
#az deployment group what-if \
33+
# --resource-group "$RESOURCE_GROUP" \
34+
# --template-file "$TEMPLATE_FILE" \
35+
# --parameters \
36+
# webAppName="$WEBAPP_NAME" \
37+
# dockerHubPassword="$DOCKERHUB_TOKEN" \
38+
# dockerHubUsername="$DOCKERHUB_USERNAME" \
39+
# customDomainName="$DOMAIN_NAME" \
40+
# --query "{storageAccountName:properties.outputs.storageAccountName.value, storageAccountKey:properties.outputs.storageAccountKey.value}"
41+
42+
43+
# === Run deployment ===
44+
az deployment group create \
45+
--resource-group "$RESOURCE_GROUP" \
46+
--template-file "$TEMPLATE_FILE" \
47+
--parameters \
48+
webAppName="$WEBAPP_NAME" \
49+
dockerHubPassword="$DOCKERHUB_TOKEN" \
50+
dockerHubUsername="$DOCKERHUB_USERNAME" \
51+
customDomainName="$DOMAIN_NAME" \
52+
--query "{storageAccountName:properties.outputs.storageAccountName.value, storageAccountKey:properties.outputs.storageAccountKey.value}" \
53+
# --debug

infra/main.bicep

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,4 @@ resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
100100
}
101101
}
102102

103-
resource azureMailServices 'Microsoft.Communication/emailServices@2025-05-01' = {
104-
name: 'acs-${webAppName}'
105-
location: location
106-
properties: {
107-
dataLocation: 'string'
108-
}
109-
}
110-
111103
output webAppUrl string = 'https://${webAppName}.azurewebsites.net/'

0 commit comments

Comments
 (0)