CloudWiki
Resource

Files

Microsoft Azure
Storage
Azure Files is a cloud-based file storage solution that allows users to create file shares in the cloud, which can be accessed and managed from anywhere using standard SMB (Server Message Block) protocols. It is designed for organizations that need to share files across different operating systems, including Windows, Linux, and macOS. Azure Files offers several benefits, such as high availability, scalability, and accessibility. It provides a fully managed service that eliminates the need to manage and maintain complex file servers, and allows users to easily create and manage file shares with different access levels and permissions. Azure Files also integrates with other Azure services, such as Azure Virtual Machines, Azure Kubernetes Service, and Azure App Service, allowing users to easily mount file shares to their applications and services. It also provides advanced features such as encryption, access control, and auditing, making it a secure and compliant solution for storing and sharing files in the cloud.‍
Terraform Name
terraform
azurerm_storage_share_file
Files
attributes:

The following arguments are supported:

  • name - (Required) The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
  • storage_share_id - (Required) The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
  • path - (Optional) The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to "".
  • source - (Optional) An absolute path to a file on the local system. Changing this forces a new resource to be created.
  • content_type - (Optional) The content type of the share file. Defaults to application/octet-stream.
  • content_md5 - (Optional) The MD5 sum of the file contents. Changing this forces a new resource to be created.
  • content_encoding - (Optional) Specifies which content encodings have been applied to the file.
  • content_disposition - (Optional) Sets the file’s Content-Disposition header.
  • metadata - (Optional) A mapping of metadata to assign to this file.

Associating resources with a
Files
Resources do not "belong" to a
Files
Rather, one or more Security Groups are associated to a resource.
Create
Files
via Terraform:
The following HCL manages a File within an Azure Storage File Share
Syntax:

resource "azurerm_resource_group" "example" {
 name     = "example-resources"
 location = "West Europe"
}

resource "azurerm_storage_account" "example" {
 name                     = "azureteststorage"
 resource_group_name      = azurerm_resource_group.example.name
 location                 = azurerm_resource_group.example.location
 account_tier             = "Standard"
 account_replication_type = "LRS"
}

resource "azurerm_storage_share" "example" {
 name                 = "sharename"
 storage_account_name = azurerm_storage_account.example.name
 quota                = 50
}

resource "azurerm_storage_share_file" "example" {
 name             = "my-awesome-content.zip"
 storage_share_id = azurerm_storage_share.example.id
 source           = "some-local-file.zip"
}

Create
Files
via CLI:
Parametres:

az storage file upload --share-name
                      --source
                      [--account-key]
                      [--account-name]
                      [--auth-mode {key, login}]
                      [--backup-intent]
                      [--connection-string]
                      [--content-cache]
                      [--content-disposition]
                      [--content-encoding]
                      [--content-language]
                      [--content-md5]
                      [--content-type]
                      [--file-endpoint]
                      [--max-connections]
                      [--metadata]
                      [--no-progress]
                      [--path]
                      [--sas-token]
                      [--timeout]
                      [--validate-content]

Example:

az storage file upload -s MyShare --source /path/to/file

aws cost
Costs
Direct Cost
Indirect Cost
No items found.
Best Practices for
Files

Categorized by Availability, Security & Compliance and Cost

Low
Access allowed from VPN
No items found.
Low
Auto Scaling Group not in use
No items found.
Medium
Connections towards DynamoDB should be via VPC endpoints
No items found.
Medium
Container in CrashLoopBackOff state
No items found.
Low
EC2 with GPU capabilities
No items found.
Medium
EC2 with high privileged policies
No items found.
Medium
ECS cluster delete alarm
No items found.
Critical
ECS task with Admin access (*:*)
Medium
ECS task with high privileged policies
No items found.
Critical
EKS cluster delete alarm
No items found.
Medium
ElastiCache cluster delete alarm
No items found.
Medium
Ensure Container liveness probe is configured
No items found.
Medium
Ensure ECS task definition has memory limit
No items found.
Critical
Ensure EMR cluster master nodes are not publicly accessible
No items found.
More from
Microsoft Azure