storage-account

avinor/storage-account/azurerm

Terraform Module HCL AZURERM

Terraform module to create a storage account and optionally sending events with Event Grid

Install
module "storage-account" {
source = "avinor/storage-account/azurerm"
version = "4.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

Storage account Module to create an Azure storage account with set of containers (and access level). Storage account will enable encryption of file and blob and require https, these options are not possible to change. It is recommended to set the network policies to restrict access to account. To enable advanced threat protection set the variable enable_advanced_threat_protection to true. To disable soft delete set soft_delete_retention to null. Otherwise, set it to the number of retention days, default is 31. Usage To just create a storage account with some containers have a look at the simple example. ``terraform module "simple" { source = "avinor/storage-account/azurerm" version = "3.5.0" name = "simple" resource_group_name = "simple-rg" location = "westeurope" containers = [ { name = "

Inputs (20)
NameTypeDescriptionDefault
locationstringAzure location where resources should be deployed. required
namestringName of storage account. Unless var.exact_name is true any illegal characters (, required
resource_group_namestringName of resource group to deploy resources in. required
resource_group_createboolCreate resource group. Defaults to truetrue
account_tierstringDefines the Tier to use for this storage account. Valid options are Standard and"Standard"
enable_advanced_threat_protectionboolBoolean flag which controls if advanced threat protection is enabled.false
containerslist(object({ name List of containers to create in the storage account.[]
role_assignmentslist(object({ principal_idRole assignments for this storage account.[]
eventslist(any)List of event subscriptions. See documentation for format description.[]
account_kindstringDefines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, Fi"StorageV2"
account_replication_typestringDefines the type of replication to use for this storage account. Valid options a"ZRS"
soft_delete_retentionnumberNumber of retention days for soft delete. If set to null it will disable soft de31
diagnosticsobject({ destination = sDiagnostic settings for those resources that support it. See README.md for detainull
exact_nameboolWhen true, var.name is used exactly as passedfalse
access_tierstringDefines the access tier for BlobStorage and StorageV2 accounts. Valid options ar"Hot"
min_tls_versionstringThe minimum supported TLS version for the storage account. Possible values are T"TLS1_2"
cors_rulelist(object({ allowed_origCORS rules for storage account.[]
network_rulesobject({ ip_rules = listNetwork rules restricting access to the storage account.null
tagsmap(string)Tags to apply to all resources created.{}
lifecycleslist(object({ prefix_matchList of lifecycle delete[]
Outputs (2)
name — Name of the storage account created.
id — Id of the storage account created.
Resources (9)
azurerm_advanced_threat_protectionazurerm_eventgrid_event_subscriptionazurerm_monitor_diagnostic_settingazurerm_resource_groupazurerm_role_assignmentazurerm_storage_accountazurerm_storage_containerazurerm_storage_management_policyrandom_string
Details
FrameworkTerraform Module
LanguageHCL
Version4.0.0
Cloud AZURERM
★ Stars25
Forks23
Total downloads13.3k
Inputs20
Outputs2
Resources9
Examples6
LicenseApache-2.0
Namespaceavinor
Updated