Share via


Microsoft.Compute diskAccesses 2020-09-30

Bicep resource definition

The diskAccesses resource type can be deployed with operations that target:

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-09-30' = {
  scope: resourceSymbolicName or scope
  ___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
scope Use when creating a resource at a scope that is different than the deployment scope. Set this property to the symbolic name of a resource to apply the extension resource.
tags Resource tags Dictionary of tag names and values. See Tags in templates

DiskAccessProperties

Name Description Value

ResourceTags

Name Description Value

ARM template resource definition

The diskAccesses resource type can be deployed with operations that target:

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-09-30",
  "name": "string",
  "___location": "string",
  "properties": {
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

Microsoft.Compute/diskAccesses

Name Description Value
apiVersion The api version '2020-09-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:

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-09-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)
parent_id The ID of the resource to apply this extension resource to. string (required)
properties DiskAccessProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.Compute/diskAccesses@2020-09-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    = ["*"]
}