Metadata-Version: 2.4
Name: netherframe.backends.gcp
Version: 0.3.0
Summary: Google Cloud Platform 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: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Dist: netherframe-core>=0.12.0,<1.0.0
Requires-Dist: google-cloud-storage>=3.17.1
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.gcp

Google Cloud Platform backend implementations for Netherframe Infrastructure as Code framework.

## Installation

```bash
pip install netherframe.backends.gcp
```

## Usage

```python
from nf.backends.gcp import GcsBackend, GcsStateBackend

# For Terraform synthesis mode
backend = GcsBackend(nf_scope=stack, bucket="my-terraform-state", prefix="infrastructure/terraform.tfstate")

# For native execution mode
state_backend = GcsStateBackend(bucket="my-terraform-state", prefix="infrastructure/terraform.tfstate", project="my-gcp-project")
```

## Features

- Google Cloud Storage-based state storage
- Compatible with Terraform's gcs backend
- Support for service account authentication
- State locking using lock files
- Automatic stale lock detection and cleanup, and force-unlock by lock ID (`nf state force-unlock`)
- Conditional writes: a write replaces only the state version its run read (generation match)
- Pre-apply checkpoints kept beside the state (`<prefix>.checkpoints/`)
