Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The diskAccesses resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/diskAccesses resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/diskAccesses@2020-06-30' = {
location: 'string'
name: 'string'
properties: {}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/diskAccesses
| Name | Description | Value |
|---|---|---|
| location | Resource location | string (required) |
| name | The resource name | string (required) |
| properties | DiskAccessProperties | |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
DiskAccessProperties
| Name | Description | Value |
|---|
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Bicep Samples
A basic example of deploying Disk Access.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource diskAccess 'Microsoft.Compute/diskAccesses@2022-03-02' = {
name: resourceName
location: location
tags: {
'cost-center': 'ops'
environment: 'acctest'
}
}
ARM template resource definition
The diskAccesses resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/diskAccesses resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/diskAccesses",
"apiVersion": "2020-06-30",
"name": "string",
"location": "string",
"properties": {
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/diskAccesses
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2020-06-30' |
| location | Resource location | string (required) |
| name | The resource name | string (required) |
| properties | DiskAccessProperties | |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Compute/diskAccesses' |
DiskAccessProperties
| Name | Description | Value |
|---|
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The diskAccesses resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/diskAccesses resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/diskAccesses@2020-06-30"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
}
}
}
Property Values
Microsoft.Compute/diskAccesses
| Name | Description | Value |
|---|---|---|
| location | Resource location | string (required) |
| name | The resource name | string (required) |
| properties | DiskAccessProperties | |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Compute/diskAccesses@2020-06-30" |
DiskAccessProperties
| Name | Description | Value |
|---|
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Disk Access.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "diskAccess" {
type = "Microsoft.Compute/diskAccesses@2022-03-02"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
tags = {
cost-center = "ops"
environment = "acctest"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}