github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/azurerm/r/container_registry.html.markdown (about)

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_container_registry"
     4  sidebar_current: "docs-azurerm-resource-container-registry"
     5  description: |-
     6    Create as an Azure Container Registry instance.
     7  ---
     8  
     9  # azurerm\_container\_registry
    10  
    11  Create as an Azure Container Registry instance.
    12  
    13  ~> **Note:** All arguments including the access key will be stored in the raw state as plain-text.
    14  [Read more about sensitive data in state](/docs/state/sensitive-data.html).
    15  
    16  ## Example Usage
    17  
    18  ```hcl
    19  resource "azurerm_resource_group" "test" {
    20    name     = "resourceGroup1"
    21    location = "West US"
    22  }
    23  
    24  resource "azurerm_storage_account" "test" {
    25    name                = "storageAccount1"
    26    resource_group_name = "${azurerm_resource_group.test.name}"
    27    location            = "${azurerm_resource_group.test.location}"
    28    account_type        = "Standard_GRS"
    29  }
    30  
    31  resource "azurerm_container_registry" "test" {
    32    name                = "containerRegistry1"
    33    resource_group_name = "${azurerm_resource_group.test.name}"
    34    location            = "${azurerm_resource_group.test.location}"
    35    admin_enabled       = true
    36    sku                 = "Basic"
    37  
    38    storage_account {
    39      name       = "${azurerm_storage_account.test.name}"
    40      access_key = "${azurerm_storage_account.test.primary_access_key}"
    41    }
    42  }
    43  ```
    44  
    45  ## Argument Reference
    46  
    47  The following arguments are supported:
    48  
    49  * `name` - (Required) Specifies the name of the Container Registry. Changing this forces a
    50      new resource to be created.
    51  
    52  * `resource_group_name` - (Required) The name of the resource group in which to
    53      create the Container Registry.
    54  
    55  * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    56  
    57  * `admin_enabled` - (Optional) Specifies whether the admin user is enabled. Defaults to `false`.
    58  
    59  * `storage_account` - (Required) A Storage Account block as documented below - which must be located in the same data center as the Container Registry.
    60  
    61  * `sku` - (Optional) The SKU name of the the container registry. `Basic` is the only acceptable value at this time.
    62  
    63  * `tags` - (Optional) A mapping of tags to assign to the resource.
    64  
    65  `storage_account` supports the following:
    66  
    67  * `name` - (Required) The name of the storage account, which must be in the same physical location as the Container Registry.
    68  * `access_key` - (Required) The access key to the storage account.
    69  
    70  ## Attributes Reference
    71  
    72  The following attributes are exported:
    73  
    74  * `id` - The Container Registry ID.
    75  
    76  * `login_server` - The URL that can be used to log into the container registry.
    77  
    78  * `admin_username` - The Username associated with the Container Registry Admin account - if the admin account is enabled.
    79  
    80  * `admin_password` - The Password associated with the Container Registry Admin account - if the admin account is enabled.
    81  
    82  ## Import
    83  
    84  Container Registries can be imported using the `resource id`, e.g.
    85  
    86  ```
    87  terraform import azurerm_container_registry.test /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/mygroup1/providers/Microsoft.ContainerRegistry/registries/myregistry1
    88  ```