create AWS infra

This commit is contained in:
2026-05-15 10:26:43 -04:00
parent 6563b4cc4b
commit 1bc5052d22
21 changed files with 1502 additions and 0 deletions

22
src/infra/state.py Normal file
View File

@@ -0,0 +1,22 @@
import json
from pathlib import Path
from typing import Any
INFRA_STATE_FILE = ".qai-cli-infra.json"
def state_path(config_dir: str) -> Path:
return Path(config_dir) / INFRA_STATE_FILE
def read_infra_state(config_dir: str) -> dict[str, Any]:
path = state_path(config_dir)
if not path.exists():
return {}
with open(path) as f:
return json.load(f)
def write_infra_state(config_dir: str, state: dict[str, Any]) -> None:
with open(state_path(config_dir), "w") as f:
json.dump(state, f, indent=2)