# Create a Resource Group

You don't need a storage account for now therefore let's remove the code for creating the storage account. And modify the `index.ts` looks like that:

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as resources from "@pulumi/azure-native/resources";

// Create an Azure Resource Group
const resourceGroup = new resources.ResourceGroup("resourceGroup", {
    resourceGroupName: "pulumi-aks-rg"
});

export const resourceGroupName = resourceGroup.name;
```

Declaring a resource is just calling a constructor of the corresponding type. You assigned the new resource to the variable `pulumi-aks-rg` to be able to use it for other resources.

{% hint style="info" %}
Note that each resource has two names: a logical one (first constructor argument) and a physical one (name property in the second argument). The logical name is visible in Pulumi console, while the physical name is the actual resource name in Azure. You could omit the name property: then a physical name would be automatically constructed as Logical Name + random suffix.
{% endhint %}

The location of the resource group is set in the configuration setting `azure-native:location` (check the `Pulumi.dev.yaml` file). This is an easy way to set a global location for your program so you don’t have to specify the location for each resource manually.

### Apply changes <a href="#apply-changes" id="apply-changes"></a>

You changed the program—now it’s time to apply the change to the cloud infrastructure. Run `pulumi up` command.

Instead of executing the changes immediately, Pulumi shows you a preview of the changes to happen:

```
$ pulumi up
Previewing update (dev)

     Type                                     Name                     Plan
 +   pulumi:pulumi:Stack                      pulumi-ask-workshop-dev  create
 +   └─ azure-native:resources:ResourceGroup  resourceGroup            create

Outputs:
  + resourceGroupName: output<string>
  
Resources:
    + 2 to create

Do you want to perform this update?  [Use arrows to move, type to filter]
  yes
> no
  details
```

Select `yes` in the command prompt to execute the change:

```
Updating (dev)

     Type                                     Name                     Status
 +   pulumi:pulumi:Stack                      pulumi-ask-workshop-dev  created (6s)
 +   └─ azure-native:resources:ResourceGroup  resourceGroup            created (1s)

Outputs:
  + resourceGroupName: "pulumi-aks-rg"

Resources:
    + 2 created

Duration: 9s
```

Now make sure that your Resource Group was created successfully:

```
$ az group exists -g pulumi-aks-rg
true
```


---

# 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/configure-kubernetes-resources/create-a-resource-group.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.
