Use this data source to access information about an existing Storage Management Policy.
data "azurerm_storage_account" "example" {
name = "storageaccountname"
resource_group_name = "resourcegroupname"
}
data "azurerm_storage_management_policy" "example" {
storage_account_id = data.azurerm_storage_account.example.id
}
The following arguments are supported:
storage_account_id
- Specifies the id of the storage account to retrieve the management policy for.id
- The ID of the Management Policy.rule
- A rule
block as documented below.rule
supports the following:
name
- A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
enabled
- Boolean to specify whether the rule is enabled.filters
- A filter
block as documented below.actions
- An actions
block as documented below.filters
supports the following:
prefix_match
- An array of strings for prefixes to be matched.blob_types
- An array of predefined values. Valid options are blockBlob
and appendBlob
.match_blob_index_tag
- A match_blob_index_tag
block as defined below. The block defines the blob index tag based filtering for blob objects.actions
supports the following:
base_blob
- A base_blob
block as documented below.snapshot
- A snapshot
block as documented below.version
- A version
block as documented below.base_blob
supports the following:
tier_to_cool_after_days_since_modification_greater_than
- The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier.tier_to_cool_after_days_since_last_access_time_greater_than
- The age in days after last access time to tier blobs to cool storage. Supports blob currently at Hot tier.tier_to_cool_after_days_since_creation_greater_than
- Optional The age in days after creation to cool storage. Supports blob currently at Hot tier.auto_tier_to_hot_from_cool_enabled
- Whether a blob should automatically be tiered from cool back to hot if it's accessed again after being tiered to cool.tier_to_archive_after_days_since_modification_greater_than
- The age in days after last modification to tier blobs to archive storage.tier_to_archive_after_days_since_last_access_time_greater_than
- The age in days after last access time to tier blobs to archive storage.tier_to_archive_after_days_since_creation_greater_than
- The age in days after creation to archive storage.tier_to_archive_after_days_since_last_tier_change_greater_than
- The age in days after last tier change to the blobs to skip to be archved.tier_to_cold_after_days_since_modification_greater_than
- The age in days after last modification to tier blobs to cold storage. Supports blob currently at Hot tier.tier_to_cold_after_days_since_last_access_time_greater_than
- The age in days after last access time to tier blobs to cold storage. Supports blob currently at Hot tier.tier_to_cold_after_days_since_creation_greater_than
- Optional The age in days after creation to cold storage. Supports blob currently at Hot tier.delete_after_days_since_modification_greater_than
- The age in days after last modification to delete the blob.delete_after_days_since_last_access_time_greater_than
- The age in days after last access time to delete the blob.delete_after_days_since_creation_greater_than
- The age in days after creation to delete the blob.snapshot
supports the following:
change_tier_to_archive_after_days_since_creation
- The age in days after creation to tier blob snapshot to archive storage.tier_to_archive_after_days_since_last_tier_change_greater_than
- The age in days after last tier change to the blobs to skip to be archived.change_tier_to_cool_after_days_since_creation
- The age in days after creation to tier blob snapshot to cool storage.tier_to_cold_after_days_since_creation_greater_than
- Optional The age in days after creation to cold storage. Supports blob currently at Hot tier.delete_after_days_since_creation_greater_than
- The age in days after creation to delete the blob snapshot.version
supports the following:
change_tier_to_archive_after_days_since_creation
- The age in days after creation to tier blob version to archive storage.tier_to_archive_after_days_since_last_tier_change_greater_than
- The age in days after last tier change to the blobs to skip to be archived.change_tier_to_cool_after_days_since_creation
- The age in days after creation to tier blob version to cool storage.tier_to_cold_after_days_since_creation_greater_than
- Optional The age in days after creation to cold storage. Supports blob currently at Hot tier.delete_after_days_since_creation
- The age in days after creation to delete the blob version.match_blob_index_tag
supports the following:
name
- The filter tag name used for tag based filtering for blob objects.operation
- The comparison operator which is used for object comparison and filtering. Possible value is ==
. Defaults to ==
.value
- The filter tag value used for tag based filtering for blob objects.The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Storage Management Policy.