- Notifications
You must be signed in to change notification settings - Fork929
Description
Background
Templates are fragile. While they can bebulletproofed, it is hard to tell what the impact of a template update is across all of the existing workspaces. This could show an aggregated response of what the impact is.
Research & vision
We should look at how other platforms like Spacelift or Terraform Enterprise do this. For example, are there tools that measure what impact an update to a module has on all of the underlying infrastructure? There may be better ways to do this.
We should also consider how this could be automated in Ci/Cd platforms and ran alongside other custom template tests a user might make (e.g. "does the project still build with this template update?". This probably means supporting JSON output and human-readable output
Also, perhaps this could be integrated with Infracost down the road to measure how a template update saves/resolves cloud cost across a fleet of workspaces.
How it would work
Here's my initial idea
$ coder templates pull my-template$ vim main.tf# make changes (e.g. hardcode disk size to 45gb)$ coder templates plan my-templateRunning`terraform plan` against all 200 workspaces using this template For 150 started workspaces:- Plan to modify`aws_instance: workspace`- Plan to modify`ebs_volume: home`For 48 stopped workspaces:- Plan to modify`ebs_volume: home`⚠️ Warning: Plan to destroy`ebs-volume: home` on 2 workspaces:- bpmct/my_workspace- spikecurtis/my-workspace
This would fix#7104 as the command currently does nothing