Writing your first vect project, part 5
In this part we change one input and see that vect only re-plans what the change touches, rename an executor without destroying anything, and tear the project down. We pick up in the vect-tutorial folder from Part 4, with the Temporal dev server still running and VECT_CONFIG still set.
Where to get help: open an issue on the issue tracker.
Run every command from inside vect-tutorial. Your pet name will differ from the one shown.
Change one input
In main.hcl, change the sign-off from See you soon to Talk soon:
data "value" "signoff" {
value = "Talk soon"
}The rest of the file stays as it was. Only greeting uses the sign-off, so only greeting should have work to do. Plan it:
vect planstack.pet.terraform.pet: running
stack.pet.terraform.pet: planned inputs unchanged
stack.greeting.terraform.greeting: running
stack.greeting.terraform.greeting: planned will update
plan of workspace "dev": succeeded (run 01a1e76c-4a0e-72d6-9d8e-5caf88114172)
stack.greeting.terraform.greeting update will update
stack.pet.terraform.pet no-op inputs unchangedpet is a no-op: its root was planned and nothing differed. greeting has an update, because one of its inputs changed. The engine’s own lines for pet say No changes. Your infrastructure matches the configuration., and for greeting they show the one attribute that differs:
~ input = "Hello, honest-eagle! See you soon." -> "Hello, honest-eagle! Talk soon."That’s the point of the graph. In plain Terraform you’d run plan in each root to find out which ones care. Here you change an input and the plan tells you which nodes it reaches, and every other node is left alone. Had we changed something pet produces, then pet and everything that depends on it would have re-planned.
Apply it:
vect applystack.pet.terraform.pet: running
stack.pet.terraform.pet: unchanged inputs unchanged
stack.greeting.terraform.greeting: running
stack.greeting.terraform.greeting: applied will update
apply of workspace "dev": succeeded (run 01a1e76c-5231-7505-8a4d-25430ef2fb17)
stack.greeting.terraform.greeting applied (update) will update
stack.pet.terraform.pet unchanged inputs unchanged
deployment pointer 6 appendedpet was unchanged, and greeting was updated in place. No approval was asked for, as nothing was destroyed. Check:
vect outputmessage = "Hello, honest-eagle! Talk soon."
receipt = redacted(string)Rename an executor
Suppose pet is a poor name for the first executor and you want buddy. If you just rename the block, vect sees the old address stack.pet.terraform.pet disappear and a new one, stack.pet.terraform.buddy, appear. The old one is a removal and the new one is an addition, so you’d get a new pet instead of the one you have. To say “this is the same thing under a new name”, add a moved block.
Edit stacks/pet/main.hcl:
executor "terraform" "buddy" {
source = "../../roots/pet"
}
moved {
from = "terraform.pet"
to = "terraform.buddy"
}
output "name" {
value = terraform.buddy.name
}
output "token" {
value = terraform.buddy.token
}The addresses in moved are relative to the stack that contains the block, so they don’t start with stack.pet. The outputs now refer to terraform.buddy. The root main.hcl doesn’t change, because it only knows about the stack’s outputs.
moved, but across roots. A moved block in Terraform renames a resource inside one state. In vect it moves the record of a whole executor, and the infrastructure and the engine’s state stay exactly where they are.vect validateSuccess!
(root) 0 blocks
stack.greeting 1 block
stack.pet 1 blockvect graphdata.value.signoff
stack.greeting.var.signoff
stack.pet.terraform.buddy
stack.pet.output.name
stack.greeting.var.name
stack.pet.output.token
stack.greeting.var.token
stack.greeting.terraform.greeting
stack.greeting.output.message
output.message
stack.greeting.output.receipt
output.receiptThe graph uses the new name. Plan:
vect planstack.pet.terraform.buddy: running
stack.pet.terraform.buddy: planned move stack.pet.terraform.pet → stack.pet.terraform.buddy; no changes
stack.greeting.terraform.greeting: running
stack.greeting.terraform.greeting: planned inputs unchanged
plan of workspace "dev": succeeded (run 01a1e26b-d781-7261-9689-a33a0e7ac9cb)
stack.greeting.terraform.greeting no-op inputs unchanged
stack.pet.terraform.buddy no-op move stack.pet.terraform.pet → stack.pet.terraform.buddy; no changes
approval requests:
apr_255712fc64771465a8b8d8c9 state_move stack.pet.terraform.buddy move stack.pet.terraform.pet → stack.pet.terraform.buddyNothing will change: both nodes are no-op. buddy carries the note move stack.pet.terraform.pet → stack.pet.terraform.buddy; no changes. A move is bookkeeping in Inventory, but it’s still the kind of thing you want to look at before it happens, so it appears under approval requests: as a state_move.
Apply it, and answer y:
vect applystack.pet.terraform.buddy: running
stack.pet.terraform.buddy: awaiting_approval awaiting approval
approval request apr_255712fc64771465a8b8d8c9 state_move stack.pet.terraform.buddy move stack.pet.terraform.pet → stack.pet.terraform.buddy
approve state_move of stack.pet.terraform.buddy? [y/N] y
stack.pet.terraform.buddy: running
stack.pet.terraform.buddy: unchanged no changes
stack.greeting.terraform.greeting: running
stack.greeting.terraform.greeting: unchanged inputs unchanged
apply of workspace "dev": succeeded (run 01a1e26b-e611-7f32-b694-67b0e01264b8)
stack.greeting.terraform.greeting unchanged inputs unchanged
stack.pet.terraform.buddy unchanged no changes
approval requests:
apr_255712fc64771465a8b8d8c9 state_move stack.pet.terraform.buddy move stack.pet.terraform.pet → stack.pet.terraform.buddy [approved by local]
deployment pointer 7 appendedNow see how Inventory recorded it:
vect inventoryADDRESS VERSION STATUS
stack.greeting.terraform.greeting 5 converged
stack.pet.terraform.buddy 1 converged
stack.pet.terraform.pet 5 destroyed
POINTER BUNDLE SCOPE APPLIED METADATA
1 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:00Z
2 sha256:40927cded903b29611c686cdfab7e52b40b0e35d9cf9c828547c23a51784fcfa full 2026-11-17T02:53:04Z
3 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:05Z
4 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:07Z
5 sha256:f1559ba2c747b207337a2bddfd81d6de9db36e3b527c2ebc53c5cc72e8a16253 full 2026-11-17T02:53:15Z
6 sha256:e2e0239aae3b133eadfc5919f06849c032b30585cf2c084a4b5f4d6c57b85269 full 2026-11-17T02:53:18Z
7 sha256:157e34a955814c32193888d63b4757d02f0d4e17faa176adf4d8019ad4d83edc full 2026-11-17T02:53:21ZThe executor buddy is converged. The old address, pet, is destroyed. That means its record was retired, not that anything was destroyed in the real world, which you can tell because the output is unchanged:
vect outputmessage = "Hello, honest-eagle! Talk soon."
receipt = redacted(string)It’s the same pet, under a new name.
Tear it down
To destroy everything vect applied:
vect destroyTeardown works from Inventory alone, in reverse dependency order: greeting first, then buddy. Every destroy is an approval request, and each resource asks separately. Answer y four times (line order may differ slightly, as noted in Part 3):
stack.greeting.terraform.greeting: running
stack.pet.terraform.buddy: running
stack.greeting.terraform.greeting: awaiting_approval awaiting approval
approval request apr_a5c239bd14dd49fa8073aa7b destroy stack.greeting.terraform.greeting::terraform_data.greeting destroy stack.greeting.terraform.greeting::terraform_data.greeting
approval request apr_b380e08e859fbb5d21577017 destroy stack.greeting.terraform.greeting::terraform_data.receipt destroy stack.greeting.terraform.greeting::terraform_data.receipt
approve destroy of stack.greeting.terraform.greeting::terraform_data.greeting? [y/N] y
approve destroy of stack.greeting.terraform.greeting::terraform_data.receipt? [y/N] y
stack.greeting.terraform.greeting: running
stack.greeting.terraform.greeting: applied teardown
stack.pet.terraform.buddy: awaiting_approval awaiting approval
approval request apr_5601e1eb3b54c89f18cadc84 destroy stack.pet.terraform.buddy::random_password.token destroy stack.pet.terraform.buddy::random_password.token
approval request apr_df60386d4357b3105206b6a6 destroy stack.pet.terraform.buddy::random_pet.this destroy stack.pet.terraform.buddy::random_pet.this
approve destroy of stack.pet.terraform.buddy::random_password.token? [y/N] y
approve destroy of stack.pet.terraform.buddy::random_pet.this? [y/N] y
stack.pet.terraform.buddy: running
stack.pet.terraform.buddy: applied teardown
destroy of workspace "dev": succeeded (run 01a1e1e8-f7de-7599-9558-27dfe07984f4)
stack.greeting.terraform.greeting applied (destroy) teardown
stack.pet.terraform.buddy applied (destroy) teardown
approval requests:
apr_a5c239bd14dd49fa8073aa7b destroy stack.greeting.terraform.greeting::terraform_data.greeting destroy stack.greeting.terraform.greeting::terraform_data.greeting [approved by local]
apr_b380e08e859fbb5d21577017 destroy stack.greeting.terraform.greeting::terraform_data.receipt destroy stack.greeting.terraform.greeting::terraform_data.receipt [approved by local]
apr_5601e1eb3b54c89f18cadc84 destroy stack.pet.terraform.buddy::random_password.token destroy stack.pet.terraform.buddy::random_password.token [approved by local]
apr_df60386d4357b3105206b6a6 destroy stack.pet.terraform.buddy::random_pet.this destroy stack.pet.terraform.buddy::random_pet.this [approved by local]
deployment pointer 8 appended(The engine’s own output for each executor is left out. It shows each resource being destroyed.) In a script, use vect destroy --auto-approve.
vect inventoryADDRESS VERSION STATUS
stack.greeting.terraform.greeting 6 destroyed
stack.pet.terraform.buddy 2 destroyed
stack.pet.terraform.pet 5 destroyed
POINTER BUNDLE SCOPE APPLIED METADATA
1 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:00Z
2 sha256:40927cded903b29611c686cdfab7e52b40b0e35d9cf9c828547c23a51784fcfa full 2026-11-17T02:53:04Z
3 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:05Z
4 sha256:7b1dfbd51b5dd82a09547b02c7dd2a4ffb2afbedf01dcb1d786d9b6f5d16a6d0 full 2026-11-17T02:53:07Z
5 sha256:f1559ba2c747b207337a2bddfd81d6de9db36e3b527c2ebc53c5cc72e8a16253 full 2026-11-17T02:53:15Z
6 sha256:e2e0239aae3b133eadfc5919f06849c032b30585cf2c084a4b5f4d6c57b85269 full 2026-11-17T02:53:18Z
7 sha256:157e34a955814c32193888d63b4757d02f0d4e17faa176adf4d8019ad4d83edc full 2026-11-17T02:53:21Z
8 full 2026-11-17T02:53:23ZAll three records are destroyed, and a final deployment pointer, with no bundle, says that nothing remains.
Start clean
You can run any part of this tutorial again from the beginning. If the project is applied, run vect destroy first, as above. Then remove vect’s data (state, Inventory, keys, and the download cache), which all live in .vect:
rm -rf .vectYour configuration files aren’t touched. You can also stop the Temporal dev server with Ctrl-C in its terminal.
Where to go from here
You’ve composed two Terraform roots into one graph, run them through Temporal, passed a secret between them, changed an input, renamed an executor, and torn it all down.
- The specification is the reference: every command, block, and behavior has a stable requirement ID.
docs/architecture.mdexplains how the parts fit together and why vect is shaped this way.- The topic guides explain graphs, stacks, runs, and storage in depth. How-tos aren’t written yet. If there’s something you’d like to see first, open an issue.