Ensure Storage Accounts adhere to the naming rules

Error: Storage Account name does not follow naming rules
Bridgecrew Policy ID: BC_AZR_STORAGE_3
Checkov Check ID: CKV_AZURE_43
Severity: Low

Storage Account name does not follow naming rules

Description

Azure has the following rules for naming your storage account:

  • Names must be between 3 and 24 characters long
  • Names may contain numbers and lowercase letters only
  • Your storage account name must be unique

This policy ensures that you have not provided an invalid name for your Storage Account.

Fix - Buildtime

Terraform

resource "azurerm_storage_account" "camel_case" {
-  name  = "this-Is-Wrong"
+  name  = "thisisright"
}