Quickstart For DevOps Users
This track uses the AWS provider to plan and apply a Python app through hybrid execution. You’ll use the same Terraform provider and a familiar plan/apply process, with Netherframe running the provider and managing local state.
What Will Feel Familiar
- you still decide what goes into each deployment unit
- provider configuration is explicit
- you can inspect a plan before applying it
- resource attributes and references follow the provider schema
What Feels Different
- you author infrastructure in Python
- the CLI loads one or more apps from
[tool.nf] - Netherframe calls provider binaries directly and writes state to the configured backend
1. Create A Small Project
Work in a project directory with Python 3.15 or later and the nf CLI installed.
See installation for uv, pip, and source-checkout setup.
2. Install The AWS Binding Package
If you’re working from a source checkout or the AWS package is unavailable on your index, see AWS binding installation.
uv add netherframe.providers.hashicorp.aws
pip install netherframe.providers.hashicorp.aws
After that, your app can import:
from nf.providers.hashicorp.aws import AwsProvider, Subnet, Vpc
3. Configure The App Entry Point
Create pyproject.toml or add these settings to its existing [tool.nf] section.
[tool.nf]
apps = ["app:app"]
4. Define One Stack
This example stays close to the Terraform mental model: provider config plus a small AWS network stack.
Create app.py:
# coding: nf_autoid
from nf.core import App, Bind, BindContext, Output, Stack
from nf.providers.hashicorp.aws import AwsProvider, Subnet, Vpc
def app() -> App:
with App() as app, Stack() as demo, BindContext:
aws: Bind = AwsProvider(region="us-east-1")
vpc: Bind[Vpc] = Vpc(
cidr_block="10.42.0.0/16",
enable_dns_support=True,
enable_dns_hostnames=True,
tags={"Name": "quickstart-vpc"},
)
public_subnet: Bind = Subnet(
vpc_id=vpc.output.id,
cidr_block="10.42.1.0/24",
availability_zone="us-east-1a",
map_public_ip_on_launch=True,
tags={"Name": "quickstart-public-subnet"},
)
vpc_id: Bind = Output(value=vpc.output.id)
app.enable_hybrid_execution_local(path=".nf.out/hybrid.tfstate")
return app
The with block places demo inside the app and its resources inside the stack.
BindContext and Bind use the Python names as construct IDs.
Read this the same way you would read a small Terraform module:
- one provider configuration
- one VPC
- one public subnet
- one output that exposes a stable value
5. Review a plan
Configure AWS credentials for the account where you want to run this example. Keep the project's Python environment active.
nf plan --app app --out reviewed-plan.json
The plan should show a VPC and subnet in the demo stack and an output for the VPC ID.
6. Apply and clean up
After reviewing the plan and the target AWS account, apply it and check convergence:
nf apply --app app --plan-file reviewed-plan.json
nf plan --app app
Netherframe records the result in .nf.out/hybrid.tfstate. Destroy the example when
you’re done:
nf destroy --app app
For a team workflow, see saved plans in CI and state backends. If an existing pipeline requires Terraform JSON, use the legacy compatibility workflow.
Next Steps
- Quickstart For Developers
- Custom Codec And Autoscope explains the naming and scoping used here.
- CLI Reference
- Building Your First Application