In the CloudSlash AWS demo, I used the terminal UI to find unused resources, trace their dependencies, and make changes to reduce waste. I checked the changes in the AWS console, then used CloudSlash to restore the deleted resources and undo the reductions.
The interesting part for me was how to keep AWS-specific logic out of the Go core without reducing the core to a launcher. CloudSlash still needs to show what depends on a resource and give you a way to review a change. The plugin handles what that change actually means in AWS.
Give each plugin its own environment
CloudSlash uses gRPC plugins, with the AWS-specific logic in the AWS plugin. That split is useful for more than keeping provider code out of the core. It also lets us scope the environment variables a plugin receives instead of treating the parent shell’s environment as shared configuration.
In Go, the distinction is easy to miss: if you leave exec.Cmd.Env nil, the child inherits the parent’s environment.…