Skip to content

Commit

Permalink
Added Azure Cli to get database connection endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
qtkhajacloud committed Jun 19, 2022
1 parent 6656a13 commit 9b0a775
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion June22/Operations/commandline/activity1-ntier/ntier.azcli
Expand Up @@ -22,4 +22,12 @@ az sql server create --name 'qtclisqlserver' --resource-group 'ntier-cli' --admi

# Create azure sql database

az sql db create --resource-group 'ntier-cli' --name 'qtemployeedb' --server 'qtclisqlserver' --edition 'GeneralPurpose' --family 'Gen5' --compute-model 'Serverless' --capacity 2
az sql db create --resource-group 'ntier-cli' --name 'qtemployeedb' --server 'qtclisqlserver' --edition 'GeneralPurpose' --family 'Gen5' --compute-model 'Serverless' --capacity 2


# Allow specific ip or all ips from firewall

az sql server firewall-rule create --resource-group 'ntier-cli' --server 'qtclisqlserver' --name 'allowall' --start-ip-address '0.0.0.0' --end-ip-address '255.255.255.255'

# Database connection
az sql server list --query "[?resourceGroup=='ntier-cli'].fullyQualifiedDomainName | [0]" --output tsv

0 comments on commit 9b0a775

Please sign in to comment.