# `mgf-cloud` — scope policy

> `mgf-cloud`'s **scope policy** (family **SP**) — what belongs in this
> cloud-resource interface. A proposed addition is in scope only if it passes
> the §3 gate.

## §1 In scope (SP-01)

Provider-agnostic management of cloud **VMs and storage**, plus the thin layer
needed to stand a host up:

- **Compute** — VM lifecycle (create / list / show / delete / reboot / resize /
  snapshot / console), images, flavours, keypairs.
- **Block storage** — volumes (create / attach / detach / delete / snapshot).
- **Object storage** — Swift containers + objects (S3-compatible optional).
- **Networking** — floating IPs, security groups + rules.
- **Bootstrap** — cloud-init / user-data injection at create time **and** an SSH
  remote-exec / file-push layer (install Docker, drop a compose bundle, bring it up).
- **Provider abstraction** — one `CloudProvider` interface; Infomaniak Public
  Cloud (OpenStack) now, AWS-ready. **Stateless** (the cloud is the source of
  truth) with `mgf:owner` resource tagging to identify federation resources.
- **Surfaces** — a CLI (`mgf-cloud`) and a **local single-user** web GUI
  (`mgf-cloud web`).

The boundary: **create + manage IaaS primitives across providers, with a thin
bootstrap layer.** The federation orchestrator (`mgf-fed`) decides *what* to
provision and *owns* the resulting resources; `mgf-cloud` is the mechanism.

## §2 Out of scope (SP-02) — with reasons

| Not here | Why | Where instead |
|---|---|---|
| Full app deployment (Postgres/Redis/app config) | mgf-cloud stops at "a configured host + storage" | Ansible / the consumer's cloud-init |
| Declarative IaC + a state file | stateless live-query by charter | Terraform / OpenTofu |
| Kubernetes / container orchestration | a host runs Docker via bootstrap; orchestration is the consumer's | the provider's managed k8s |
| Multi-user **hosted** web service + authn | v1 web GUI is localhost, single-operator | (future, on demand) |
| DNS / billing / account management | not VM-or-storage | the provider console / a future module |
| A general OpenStack passthrough SDK | mgf-cloud wraps openstacksdk for the federation's needs, not 1:1 | `openstacksdk` directly |

## §3 Scope-creep gate (SP-03)

A PR adding a module/helper MUST answer: (1) is it IaaS-primitive management
(compute / storage / network / bootstrap) or provider plumbing (else out)?
(2) does it keep the **core light** — heavy SDKs confined to a provider/web
extra, enforced by the import-linter contract? (3) is there a consumer demand
signal (today: `mgf-fed`)? Any "no/unclear" blocks it.

## §4 Adjacent scope (SP-04)

Adjacent (not yet in): the AWS adapter (a stub ships in 0.1), S3 object storage,
load balancers, DNS records, snapshot-as-backup schedules, a multi-user/hosted
web GUI. Promote adjacent → in only on a documented consumer demand signal, never
speculatively.

## §5 Alternatives for out-of-scope needs (SP-05)

App-deploy → Ansible / cloud-init; declarative IaC → Terraform/OpenTofu; k8s →
the provider's managed Kubernetes; full OpenStack surface → `openstacksdk`
directly; hosted multi-user UI → (future).

## §6 Revisiting scope (SP-06)

Revisited at every **MAJOR** boundary; a major bump re-justifies the surface
against §1/§2 and re-affirms the provider-agnostic / stateless / core-light
(heavy-SDK-in-extras) invariants.
