Skip to content

[Feature Request] Add data source to list available machine types #1782

Description

@Manisha15

Problem description

I'm implementing a STACKIT compute resource integration for Foreman via foreman_opentofu. Foreman needs to discover all available machine types and present them to the user when configuring and provisioning hosts.

Currently, there is no data source that returns the complete list of available machine types.

Proposed solution

Add a stackit_machine_types data source that returns all available machine types.

data "stackit_machine_types" "available" {
  project_id = var.project_id
}

output "machine_types" {
  value = data.stackit_machine_types.available.machine_types
}

Alternative solutions (optional)

The machine types could be retrieved externally via the STACKIT API/CLI, but this requires additional logic outside Terraform/OpenTofu.

Additional information

Other compute resources supported by Foreman provide machine type/flavor enumeration, so this would make the STACKIT integration consistent with them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions