Azure Storage Account Terraform Module
Terraform Module to create an Azure storage account with a set of containers, set of file shares (and quota), tables, and queues.
Resources
Example Usage
module "storage" {
source = "app.terraform.io/Seagen/storage/azurerm"
version = "x.x.x"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
storage_account_name = "mystorage"
containers = ["container01", "container02", "container03"]
file_shares = [
{ name = "smbfileshare1", quota = 150 },
{ name = "smbfileshare2", quota = 250 }
]
tables = ["table1", "table2"]
queues = ["queue1", "queue2"]
tags = local.tags
}
Storage Account
An Azure storage account contains all of your Azure Storage data objects: blobs, file shares, queues, tables, and disks. The storage account provides a unique namespace for your Azure Storage data that’s accessible from anywhere in the world over HTTP or HTTPS. Data in your storage account is durable and highly available, secure, and massively scalable.
This module creates the storage account based on your input.
The following settings are hard-coded:
Argument |
Setting |
---|---|
|
StorageV2 |
|
Standard |
|
true |
|
TLS1_2 |
|
false |
Containers
A container organizes a set of blobs, similar to a directory in a file system. A storage account can include an unlimited number of containers, and a container can store an unlimited number of blobs. The container name must be lowercase.
This module creates the containers based on your input within an Azure Storage Account.
The following settings are hard-coded:
Argument |
Setting |
---|---|
|
private |
Inputs
Name |
Description |
Type |
Default |
---|---|---|---|
|
The name of the resource group in which resources are created |
string |
|
|
The location of the resource group in which resources are created |
string |
|
|
Defines the access tier for StorageV2 accounts. Valid options are Hot and Cool. |
string |
|
|
Specifies the number of days that the blob should be retained, between |
number |
|
|
Specifies the number of days that the blob should be retained, between |
number |
|
|
Is versioning enabled? |
string |
|
|
Is the last access time based tracking enabled? |
string |
|
|
Is the blob service properties for change feed events enabled? |
string |
|
|
List of containers |
list |
|
|
List of SMB file shares |
list |
|
|
List of storages queues |
list |
|
|
List of storage tables |
list |
|
|
A map of tags to add to all resources |
map |
|
Container
objects
Name |
Description |
Type |
Default |
---|---|---|---|
|
Name of the container |
string |
|
Outputs
Name |
Description |
---|---|
|
The ID of the storage account |
|
The name of the storage account |
|
The primary connection string for the storage account |
|
The primary access key for the storage account |
|
The secondary access key for the storage account |
|
The list of containers |
|
The list of SMB file shares |
|
The list of storage tables |
|
The list of storage queues |