Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 4 KB

File metadata and controls

81 lines (62 loc) · 4 KB

Azure Storage Container

A Terraform module for creating Azure storage container resources. .

Prerequisites

To use this module you need the following resources:

Module Features

This module creates a Azure storage container resources and Azure storage account resource if needed.

Getting Started

Most basic usage creating a Azure storage container resource and Azure storage account.

module "container" {
  source                   = "."
  account_id               = azurerm_storage_account.account.id
  account_name             = azurerm_storage_account.account.name
  resource_group_name      = azurerm_resource_group.rg.name
  location                 = azurerm_resource_group.rg.location
  environment              = "development"
  container_name           = "container"
  container_access_type    = "private"
  tags = {
    environment = "Demo"
  }
}

Creating a Azure storage container resource and Azure storage account and also an Azure Storage Account

module "container" {
  source                   = "."
  account_name             = "accountsample"
  account_kind             = "StorageV2"
  account_tier             = "Standard"
  account_replication_type = "GRS"
  resource_group_name      = azurerm_resource_group.rg.name
  location                 = azurerm_resource_group.rg.location
  environment              = "development"
  container_name           = "container"
  container_access_type    = "private"
  tags = {
    environment = "Demo"
  }
}

Module Argument Reference

See variables.tf

Module Attributes Reference

in addition of all arguments above the following attributes are exported by the module:

  • storage_account_id: The id of the created storage account returned by Azure Storage Account id attribute
  • storage_account_name: The name of the created storage account returned by Azure Storage Account name attribute
  • storage_container_id: The id of the created storage container returned by Azure Storage Container id attribute
  • storage_container_name: The name of the created storage account returned by Azure Storage Container name attribute

Samples

You have the samples in samples folder