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
+22-13Lines changed: 22 additions & 13 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
34
34
# proivde a name to use an existing resource group, specify the existing resource group name,
@@ -75,7 +75,8 @@ module "storage" {
75
75
76
76
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
@@ -105,11 +106,16 @@ Azure Files offers fully managed file shares in the cloud that are accessible vi
105
106
106
107
This module creates the SMB file shares based on your input within an Azure Storage Account. Configure the `quota` for this file share as per your preference. The maximum size of the share, in gigabytes. For Standard storage accounts, this must be greater than `0` and less than `5120` GB (5 TB). For Premium FileStorage storage accounts, this must be greater than `100` GB and less than `102400` GB (100 TB).
107
108
108
-
## Soft delete for Blob storage
109
+
## Soft delete for Blobs or Containers
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
@@ -120,7 +126,7 @@ The default action set to `Allow` when no network rules matched. A `subnet_ids`
120
126
```hcl
121
127
module "storage" {
122
128
source = "kumarvna/storage/azurerm"
123
-
version = "2.3.0"
129
+
version = "2.4.0"
124
130
125
131
# .... omitted
126
132
@@ -153,7 +159,7 @@ This module supports the implementation of storage lifecycle management. If spec
153
159
```hcl
154
160
module "storage" {
155
161
source = "kumarvna/storage/azurerm"
156
-
version = "2.3.0"
162
+
version = "2.4.0"
157
163
158
164
# .... omitted
159
165
@@ -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`
0 commit comments