Terraform manages a radix tree of commands as its abstracted away in cli module that terraform maintains.

when terraform apply is run, the apply is subcommand fetched from the library of commands that terraform maintains in terraform/commands.go