#AzApi
Bicep vs Terraform for Azure: no state and day-one resources on one side, everything outside Azure on the other. What-if vs plan, deployment stacks, AzureRM v5 and AzAPI: www.oreonit.com/bicep-vs-ter...

#Azure #Terraform
Bicep vs Terraform: which to use for Azure infrastructure in 2026
Bicep is the better Azure-only tool on paper: no state file, new resource types on day one, and Microsoft support. Terraform wins as soon as anything outside Azure is involved. Here is a practical comparison and a simple way to decide.
www.oreonit.com
November 4, 2026 at 3:31 PM
Deploying hosted agents in Foundry Agent Service via Terraform
Deploying hosted agents in Foundry Agent Service via Terraform
Background Your Terraform workflow already manages your Azure infrastructure but deploying hosted agents still requires manual SDK calls or REST API scripts. This post shows you how to bring agent deployments into your existing IaC pipeline using the AzAPI provider, so your entire Foundry stack can be versioned, reviewed, and deployed together. For this post we will focus on leveraging Foundry Hosted Agents. At a high level hosted agents will abstract the overhead of managing your agents compute. Conceptually, think of taking the compute today, that might be in Azure Container Apps (ACA) or Azure Functions and moving it into Foundry. For more information can check out my previous blog on this topic. In this example Foundry runs the agent code on managed compute from a container image. For this specific example we need to use Azure Container Registry to house our code artifact. If wanting to deploy directly from source refer to my previous blog Deploying Foundry Hosted Agents from Source Why an Infrastructure as Code Approach? Hosted agents today in Foundry support SDK and REST API deployments, why should we look at leveraging an IaC provider to handle our agents today? Many organizations subscribe to an IaC strategy for managing their Azure Resources. A hosted agent, at its core, is configuring and allocating infrastructure resources behind Foundry. This would be similar to how we configure plan sizes for products like App Services. Additionally, anything defined by IaC makes it easier to version the configuration in source control and incorporate it into repeatable CI/CD pipelines. Production workflows should also account for remote state, approval controls, and image-version promotion. Another added benefit for anything under IaC is the ability to apply custom policies, Azure or otherwise, over the codebase. Prerequisites An Azure subscription with permission to create resources and role assignments. Access to a region and model deployment with sufficient quota for Foundry Hosted Agents. Azure CLI, Terraform, Git, and Docker installed. Docker must support building linux/amd64 images. Permission to push images to Azure Container Registry and create agents in the Foundry project. The provided sample creates or configures the supporting Azure Container Registry, Foundry account and project, model deployment, managed identity, project connection, and hosted-agent deployment. Hosted agents require a Linux AMD64 (linux/amd64) container image. When building from an ARM-based workstation, including Apple Silicon, explicitly target linux/amd64 and ensure Docker cross-platform emulation is available. See Microsoft’s hosted-agent container requirements. docker build --platform linux/amd64 -t <registry-name>.azurecr.io/<image-name>:<tag> To get started quickly I have a repository w/ all the prerequisites and reviewed code at simple-hosted-agent-deploy-azapi Deploy the Sample To deploy the sample: Clone the repository and reopen it in the included development container. Authenticate to Azure and select the target subscription. Copy and update the example Terraform variable files with your environment-specific values. Run the included deployment script to provision the base resources, build and push the container image, and create the hosted agent. Confirm that the generated agent version reaches an active state before invoking it. Refer to the repository README for the current commands, configuration values, and cleanup steps. Process Overview Let’s level set on what our end-to-end process may look like. In many large organizations, the agent deployment process could be decoupled from the Foundry base architecture. Components such as the Foundry account, project, connections, and model may be controlled by a centralized team. These shared components often follow a different deployment lifecycle from an individual agent. A development team may own the code. We need the code to deploy the hosted agent. Quite the chicken-and-egg problem. So let’s break it down from a day 1 perspective: Deploy Foundry Base Architecture Foundry Account Foundry Project Model Project Connection Application Insights Build and Push code to Azure Container Registry Deploy the hosted agent pointed to the image defined in Azure Container Registry For this example, I assume that Azure Container Registry is managed outside the Foundry lifecycle because many organizations prefer to consolidate container images into a smaller number of shared registries. For illustration purposes, the provided example includes the registry deployment. Day n perspective would potentially look like: Build and Push code to Azure Container Registry Deploy the hosted agent pointed to the image defined in Azure Container Registry Updating the hosted-agent configuration creates a new agent version under the existing logical agent. Foundry manages the version history, while Terraform manages the logical agent configuration represented by the azapi_data_plane_resource. After each deployment, confirm that the new version reaches an active state before directing workloads to it. Technical Details At this time, let’s take a minute and discuss some of the technical details around how the hosted agent is created in Foundry. The Foundry project and its connections are Azure Resource Manager control-plane resources. The logical agent is created through the Foundry project’s data-plane API, while Foundry manages the supporting deployment resources required to host it. This is in contrast to services represented directly as Azure Resource Manager resources, such as App Service (Microsoft.Web/sites) and Azure Container Apps (Microsoft.App/containerApps). Here is a visual that depicts the data plane vs control plane objects: The Foundry project is the agent’s logical parent and provides the data-plane endpoint through which the agent is created. The project itself is deployed as the Azure Resource Manager resource Microsoft.CognitiveServices/accounts/projects Foundry connections can be deployed as Microsoft.CognitiveServices/accounts/projects/connections. In this case, the connection is used for connecting and authenticating to Azure Container Registry. At this point, the project and connection resources can be deployed through AzAPI or Bicep. The next step requires a data-plane call. For Terraform deployments, this operation can be managed declaratively with the AzAPI provider’s azapi_data_plane_resource. Foundry also supports agent deployment through its SDKs and REST API. azapi_data_plane_resource The AzAPI provider’s azapi_data_plane_resource resource is the key component for deploying a hosted agent in Foundry Agent Service through Terraform. Per official MS Learn documentation: Some Azure services expose a separate data plane API—a service-specific HTTPS endpoint where you interact directly with the service rather than through ARM. Examples include the Key Vault secrets API at {vaultName}.vault.azure.net, the Azure AI Search index API at {searchServiceName}.search.windows.net, and the Synapse workspace pipeline API at {workspaceName}.dev.azuresynapse.net. azapi_data_plane_resource bridges this gap by enabling Terraform to manage resources on these data plane endpoints using the same AzAPI provider authentication and lifecycle model. https://learn.microsoft.com/en-us/azure/developer/terraform/concept-azapi-data-plane-framework So how would a terraform implementation for this work? First let’s create the appropriate resource type, name and parent reference, in this case the Foundry Project: resource "azapi_data_plane_resource" "hosted_agent" { type = "Microsoft.Foundry/agents@v1" name = var.agent_name # AzAPI data-plane parents use the endpoint host/path without a URI scheme. parent_id = trimprefix(var.project_endpoint, "https://") …} Now we need to pass in the dedicated parameters as part of the body. To find these parameters refer to the Foundry REST API documentation. body = { name = var.agent_name definition = { kind = "hosted" container_configuration = { image = var.image_uri } cpu = var.cpu memory = var.memory protocol_versions = [ { # The hosted container must implement this Foundry Responses contract. protocol = "responses" version = "2.0.0" } ] environment_variables = merge(var.environment_variables, { AZURE_AI_MODEL_DEPLOYMENT_NAME = var.model_deployment_name }) rai_config = { # Hosted agents require the full policy ARM ID; model deployments use its name. rai_policy_name = var.rai_policy_id } } } For the entire reusable module check out https://github.com/JFolberth/simple-hosted-agent-deploy-azapi/tree/main/simple_agent/azure/infra/modules/hosted_agent Conclusion Hosted Agents in Foundry Agent Service provides a way to run custom agent code on Foundry-managed compute while reducing the operational overhead of managing the underlying hosting infrastructure. By using the AzAPI provider’s azapi_data_plane_resource, teams can incorporate the logical agent deployment into an existing Terraform workflow alongside the Foundry project, model, connections, identity, and container registry resources it depends on. This approach is especially useful when platform and application responsibilities are separated. A platform team can manage the shared Foundry and Azure infrastructure, while application teams independently build, publish, and deploy new versions of their agent container. With the appropriate remote state, access controls, image-versioning strategy, and deployment validation in place, the same pattern can be extended into a repeatable CI/CD workflow for both initial deployment and ongoing agent updates. The linked sample demonstrates this end-to-end pattern, from provisioning the supporting Azure resources and publishing the container image through creating the hosted agent with Terraform. Use it as a starting point, then adapt its state management, access controls, artifact promotion, and validation steps to meet your organization’s production requirements.
techcommunity.microsoft.com
October 2, 2026 at 11:22 AM
Automate Aadhaar data extraction with AZAPI’s Aadhaar OCR API. 🤖 Extract key document details, reduce manual entry, and simplify KYC & identity verification workflows.

🎥 Demo: youtube.com/shorts/CR0DQ...

🔗 azapi.ai/services/ocr...
Passport OCR API-Extract Passport Data Instantly with AI-Powered OCR
YouTube video by azapi ai
youtube.com
August 29, 2026 at 7:46 AM
Automating invoice processing doesn’t have to be complicated. 📄⚡

AZAPI’s Invoice OCR API extracts key invoice data automatically, helping reduce manual entry and speed up document workflows.

🎥 Demo: youtube.com/shorts/yZSS0...

🔗 azapi.ai/services/ocr...

#InvoiceOCR #OCR #AI #Automation
Transform Invoice Processing with AZAPI Invoice OCR API! – Automate Data Entry in Minutes
YouTube video by azapi ai
youtube.com
August 27, 2026 at 9:41 AM
Building smarter document workflows with AI 🚀

Manual document data entry can slow down onboarding, verification, and financial workflows. OCR APIs can help turn documents into structured, usable data with much less manual effort.

#AI #OCR #DocumentAutomation

Link: youtube.com/shorts/jW5C5...
Cheque OCR API: Automate Cheque Data Extraction in Seconds
YouTube video by azapi ai
youtube.com
August 25, 2026 at 10:10 AM
📄 Automate passport data extraction with AI-powered OCR.

Extract key passport details from images and simplify KYC, onboarding, and verification workflows.

🎥 Watch the demo: youtube.com/shorts/CR0DQ...

#PassportOCR #OCR #AI #KYC
Passport OCR API-Extract Passport Data Instantly with AI-Powered OCR
YouTube video by azapi ai
youtube.com
August 24, 2026 at 10:40 AM
Deploying Azure Service Groups with Terraform AzAPI

Microsoft recently unveiled Service Groups in Azure, now available in limited public preview. Today, we are going to look at using the Terraform AzAPI to deploy Service Groups in Azure.

luke.geek.nz/azure/s...
Deploying Azure Service Groups with Terraform AzAPI | luke.geek.nz
Deploy Azure Service Groups with Terraform AzAPI to group resources across subscriptions for improved cloud governance.
luke.geek.nz
July 6, 2025 at 7:06 AM
i should do a blogpost on my Today's Challenges shit
because fuck me i had an annoying architectural problem to suddenly fix

also fuck the azapi terraform provider, it's so fucked when you try to destroy things
March 19, 2026 at 8:06 PM
Migrate your #Terraform configurations from the AzAPI provider to the AzureRM provider ➡️ mattias.engineer/blog/2025/mi...

#azure #mvpbuzz #microsoft #hashicorp
Migrate your Azure Terraform Configuration from AzAPI to AzureRM
I recently browsed through Azure updates and found two features that were recently moved to general availability (GA) that I wanted to try out.
mattias.engineer
August 15, 2025 at 11:54 AM
github.com/Azure/aztfmi... - #Terraform for #Azure has 2 providers: AzAPI and AzureRM. Aztfmigrate switches between them.
GitHub - Azure/aztfmigrate: A tool to migrate terraform resources between the AzAPI and AzureRM providers.
A tool to migrate terraform resources between the AzAPI and AzureRM providers. - Azure/aztfmigrate
github.com
April 1, 2025 at 9:48 PM
Excited to announce the launch of #AzureNetAppFiles (#ANF) #Terraform #AzureVerifiedModules (#AVM)!

Powered by #AzApi, this solution offers speed and agility, enabling rapid feature additions as per the ANF team's updates. 👍

registry.terraform.io/modules/Azur...
January 20, 2025 at 12:10 PM
ここの、enableMetrics をtrueにしないとjava系のメトリックスが拾えないのかな?
learn.microsoft.com/en-us/azure/...
Microsoft.App/containerApps - Bicep, ARM template & Terraform AzAPI reference
Azure Microsoft.App/containerApps syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version latest
learn.microsoft.com
February 21, 2026 at 12:46 AM
The #Azure #Terraform AzApi provider v2.0 is out and is now full HCL (no more JSON) and supports new Azure services from day 0 techcommunity.microsoft.com/t5/azure-too...
Announcing AzAPI 2.0
The AzAPI provider, designed to expedite the integration of new Azure services with HashiCorp Terraform, has now released 2.0. This updated version marks a..
techcommunity.microsoft.com
October 22, 2024 at 6:27 PM
13,000+ Terraform Weekly subscribers are seeking tools and ideas to improve infrastructure operations! 🚀 Target DevOps, cloud, and platform engineering pros with a sponsorship opportunity. #Terraform #DevOps #Cloud #Sponsorship
https://www.weekly.tf/p/issue-276-terragrunt-structure-secrets-iac-that-acts-like-software-lambda-on-your-own-ec2-azapi
www.weekly.tf
June 29, 2026 at 12:40 PM
Azure Container Apps – Path-Based Routing with Terraform by Karol Pieciukiewicz azureway.cloud/azure-contai...
Azure Container Apps – Path-Based Routing with Terraform » Azure Way
Configure Azure Container Apps – Path-Based Routing using Terraform and AzAPI. Unified entry point, prefix rewriting, no external gateway — all as IaC.
azureway.cloud
March 22, 2026 at 8:40 PM
Terraform Tips: Managing Azure Virtual Desktop Session Hosts with Precision by Preethi Sabbineni #Azure arinco.com.au/blog/terrafo...
Terraform Tips: Managing Azure Virtual Desktop Session Hosts with Precision - Arinco
Learn how to manage Azure Virtual Desktop hosts with Terraform using AzureRM and AzAPI for precise automation.
arinco.com.au
November 3, 2025 at 12:00 PM
Deploying Azure Service Groups with Terraform AzAPI by Luke Murray #Azure luke.geek.nz/azure/servic...
Deploying Azure Service Groups with Terraform AzAPI | luke.geek.nz
Deploy Azure Service Groups with Terraform AzAPI to group resources across subscriptions for improved cloud governance.
luke.geek.nz
July 14, 2025 at 4:25 AM