Azure/terraform-provider-azapi

Terraform provider for Azure Resource Manager Rest API

Go

244

639 commits

updated Sep 28, 2026

See the code

README

Terraform Provider for Azure Resource Manager Rest API

The AzAPI provider is a very thin layer on top of the Azure ARM REST APIs. Use this new provider to authenticate to and manage Azure resources and functionality using the Azure Resource Manager APIs directly.

This provider complements the AzureRM provider by enabling the management of Azure resources that are not yet or may never be supported in the AzureRM provider such as private/public preview services and features.

Get started with AzAPI

Also, there is a rich library of examples to help you get started.

Usage Example

The following example shows how to use azapi_resource to manage machine learning compute resource.

terraform {
  required_providers {
    azapi = {
      source  = "Azure/azapi"
    }
  }
}

provider "azapi" {
  # More information on the authentication methods supported by
  # the AzAPI Provider can be found here:
  # https://registry.terraform.io/providers/Azure/azapi/latest/docs

  # subscription_id = "..."
  # client_id       = "..."
  # client_secret   = "..."
  # tenant_id       = "..."
}

// azurerm provider
provider "azurerm" {
  features {}
}

// create a resource group, it's recommended to use azapi provider with azurerm provider
resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

// create a automation account
resource "azapi_resource" "automationAccount" {
  type      = "Microsoft.Automation/automationAccounts@2021-06-22"
  name      = "myAccount"
  parent_id = azurerm_resource_group.example.id

  location = azurerm_resource_group.example.location
  body = {
    properties = {
      disableLocalAuth    = true
      publicNetworkAccess = false
      sku = {
        name = "Basic"
      }
    }
  }
}

Further usage documentation is available on the Terraform website.

Contributing

Please see CONTRIBUTING.md for details on how to contribute to this project.

Credits

We wish to thank HashiCorp for the use of some MPLv2-licensed code from their open source project terraform-provider-azurerm.

azure
azure-resource-manager
terraform
terraform-provider

Significant stargazers

Olav Rønnestad Birkeland

30 followers · starred May 2025

Dariusz Porowski

138 followers · starred Jul 2024

Azure/terraform-provider-azapi

Terraform provider for Azure Resource Manager Rest API

Go

244

639 commits

updated Sep 28, 2026

See the code

README

Terraform Provider for Azure Resource Manager Rest API

The AzAPI provider is a very thin layer on top of the Azure ARM REST APIs. Use this new provider to authenticate to and manage Azure resources and functionality using the Azure Resource Manager APIs directly.

This provider complements the AzureRM provider by enabling the management of Azure resources that are not yet or may never be supported in the AzureRM provider such as private/public preview services and features.

Get started with AzAPI

Also, there is a rich library of examples to help you get started.

Usage Example

The following example shows how to use azapi_resource to manage machine learning compute resource.

terraform {
  required_providers {
    azapi = {
      source  = "Azure/azapi"
    }
  }
}

provider "azapi" {
  # More information on the authentication methods supported by
  # the AzAPI Provider can be found here:
  # https://registry.terraform.io/providers/Azure/azapi/latest/docs

  # subscription_id = "..."
  # client_id       = "..."
  # client_secret   = "..."
  # tenant_id       = "..."
}

// azurerm provider
provider "azurerm" {
  features {}
}

// create a resource group, it's recommended to use azapi provider with azurerm provider
resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

// create a automation account
resource "azapi_resource" "automationAccount" {
  type      = "Microsoft.Automation/automationAccounts@2021-06-22"
  name      = "myAccount"
  parent_id = azurerm_resource_group.example.id

  location = azurerm_resource_group.example.location
  body = {
    properties = {
      disableLocalAuth    = true
      publicNetworkAccess = false
      sku = {
        name = "Basic"
      }
    }
  }
}

Further usage documentation is available on the Terraform website.

Contributing

Please see CONTRIBUTING.md for details on how to contribute to this project.

Credits

We wish to thank HashiCorp for the use of some MPLv2-licensed code from their open source project terraform-provider-azurerm.

azure
azure-resource-manager
terraform
terraform-provider

Significant stargazers

Olav Rønnestad Birkeland

30 followers · starred May 2025

Dariusz Porowski

138 followers · starred Jul 2024

Languages

Go

97.4%

HCL

1.3%