OpenStack v5.3.3 published on Friday, Sep 12, 2025 by Pulumi
openstack.loadbalancer.getFlavorV2
Use this data source to get the ID of an OpenStack Load Balancer flavor.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const flavor1 = openstack.loadbalancer.getFlavorV2({
    name: "flavor_1",
});
import pulumi
import pulumi_openstack as openstack
flavor1 = openstack.loadbalancer.get_flavor_v2(name="flavor_1")
package main
import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/loadbalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loadbalancer.LookupFlavorV2(ctx, &loadbalancer.LookupFlavorV2Args{
			Name: pulumi.StringRef("flavor_1"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() => 
{
    var flavor1 = OpenStack.LoadBalancer.GetFlavorV2.Invoke(new()
    {
        Name = "flavor_1",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.loadbalancer.LoadbalancerFunctions;
import com.pulumi.openstack.loadbalancer.inputs.GetFlavorV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var flavor1 = LoadbalancerFunctions.getFlavorV2(GetFlavorV2Args.builder()
            .name("flavor_1")
            .build());
    }
}
variables:
  flavor1:
    fn::invoke:
      function: openstack:loadbalancer:getFlavorV2
      arguments:
        name: flavor_1
Using getFlavorV2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFlavorV2(args: GetFlavorV2Args, opts?: InvokeOptions): Promise<GetFlavorV2Result>
function getFlavorV2Output(args: GetFlavorV2OutputArgs, opts?: InvokeOptions): Output<GetFlavorV2Result>def get_flavor_v2(flavor_id: Optional[str] = None,
                  name: Optional[str] = None,
                  region: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetFlavorV2Result
def get_flavor_v2_output(flavor_id: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  region: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetFlavorV2Result]func LookupFlavorV2(ctx *Context, args *LookupFlavorV2Args, opts ...InvokeOption) (*LookupFlavorV2Result, error)
func LookupFlavorV2Output(ctx *Context, args *LookupFlavorV2OutputArgs, opts ...InvokeOption) LookupFlavorV2ResultOutput> Note: This function is named LookupFlavorV2 in the Go SDK.
public static class GetFlavorV2 
{
    public static Task<GetFlavorV2Result> InvokeAsync(GetFlavorV2Args args, InvokeOptions? opts = null)
    public static Output<GetFlavorV2Result> Invoke(GetFlavorV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFlavorV2Result> getFlavorV2(GetFlavorV2Args args, InvokeOptions options)
public static Output<GetFlavorV2Result> getFlavorV2(GetFlavorV2Args args, InvokeOptions options)
fn::invoke:
  function: openstack:loadbalancer/getFlavorV2:getFlavorV2
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FlavorId string
- The ID of the flavor. Exactly one of name,flavor_idis required to be set.
- Name string
- The name of the flavor. Exactly one of name,flavor_idis required to be set.
- Region string
- The region in which to obtain the V2 Load Balancer client.
If omitted, the regionargument of the provider is used.
- FlavorId string
- The ID of the flavor. Exactly one of name,flavor_idis required to be set.
- Name string
- The name of the flavor. Exactly one of name,flavor_idis required to be set.
- Region string
- The region in which to obtain the V2 Load Balancer client.
If omitted, the regionargument of the provider is used.
- flavorId String
- The ID of the flavor. Exactly one of name,flavor_idis required to be set.
- name String
- The name of the flavor. Exactly one of name,flavor_idis required to be set.
- region String
- The region in which to obtain the V2 Load Balancer client.
If omitted, the regionargument of the provider is used.
- flavorId string
- The ID of the flavor. Exactly one of name,flavor_idis required to be set.
- name string
- The name of the flavor. Exactly one of name,flavor_idis required to be set.
- region string
- The region in which to obtain the V2 Load Balancer client.
If omitted, the regionargument of the provider is used.
- flavorId String
- The ID of the flavor. Exactly one of name,flavor_idis required to be set.
- name String
- The name of the flavor. Exactly one of name,flavor_idis required to be set.
- region String
- The region in which to obtain the V2 Load Balancer client.
If omitted, the regionargument of the provider is used.
getFlavorV2 Result
The following output properties are available:
- Description string
- The description of the flavor.
- Enabled bool
- Is the flavor enabled.
- FlavorId string
- The ID of the flavor.
- FlavorProfile stringId 
- The ID of the flavor profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the flavor.
- Region string
- Description string
- The description of the flavor.
- Enabled bool
- Is the flavor enabled.
- FlavorId string
- The ID of the flavor.
- FlavorProfile stringId 
- The ID of the flavor profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the flavor.
- Region string
- description String
- The description of the flavor.
- enabled Boolean
- Is the flavor enabled.
- flavorId String
- The ID of the flavor.
- flavorProfile StringId 
- The ID of the flavor profile.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the flavor.
- region String
- description string
- The description of the flavor.
- enabled boolean
- Is the flavor enabled.
- flavorId string
- The ID of the flavor.
- flavorProfile stringId 
- The ID of the flavor profile.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the flavor.
- region string
- description str
- The description of the flavor.
- enabled bool
- Is the flavor enabled.
- flavor_id str
- The ID of the flavor.
- flavor_profile_ strid 
- The ID of the flavor profile.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the flavor.
- region str
- description String
- The description of the flavor.
- enabled Boolean
- Is the flavor enabled.
- flavorId String
- The ID of the flavor.
- flavorProfile StringId 
- The ID of the flavor profile.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the flavor.
- region String
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the openstackTerraform Provider.
