Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

262 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure ARM Bicep Atomic Design Repository

This repository implements an atomic design approach for Azure infrastructure-as-code using Bicep. It is organized into two main categories:

Atoms (Modules)

Located in the bicep/modules/ directory, these are small, reusable Bicep modules representing individual Azure resources (e.g., storage accounts, key vaults, app services). Each module is designed to be composable and independently deployable.

Organisms (Templates)

Located in the bicep/templates/ directory, these are higher-level Bicep templates that combine multiple modules (atoms) to define more complex Azure solutions or environments. Organisms orchestrate the deployment of multiple resources as a cohesive unit.


Key Features

  • Atomic Design: Promotes reusability, maintainability, and clarity by separating infrastructure into atoms (modules) and organisms (templates).
  • Validation: Supports validation of deployments using Azure's deployment group what-if operation, allowing you to preview changes before applying them.
  • Deployment: Deploys resources using az deployment group create for robust, repeatable, and auditable infrastructure provisioning.

Usage

1. Validate a Deployment (What-If)

Preview the impact of a deployment without making changes:

az deployment group what-if \
	--resource-group <your-resource-group> \
	--template-file <path-to-template.bicep> \
	--parameters <parameters-file>

2. Deploy to a Resource Group

Deploy a Bicep template (organism) to your Azure resource group:

az deployment group create \
	--resource-group <your-resource-group> \
	--template-file <path-to-template.bicep> \
	--parameters <parameters-file>

Repository Structure

  • bicep/modules/ — Atomic Bicep modules (atoms)
  • bicep/templates/ — Composite Bicep templates (organisms)
  • bicep/variables/ — Environment-specific .bicepparam files for templates
  • scripts/ — PowerShell and CLI scripts for automation
  • variables/ — Parameter and variable files

Azure AI Foundry (Standalone)

This repository includes a standalone Azure AI Foundry deployment path that avoids private networking and enterprise landing-zone dependencies.

New Assets

  • Module: bicep/modules/aif-foundry.bicep
  • Template: bicep/templates/landingzone-standalone-ai-foundry.bicep
  • Variables: bicep/variables/landingzone-standalone-ai-foundry-dev.bicepparam

Scope

  • Deploys Azure AI Foundry hub (Microsoft.CognitiveServices/accounts, kind AIServices).
  • Deploys Azure AI Foundry project resource.
  • Deploys a configurable model deployment.
  • Outputs endpoint and deployment identifiers for provider integration.

Validate

az deployment group what-if \
	--resource-group <your-resource-group> \
	--template-file bicep/templates/landingzone-standalone-ai-foundry.bicep \
	--parameters bicep/variables/landingzone-standalone-ai-foundry-dev.bicepparam

Deploy

az deployment group create \
	--resource-group <your-resource-group> \
	--template-file bicep/templates/landingzone-standalone-ai-foundry.bicep \
	--parameters bicep/variables/landingzone-standalone-ai-foundry-dev.bicepparam

Provider Configuration Example

Use deployment outputs with your provider abstraction:

{
	"AgentProvider": {
		"Provider": "Foundry",
		"Endpoint": "<foundry-endpoint>",
		"Deployment": "default"
	}
}

Local vs Cloud Provider Selection

  • Local/self-hosted option: Ollama
  • Managed cloud option: Azure AI Foundry
  • Existing managed option: Azure OpenAI

Switching providers should remain configuration-driven through your AgentProviderOptions pattern.


Azure Ollama (Standalone)

This repository includes a standalone Ollama deployment path using Azure Container Apps with internal ingress and persistent model storage.

New Assets

  • Module: bicep/modules/aca-ollama.bicep
  • Template: bicep/templates/platform-standalone-ai-ollama.bicep
  • Variables: bicep/variables/platform-standalone-ai-ollama-dev.bicepparam

Scope

  • Deploys Azure Container Apps managed environment.
  • Deploys Azure Container App running ollama/ollama.
  • Configures internal-only ingress (external: false).
  • Pulls configured model at startup.
  • Persists downloaded models to Azure Files mounted into the container.

Validate

az deployment group what-if \
	--resource-group <your-resource-group> \
	--template-file bicep/templates/platform-standalone-ai-ollama.bicep \
	--parameters bicep/variables/platform-standalone-ai-ollama-dev.bicepparam

Deploy

az deployment group create \
	--resource-group <your-resource-group> \
	--template-file bicep/templates/platform-standalone-ai-ollama.bicep \
	--parameters bicep/variables/platform-standalone-ai-ollama-dev.bicepparam

Provider Configuration Mapping

Azure-hosted Ollama:

{
	"AgentProvider": {
		"Provider": "Ollama",
		"Endpoint": "http://<ollama-internal-fqdn>",
		"Model": "phi4"
	}
}

Local development:

{
	"AgentProvider": {
		"Provider": "Ollama",
		"Endpoint": "http://localhost:11434",
		"Model": "phi4"
	}
}

Both use the same provider shape and differ only by environment-specific configuration values.


Contributing

Contributions are welcome! Please ensure new modules and templates follow the atomic design principles and include documentation and sample parameters.


License

This project is licensed under the MIT License. See the LICENSE file for details.

About

azure-arm starter Azure ARM, files in bicep and json format, is a starting point for Infrastructure as Code (IaC) deployment using az deployment group what-if and az deployment group create from either the CLI, from your GitHub Actions workflows, or from your Azure DevOps Pipelines.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages