Azure Compute Disk Access
This page shows how to write Terraform and Azure Resource Manager for Compute Disk Access and write them securely.
azurerm_disk_access (Terraform)
The Disk Access in Compute can be configured in Terraform with the resource name azurerm_disk_access
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_disk_access" "example" {
name = var.name
resource_group_name = var.resource
location = var.location
Parameters
-
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
tags
optional - map from string to string -
timeouts
single block
Explanation in Terraform Registry
Manages a Disk Access.
Tips: Best Practices for The Other Azure Compute Resources
In addition to the azurerm_linux_virtual_machine, Azure Compute has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_linux_virtual_machine
Ensure to use SSH authentication for virtual machines
It is better to use SSH authentication for virtual machines instead of password authentication to enforce more secure ways.
azurerm_managed_disk
Ensure to enable the encryption on managed disks
It is better to enable the encryption on managed disks.
azurerm_virtual_machine
Ensure to use SSH authentication for virtual machines
It is better to use SSH authentication for virtual machines instead of password authentication to enforce more secure ways.
Microsoft.Compute/diskAccesses (Azure Resource Manager)
The diskAccesses in Microsoft.Compute can be configured in Azure Resource Manager with the resource name Microsoft.Compute/diskAccesses
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses"
}
},
"200": {
"body": {
"name": "myDiskAccess",
"type": "Microsoft.Compute/diskAccesses",
"location": "West US",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
}
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
"type": "Microsoft.Compute/diskAccesses",
"location": "westus",
"tags": {
"department": "Development",
"project": "PrivateEndpoints"
},
Frequently asked questions
What is Azure Compute Disk Access?
Azure Compute Disk Access is a resource for Compute of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Compute Disk Access?
For Terraform, the VentsislavDinev/en_sample source code example is useful. See the Terraform Example section for further details.
For Azure Resource Manager, the Azure/autorest.az, Azure/autorest.az and changlong-liu/autorest.tests source code examples are useful. See the Azure Resource Manager Example section for further details.