Metadata-Version: 2.4
Name: netherframe.backends.azure
Version: 0.2.0
Summary: Azure backend implementations for Netherframe
Author: Sourabh Cheedella
Author-email: Sourabh Cheedella <cheedella.sourabh@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Dist: netherframe-core>=0.9.0
Requires-Dist: azure-storage-blob>=12.31.1
Requires-Dist: azure-identity>=1.27.0
Requires-Dist: pytest>=9.2.0 ; extra == 'dev'
Requires-Python: >=3.14
Project-URL: Homepage, https://netherframe.arsenal.sh
Project-URL: Repository, https://github.com/arsenal-sh/netherframe
Provides-Extra: dev
Description-Content-Type: text/markdown

# nf.backends.azure

Azure backend implementations for Netherframe Infrastructure as Code framework.

## Installation

```bash
pip install netherframe.backends.azure
```

## Usage

```python
from nf.backends.azure import AzurermBackend, AzurermStateBackend

# For Terraform synthesis mode
backend = AzurermBackend(nf_scope=stack, resource_group_name="terraform-state-rg", storage_account_name="tfstatestorage", container_name="tfstate", key="infrastructure.tfstate")

# For native execution mode
state_backend = AzurermStateBackend(storage_account_name="tfstatestorage", container_name="tfstate", key="infrastructure.tfstate", resource_group_name="terraform-state-rg")
```

## Features

- Azure Blob Storage-based state storage
- Compatible with Terraform's azurerm backend
- Support for multiple authentication methods (Service Principal, MSI, CLI)
- State locking using blob leases
- Automatic blob creation if it doesn't exist
- Force-unlock by lock ID (the lease's; `nf state force-unlock`), with the lock's info in the blob's metadata while leased
- Conditional writes: a write replaces only the state version its run read (ETag match)
- Pre-apply checkpoints kept beside the state (`<key>.checkpoints/`)
