# Setup Environment

### **Azure Subscription**

You will need an active Azure subscription to deploy the application components. The total cost of all resources you will create should be very close to $0. You can use your developer subscription, or create a free Azure subscription [here](https://azure.microsoft.com/free/).

Be sure to clean up the resources after you complete the workshop, as described in the last step.

### **Azure CLI**

We will use the command-line interface (CLI) tool to log in to an Azure subscription and run some queries. You can install the CLI tool, as [described here](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).

The tool is cross-platform: it should work on Windows, macOS, or Linux (including WSL).

After you complete the installation, open a command prompt and type `az`. You should see the welcome message:

```bash
$ az

     /\
    /  \    _____   _ _  ___ _
   / /\ \  |_  / | | | \'__/ _\
  / ____ \  / /| |_| | | |  __/
 /_/    \_\/___|\__,_|_|  \___|


Welcome to the cool new Azure CLI!

Use `az --version` to display the current version.
```

Now, login to your Azure account by typing `az login` and providing your credentials in the browser window. When this is done, type `az account show`:

```
// Some code
$ az account show
{
  "environmentName": "AzureCloud",
  "id": "12345678-9abc-def0-1234-56789abcdef0",
  "isDefault": true,
  "name": "My Subscription Name",
  "state": "Enabled",
  "tenantId": "eeeeeee-eeee-eeee-eeee-eeeeeeeeeeee",
  "user": {
    "name": "name@example.com",
    "type": "user"
  }
}
```

If you have multiple subscriptions and the wrong one is shown, [change the active subscription](https://docs.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli?view=azure-cli-latest#change-the-active-subscription).

```
# List available subscriptions on the logged in account
az account list

# List available subscriptions for the tenant
az account subscription list

# Set a subscription to be the current active subscription
# Subscription ID is displayed by the previous command
az account set --subscription 0ad021f2-9dde-4cb1-8aa4-d71018aaeec8

```

**Pulumi CLI**

Pulumi provides a CLI tool that drives cloud deployments from the machine where it runs. It is a cross-platform executable that has to be accessible on the system’s `PATH`. You can also follow [this guide](https://www.pulumi.com/docs/get-started/install/) to install the Pulumi CLI.

Run `pulumi version`, and you should get a response back:

```bash
$ pulumi version
v3.130.0
```

**Node.js and TypeScript compiler**

You will write Pulumi programs in TypeScript. They will be executed by Node.js behind the scenes.

It’s quite likely you already have Node installed. If not, navigate to [Download Page](https://nodejs.org/en/download/) and install Node.js with npm.

If you have npm installed, you can install TypeScript globally on your computer with `npm install -g typescript`.

**Text editor**

Any text editor will do, but I recommend one with TypeScript syntax highlighting. The most common choice is Visual Studio Code.


---

# 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://hahoangv.gitbook.io/azure-kubernetes-service/hands-on-provisioning-and-configuring-an-aks-cluster-on-azure-with-pulumi/setup-environment.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.
