multy icon indicating copy to clipboard operation
multy copied to clipboard

Add overrides for VM's images

Open goncalo-rodrigues opened this issue 3 years ago • 0 comments

Multy provides a cloud-agnostic way to specify an image. However, sometimes users want to use a specific AWS ami, or equivalent in other clouds.

This issue adds:

  1. Override field to VM's overrides
  • https://github.com/multycloud/multy/blob/main/api/proto/resourcespb/virtual_machine.proto#L41 - string that will map to aws ami
  • https://github.com/multycloud/multy/blob/main/api/proto/resourcespb/virtual_machine.proto#L45 - message that will map to azure img reference block
  • https://github.com/multycloud/multy/blob/main/api/proto/resourcespb/virtual_machine.proto#L49 - string that will map to gcp iamge
  1. Use overrides if specified in translation layer. Similar to how it's done currently for vm sizes - see example for AWS

  2. Add tests for each cloud using their overrides. Copy from this example - https://github.com/multycloud/multy/tree/main/test/_configs/virtual_machine/virtual_machine_size_override but override the image instead of the size. You can see what's currently being generated by running go test ./test --write_generated - it will create a generated.tf file with the current output of the translation

goncalo-rodrigues avatar Jul 25 '22 08:07 goncalo-rodrigues