diff --git a/README.md b/README.md
index 2893b1a..d361814 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,7 @@ No modules.
| [environment](#input\_environment) | The environment to create the resources for. | `string` | n/a | yes |
| [file\_contributors](#input\_file\_contributors) | The IDs of the Azure AD objects that should have Contributor access to this File Storage. | `list(string)` | `[]` | no |
| [file\_readers](#input\_file\_readers) | The IDs of the Azure AD objects that should have Reader access to this File Storage. | `list(string)` | `[]` | no |
+| [file\_retention\_policy](#input\_file\_retention\_policy) | The number of days that files should be retained. | `number` | `30` | no |
| [location](#input\_location) | The supported Azure location where the resources exist. | `string` | n/a | yes |
| [network\_ip\_rules](#input\_network\_ip\_rules) | The public IPs or IP ranges in CIDR format that should be able to access this Storage Account. Only IPv4 addresses are allowed. | `list(string)` | `[]` | no |
| [queue\_contributors](#input\_queue\_contributors) | The IDs of the Azure AD objects that should have Contributor access to this Queue Storage. | `list(string)` | `[]` | no |
diff --git a/main.tf b/main.tf
index 8180dba..60a0fbf 100644
--- a/main.tf
+++ b/main.tf
@@ -33,6 +33,12 @@ resource "azurerm_storage_account" "this" {
}
}
+ share_properties {
+ retention_policy {
+ days = var.file_retention_policy
+ }
+ }
+
network_rules {
default_action = length(var.network_ip_rules) == 0 ? "Allow" : "Deny"
bypass = ["AzureServices"]
diff --git a/variables.tf b/variables.tf
index 03458b1..5340ad3 100644
--- a/variables.tf
+++ b/variables.tf
@@ -66,6 +66,12 @@ variable "blob_delete_retention_policy" {
default = 30
}
+variable "file_retention_policy" {
+ description = "The number of days that files should be retained."
+ type = number
+ default = 30
+}
+
variable "network_ip_rules" {
description = "The public IPs or IP ranges in CIDR format that should be able to access this Storage Account. Only IPv4 addresses are allowed."
type = list(string)