# Create the Azure resources

To create the Azure resources, download the following PowerShell script:

{% @github-files/github-code-block url="<https://github.com/SMSAgentSoftware/AzureTableBackup/blob/main/Deploy-AzureTableBackupSolution.ps1>" %}

{% hint style="warning" %}
To create all the resources required by this solution, either the **Owner** role or the **Contributor** PLUS **User Access Administrator** roles are required in the Azure subscription.
{% endhint %}

### Azure Module requirements

The following Az modules are required to run the script:

* Az.Accounts
* Az.Resources
* Az.Storage
* Az.OperationalInsights
* Az.ApplicationInsights
* Az.Functions
* Az.WebSites

### Set parameters

Set the following parameters at the top of the script:

* **Tenant** (tenant Id)
* **Subscription** (subscription name)
* **Location** (Azure region name)

<figure><img src="/files/OWEutPpiNwdiU1U3kewl" alt=""><figcaption></figcaption></figure>

### Run the script

A successful execution of the script will report all the resources being created. Make note of the **resource group name**. All the resources created will be placed in the same resource group for easy management.

<figure><img src="/files/3IpTNfBC9RTCSZJ2TLhS" alt=""><figcaption></figcaption></figure>

Check the resource group in the Azure portal for the created resources:

<figure><img src="/files/883nRxKXiUH19TxVVEXt" alt=""><figcaption></figcaption></figure>

The following resources are created:

* A storage account
* A log analytics workspace
* A function app
* An app service plan
* An application insights instance

In addition, some role assignments are created to allow the signed-in user to create the configuration table and backup container in the solution's own storage account, and to also allow the system managed identity of the function app to access the container and table.

The Azure function is deployed using [ZIP push deploy](https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push), meaning the function app will then be in read-only mode in the portal as the function will be running from the package.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smsagent.blog/azure-solutions/automated-azure-table-storage-backups/deploy-the-solution/create-the-azure-resources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
