forked from chgeuer/spring_boot_aad_kv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0-variables.sh
51 lines (39 loc) · 1.33 KB
/
0-variables.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#
# Which AAD Tenant is the web app living in?
#
export AAD_TENANT_ID="chgeuerfte.onmicrosoft.com"
#
# Which Data Center
#
export location="westeurope"
#
# Name of the Azure resource group
#
export rg_name="spring1"
#
# The prefix is used for naming various resource
#
export prefix="springchgp"
echo "Using Azure AD tenant ${AAD_TENANT_ID}, deploying to resource group ${rg_name} in ${location}"
#
# The Azure AD group which users must be in, to access the web app.
#
export AAD_GROUP="christian"
#
# Various names for resources
#
export sql_server_name="${prefix}sql"
export sql_database="${prefix}db"
export sql_username="${prefix}user"
export acr_name="${prefix}acr"
export aci_name="${prefix}aci"
export keyvault_name="${prefix}kv"
export keyvault_url="https://${keyvault_name}.vault.azure.net/"
export public_web_app_hostname="${aci_name}.${location}.azurecontainer.io"
export TAG=springaad
export acr_build_task_name="build-${TAG}-task"
export sql_password="$(cat .passwords/.${rg_name}-${prefix}-sql_password)"
export service_principal_pass="$(cat .passwords/.${rg_name}-${prefix}-service_principal_pass)"
export service_principal_application_id="$(cat .passwords/.${rg_name}-${prefix}-service_principal_application_id)"
export service_principal_object_id="$(cat .passwords/.${rg_name}-${prefix}-service_principal_object_id)"