Blob, queue, and file storage module. Wraps iac-azure-modules storageaccount (blob) with native azurerm_storage_queue/azurerm_storage_share resources for queue and file services, plus private endpoints and RBAC via App Registration SP.
Storage queues and file shares (only when requested — each is independently opt-in)
Private endpoints (services subnet): one per service that has resources requested (blob unless explicitly disabled via enable_blob = false; queue/file only when non-empty)
RBAC, granted only for services that are used:
Storage Blob Data Contributor → App Registration SP, deployer_principal_ids, and the identity running Terraform (current_client) (blob)
Storage Queue Data Contributor → App Registration SP (queue)
Storage File Data Privileged Contributor → App Registration SP (file — the only built-in file-share role that authorizes OAuth/AAD REST calls; the SMB Share roles only cover SMB-mounted access)
Storage tables are not supported by this module.azurerm_storage_table always
authenticates with a shared account key regardless of resource addressing or RBAC on the
azurerm provider versions this module targets (>= 4.46, < 5.0; see providers.tf), but this
module disables shared keys (shared_access_key_enabled = false) on every account it creates, unless
storage_secret_keyvault_name is set to publish key1 to Key Vault.
Table support was removed rather than kept dormant behind a flag; it can be reintroduced once
the module is upgraded to azurerm >= 5.0 and the resource can move onto the same Resource
Manager addressing already used for queues and shares.
The App Registration service principal receives the Contributor role for each data-plane service it uses (Blob, Queue, File) to enable data-plane operations (no connection strings, no SAS tokens, no shared keys). At runtime the platform pins DefaultAzureCredential to EnvironmentCredential (AZURE_TOKEN_CREDENTIALS=environmentcredential, AZURE_CLIENT_ID = app registration), so the SP — not the UAMI — is the identity making data-plane calls. The UAMI covers platform concerns only (ACR pull, Key Vault reference resolution). This matches the cosmosdb module, which grants its data-plane role to the SP.
Contributor rather than Owner follows least privilege and matches Aspire's default role assignment for AddAzureStorage (StorageBlobDataContributor); Owner only adds ADLS Gen2 POSIX ACL operations, which Forge apps don't use. Queue Contributor is the standard Azure data-plane role for that service. File Data Privileged Contributor is required (rather than the SMB Share roles) because forge apps access file shares over REST via the Azure SDK, not by mounting the share over SMB.
Storage queues are a low-cost, high-throughput option for app-internal messaging without the
operational overhead of a Service Bus namespace, at the cost of no native ordering or
dead-lettering. See the per-service guides for provisioning steps and SDK usage:
Queue Storage
and File Share Storage.
Map of identity keys to principal IDs granted Blob Data Contributor for CI/CD deployments. The key current_client is reserved for the identity running Terraform and cannot be used.
Explicitly enable/disable blob provisioning (RBAC, private endpoint, app setting). Defaults to true when null; set to false to opt out for queue/file-only accounts.
Identity bundle from the identity module. Required when enable_static_website is false (blob access via the App Registration SP), or whenever queues or file_shares are non-empty (queue/file data-plane RBAC is also SP-backed).
Create private endpoints for blob access and for any requested queue/file services. Disable for static websites where FD Private Link provides connectivity.
Name of an existing Azure RBAC Key Vault in the shared services subscription. When set, shared key access is enabled on the account and key1 is stored there as a secret. Empty (default) keeps data-plane access OAuth-only. Requires the azurerm.shared-services provider, and the principal running Terraform must already hold Key Vault Secrets Officer on the vault.