Skip to content

Latest commit

 

History

History
219 lines (153 loc) · 8.83 KB

File metadata and controls

219 lines (153 loc) · 8.83 KB

Deploy the solution for Azure SQL Database

In this section, you will provision all Azure resources required to complete this PoC.

Deployment options

Deployment language
ARM azure resource manager
Bicep bicep
Terraform terraform

Deployment diagram

resource-visualizer

Azure Resource Manager

Deploy to Azure

The ARM template (template-latest.json) is used to provision Azure resources in a resource group.

Right-click or Ctrl + click the button below to open the Azure Portal in a new window. This will redirect you to the Custom Deployment wizard in the Azure Portal.

Select the Azure subscription and the resource group that you would like to use for this PoC.

Bicep

The Bicep template (template-latest.bicep) is used to provision Azure resources in a resource group.

Learn more about bicep.

Prerequisites

How to deploy it

  1. Run the following to log in from your client using your default web browser

    az login
    

    If you have more than one subscription, you can select a particular subscription.

    az account set --subscription <subscription-id>
    
  2. Find a location you want to deploy the resource group

    az account list-locations -o table
    
  3. Create a resource group

    az group create --location "<location>" --name "<resource group name>"
    

    The following example deploys a resource group in North Europe

    az group create --location "northeurope" --name "one-click-poc"
    
  4. Deploy a bicep template

    az deployment group create --resource-group "<resource group name>" --template-file C:\temp\bicep\template-latest.bicep
    
    

    The following example deploys a bicep template

    az deployment group create --resource-group "one-click-poc" --template-file C:\temp\bicep\template-latest.bicep
    

Terraform

The Terraform template (terraform/template-latest.tf) is used to provision Azure resources in a resource group.

Learn more about Terraform.

Prerequisites

  1. Run the following to log in from your client using your default web browser

    az login
    

    If you have more than one subscription, you can select a particular subscription.

    az account set --subscription <subscription-id>
    
  2. Find a location you want to deploy the resource group

    az account list-locations -o table
    
  3. Move to the folder AzureSQLDB/deploy/terraform

    cd AzureSQLDB/deploy/terraform
    
  4. Open the file terraform.tfvars and provide values for the variables resource_group_name and resource_group_location

    e.g:

    resource_group_name = "one-click-poc"
    resource_group_location = "westeurope"
    
  5. Initialize a working directory for the terraform configuration

    terraform init
    
  6. Deploy the terraform template

    terraform apply -auto-approve
    

    A message asking for input of a value for the variable suffix will be displayed

    var.suffix
        Enter a value: 
    

    Insert a value and press Enter.

Azure Resources

The template provisions the following resources in the Azure subscription

  • Azure Resource Group
  • Azure logical SQL server
  • Azure SQL Database
  • Azure Private Link for Azure SQL Database
  • Private DNS zone
  • Azure SQL VM
  • Network interface for Azure SQL VM
  • VNet for Azure SQL VM
  • Public IP for Azure SQL VM
  • NSG for Azure SQL VM
  • JumpBox VM
  • Network interface for JumpBox VM
  • VNet for JumpBox VM
  • NSG for JumpBox VM
  • Public IP for JumpBox VM
  • Virtual network peering

Important

Please note that it takes 30 to 40 min approximately to provision all these resources in an Azure subscription.

Some of the Azure services provisioned require a globally unique name and a “suffix” has been added to their names to ensure uniqueness.

Azure Service Name Pricing Tier How to
Resource Group one-click-PoC Create a Resource Group
SQL Server on Azure VM sqlvm-001 Standard_D8s_v3 Provision SQL Server on Azure VM
Azure SQL Database sqldb-suffix Basic Create an Azure SQL Database
Azure VM jb-migration Standard_B4ms Create a Windows virtual machine

Credential

Admin User Name Password
SQL VM sqladmin My$upp3r$ecret
Azure SQL Database sqladmin My$upp3r$ecret
JumpBox VM sqladmin My$upp3r$ecret

Page Navigator