terraform-coop / terraform-provider-foreman

Terraform provider for Foreman
https://registry.terraform.io/providers/terraform-coop/foreman
Mozilla Public License 2.0
35 stars 32 forks source link

Implement compute profiles #134

Closed bitkeks closed 1 year ago

bitkeks commented 1 year ago

This PR implements and adds functionality to use compute profiles and their respective compute attributes.

A compute profile is a way of expressing a set of defaults for VMs created on a specific compute resource that can be mapped to an operator-defined label. This means an administrator can express, for example, what “Small”, Medium” or “Large” means on all of the individual compute resources present for a given installation.

The difficult part is to also handle the compute attributes for each compute resource. This PR is tested with a VMware backend. It should be backend-agnostic, given that compute_attributes is a list of JSONified data structs.

I decided against adding separate compute attribute files, because they are integrated into the compute profile feature.