2015-12-09 02:25:05 +01:00
|
|
|
---
|
|
|
|
layout: "azurerm"
|
|
|
|
page_title: "Azure Resource Manager: azurerm_resource_group"
|
|
|
|
sidebar_current: "docs-azurerm-resource-resource-group"
|
|
|
|
description: |-
|
|
|
|
Creates a new resource group on Azure.
|
|
|
|
---
|
|
|
|
|
|
|
|
# azurerm\_resource\_group
|
|
|
|
|
|
|
|
Creates a new resource group on Azure.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "azurerm_resource_group" "test" {
|
|
|
|
name = "testResourceGroup1"
|
|
|
|
location = "West US"
|
2016-01-18 19:35:41 +01:00
|
|
|
|
|
|
|
tags {
|
|
|
|
environment = "Production"
|
|
|
|
}
|
2015-12-09 02:25:05 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the resource group. Must be unique on your
|
|
|
|
Azure subscription.
|
|
|
|
|
|
|
|
* `location` - (Required) The location where the resource group should be created.
|
|
|
|
For a list of all Azure locations, please consult [this link](http://azure.microsoft.com/en-us/regions/).
|
2016-01-18 19:35:41 +01:00
|
|
|
|
|
|
|
* `tags` - (Optional) A mapping of tags to assign to the resource.
|
2015-12-09 02:25:05 +01:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The resource group ID.
|
2016-07-19 18:22:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
Resource Groups can be imported using the `resource id`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
terraform import azurerm_resource_group.mygroup /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup
|
|
|
|
```
|