You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ Terraform Module to create an Azure storage account with a set of containers (an
4
4
5
5
To defines the kind of account, set the argument to `account_kind = "StorageV2"`. Account kind defaults to `StorageV2`. If you want to change this value to other storage accounts kind, then this module automatically computes the appropriate values for `account_tier`, `account_replication_type`. The valid options are `BlobStorage`, `BlockBlobStorage`, `FileStorage`, `Storage` and `StorageV2`. `static_website` can only be set when the account_kind is set to `StorageV2`.
6
6
7
-
> **[NOTE]**
7
+
> **[!NOTE]**
8
8
> **This module now supports the meta arguments including `providers`, `depends_on`, `count`, and `for_each`.**
By default, this module will not create a resource group and the name of an existing resource group to be given in an argument `resource_group_name`. If you want to create a new resource group, set the argument `create_resource_group = true`.
77
77
78
-
*If you are using an existing resource group, then this module uses the same resource group location to create all resources in this module.*
78
+
> [!NOTE]
79
+
> *If you are using an existing resource group, then this module uses the same resource group location to create all resources in this module.*
79
80
80
81
## BlockBlobStorage accounts
81
82
@@ -107,9 +108,14 @@ This module creates the SMB file shares based on your input within an Azure Stor
107
108
108
109
## Soft delete for Blob storage
109
110
110
-
Soft delete protects blob data from being accidentally or erroneously modified or deleted. When soft delete is enabled for a storage account, blobs, blob versions (preview), and snapshots in that storage account may be recovered after they are deleted, within a retention period that you specify.
111
+
Soft delete protects blob data from being accidentally or erroneously modified or deleted. When soft delete is enabled for a storage account, containers, blobs, blob versions, and snapshots in that storage account may be recovered after they are deleted, within a retention period that you specify.
111
112
112
-
This module allows you to specify the number of days that the blob should be retained period using `soft_delete_retention` argument between 1 and 365 days.
113
+
This module allows you to specify the number of days that the blob or container should be retained period using `blob_soft_delete_retention_days` and `container_soft_delete_retention_days` arguments between 1 and 365 days. Default is `7` days.
114
+
115
+
> [!WARNING]
116
+
> Container soft delete can restore only whole containers and their contents at the time of deletion. You cannot restore a deleted blob within a container by using container soft delete. Microsoft recommends also enabling blob soft delete and blob versioning to protect individual blobs in a container.
117
+
>
118
+
> When you restore a container, you must restore it to its original name. If the original name has been used to create a new container, then you will not be able to restore the soft-deleted container.
113
119
114
120
## Configure Azure Storage firewalls and virtual networks
115
121
@@ -185,8 +191,8 @@ module "storage" {
185
191
Applying tags to your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. For example, you can apply the name `Environment` and the value `Production` to all the resources in production.
186
192
For recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.
187
193
188
-
>**Important** :
189
-
Tag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**
194
+
>[!IMPORTANT]
195
+
> Tag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**
190
196
191
197
An effective naming convention assembles resource names by using important resource information as parts of a resource's name. For example, using these [recommended naming conventions](https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging#example-names), a public IP resource for a production SharePoint workload is named like this: `pip-sharepoint-prod-westus-001`.
192
198
@@ -215,8 +221,11 @@ Name | Description | Type | Default
215
221
`skuname`|The SKUs supported by Microsoft Azure Storage. Valid options are Premium_LRS, Premium_ZRS, Standard_GRS, Standard_GZRS, Standard_LRS, Standard_RAGRS, Standard_RAGZRS, Standard_ZRS|string|`Standard_RAGRS`
216
222
`access_tier`|Defines the access tier for BlobStorage and StorageV2 accounts. Valid options are Hot and Cool.|string|`"Hot"`
217
223
`min_tls_version`|The minimum supported TLS version for the storage account. Possible values are `TLS1_0`, `TLS1_1`, and `TLS1_2` |string|`"TLS1_2"`
218
-
`assign_identity`|Set to `true` to enable system-assigned managed identity, or `false` to disable it.|string|`true`
219
-
`soft_delete_retention`|Number of retention days for soft delete. If set to null it will disable soft delete all together.|number|`30`
224
+
`blob_soft_delete_retention_days`|Specifies the number of days that the blob should be retained, between `1` and `365` days.|number|`7`
225
+
`container_soft_delete_retention_days`|Specifies the number of days that the blob should be retained, between `1` and `365` days.|number|`7`
Copy file name to clipboardExpand all lines: variables.tf
+26-6Lines changed: 26 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -38,14 +38,29 @@ variable "min_tls_version" {
38
38
default="TLS1_2"
39
39
}
40
40
41
-
variable"assign_identity" {
42
-
description="Set to `true` to enable system-assigned managed identity, or `false` to disable it."
43
-
default=true
41
+
variable"blob_soft_delete_retention_days" {
42
+
description="Specifies the number of days that the blob should be retained, between `1` and `365` days. Defaults to `7`"
43
+
default=7
44
44
}
45
45
46
-
variable"soft_delete_retention" {
47
-
description="Number of retention days for soft delete. If set to null it will disable soft delete all together."
48
-
default=30
46
+
variable"container_soft_delete_retention_days" {
47
+
description="Specifies the number of days that the blob should be retained, between `1` and `365` days. Defaults to `7`"
48
+
default=7
49
+
}
50
+
51
+
variable"enable_versioning" {
52
+
description="Is versioning enabled? Default to `false`"
53
+
default=false
54
+
}
55
+
56
+
variable"last_access_time_enabled" {
57
+
description="Is the last access time based tracking enabled? Default to `false`"
58
+
default=false
59
+
}
60
+
61
+
variable"change_feed_enabled" {
62
+
description="Is the blob service properties for change feed events enabled?"
63
+
default=false
49
64
}
50
65
51
66
variable"enable_advanced_threat_protection" {
@@ -88,6 +103,11 @@ variable "lifecycles" {
88
103
default=[]
89
104
}
90
105
106
+
variable"identity_ids" {
107
+
description="Specifies a list of user managed identity ids to be assigned. This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`"
108
+
default=null
109
+
}
110
+
91
111
variable"tags" {
92
112
description="A map of tags to add to all resources"
0 commit comments