Planning and Executing Connector Ops
Just like Terraform or Pulumi, we want to use Autoschematic to manage, create, delete, and modify infrastructure.
At its core, this means that we reason about the current state of a resource at addr, and the desired state that we want it to be in. Connnector::plan(...) is where connectors implement this, and is invoked by autoschematic plan for every staged file in git.
The core types involved are:
Connector::plan(addr, current, desired) is where your connector will decode addr, compare the current state with the desired state, and compute a series of ops that, when executed by Connector::op_exec(addr, op), should lead to the new current state (as fetched by Connector::get(addr)) being equal to the desired state (or as close as possible). Let's look at the AWS API Gateway V2 connector for an example:
Your custom ConnectorOp is usually an enum with reasonably fine-grained operations for your connector. You'll serialize/deserialize them yourself.
Reference files:

