openstack.loadbalancer.FlavorV2
Explore with Pulumi AI
Manages a V2 load balancer flavor resource within OpenStack.
Note: This usually requires admin privileges.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const fp1 = new openstack.loadbalancer.FlavorprofileV2("fp_1", {
name: "test",
providerName: "amphora",
flavorData: JSON.stringify({
loadbalancer_topology: "ACTIVE_STANDBY",
}),
});
const flavor1 = new openstack.loadbalancer.FlavorV2("flavor_1", {
name: "test",
description: "This is a test flavor",
flavorProfileId: fp1.id,
});
import pulumi
import json
import pulumi_openstack as openstack
fp1 = openstack.loadbalancer.FlavorprofileV2("fp_1",
name="test",
provider_name="amphora",
flavor_data=json.dumps({
"loadbalancer_topology": "ACTIVE_STANDBY",
}))
flavor1 = openstack.loadbalancer.FlavorV2("flavor_1",
name="test",
description="This is a test flavor",
flavor_profile_id=fp1.id)
package main
import (
"encoding/json"
"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 {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"loadbalancer_topology": "ACTIVE_STANDBY",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
fp1, err := loadbalancer.NewFlavorprofileV2(ctx, "fp_1", &loadbalancer.FlavorprofileV2Args{
Name: pulumi.String("test"),
ProviderName: pulumi.String("amphora"),
FlavorData: pulumi.String(json0),
})
if err != nil {
return err
}
_, err = loadbalancer.NewFlavorV2(ctx, "flavor_1", &loadbalancer.FlavorV2Args{
Name: pulumi.String("test"),
Description: pulumi.String("This is a test flavor"),
FlavorProfileId: fp1.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var fp1 = new OpenStack.LoadBalancer.FlavorprofileV2("fp_1", new()
{
Name = "test",
ProviderName = "amphora",
FlavorData = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["loadbalancer_topology"] = "ACTIVE_STANDBY",
}),
});
var flavor1 = new OpenStack.LoadBalancer.FlavorV2("flavor_1", new()
{
Name = "test",
Description = "This is a test flavor",
FlavorProfileId = fp1.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.loadbalancer.FlavorprofileV2;
import com.pulumi.openstack.loadbalancer.FlavorprofileV2Args;
import com.pulumi.openstack.loadbalancer.FlavorV2;
import com.pulumi.openstack.loadbalancer.FlavorV2Args;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
var fp1 = new FlavorprofileV2("fp1", FlavorprofileV2Args.builder()
.name("test")
.providerName("amphora")
.flavorData(serializeJson(
jsonObject(
jsonProperty("loadbalancer_topology", "ACTIVE_STANDBY")
)))
.build());
var flavor1 = new FlavorV2("flavor1", FlavorV2Args.builder()
.name("test")
.description("This is a test flavor")
.flavorProfileId(fp1.id())
.build());
}
}
resources:
fp1:
type: openstack:loadbalancer:FlavorprofileV2
name: fp_1
properties:
name: test
providerName: amphora
flavorData:
fn::toJSON:
loadbalancer_topology: ACTIVE_STANDBY
flavor1:
type: openstack:loadbalancer:FlavorV2
name: flavor_1
properties:
name: test
description: This is a test flavor
flavorProfileId: ${fp1.id}
Create FlavorV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FlavorV2(name: string, args: FlavorV2Args, opts?: CustomResourceOptions);
@overload
def FlavorV2(resource_name: str,
args: FlavorV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def FlavorV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
flavor_profile_id: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None)
func NewFlavorV2(ctx *Context, name string, args FlavorV2Args, opts ...ResourceOption) (*FlavorV2, error)
public FlavorV2(string name, FlavorV2Args args, CustomResourceOptions? opts = null)
public FlavorV2(String name, FlavorV2Args args)
public FlavorV2(String name, FlavorV2Args args, CustomResourceOptions options)
type: openstack:loadbalancer:FlavorV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FlavorV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FlavorV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FlavorV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FlavorV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FlavorV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var flavorV2Resource = new OpenStack.LoadBalancer.FlavorV2("flavorV2Resource", new()
{
FlavorProfileId = "string",
Description = "string",
Enabled = false,
Name = "string",
Region = "string",
});
example, err := loadbalancer.NewFlavorV2(ctx, "flavorV2Resource", &loadbalancer.FlavorV2Args{
FlavorProfileId: pulumi.String("string"),
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var flavorV2Resource = new FlavorV2("flavorV2Resource", FlavorV2Args.builder()
.flavorProfileId("string")
.description("string")
.enabled(false)
.name("string")
.region("string")
.build());
flavor_v2_resource = openstack.loadbalancer.FlavorV2("flavorV2Resource",
flavor_profile_id="string",
description="string",
enabled=False,
name="string",
region="string")
const flavorV2Resource = new openstack.loadbalancer.FlavorV2("flavorV2Resource", {
flavorProfileId: "string",
description: "string",
enabled: false,
name: "string",
region: "string",
});
type: openstack:loadbalancer:FlavorV2
properties:
description: string
enabled: false
flavorProfileId: string
name: string
region: string
FlavorV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FlavorV2 resource accepts the following input properties:
- Flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- Description string
- The description of the flavor. Changing this updates the existing flavor.
- Enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - Name string
- Name of the flavor. Changing this updates the existing flavor.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- Flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- Description string
- The description of the flavor. Changing this updates the existing flavor.
- Enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - Name string
- Name of the flavor. Changing this updates the existing flavor.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- flavor
Profile StringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- description String
- The description of the flavor. Changing this updates the existing flavor.
- enabled Boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - name String
- Name of the flavor. Changing this updates the existing flavor.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- description string
- The description of the flavor. Changing this updates the existing flavor.
- enabled boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - name string
- Name of the flavor. Changing this updates the existing flavor.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- flavor_
profile_ strid - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- description str
- The description of the flavor. Changing this updates the existing flavor.
- enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - name str
- Name of the flavor. Changing this updates the existing flavor.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- flavor
Profile StringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- description String
- The description of the flavor. Changing this updates the existing flavor.
- enabled Boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - name String
- Name of the flavor. Changing this updates the existing flavor.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
Outputs
All input properties are implicitly available as output properties. Additionally, the FlavorV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FlavorV2 Resource
Get an existing FlavorV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FlavorV2State, opts?: CustomResourceOptions): FlavorV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
flavor_profile_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None) -> FlavorV2
func GetFlavorV2(ctx *Context, name string, id IDInput, state *FlavorV2State, opts ...ResourceOption) (*FlavorV2, error)
public static FlavorV2 Get(string name, Input<string> id, FlavorV2State? state, CustomResourceOptions? opts = null)
public static FlavorV2 get(String name, Output<String> id, FlavorV2State state, CustomResourceOptions options)
resources: _: type: openstack:loadbalancer:FlavorV2 get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the flavor. Changing this updates the existing flavor.
- Enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - Flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- Name string
- Name of the flavor. Changing this updates the existing flavor.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- Description string
- The description of the flavor. Changing this updates the existing flavor.
- Enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - Flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- Name string
- Name of the flavor. Changing this updates the existing flavor.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- description String
- The description of the flavor. Changing this updates the existing flavor.
- enabled Boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - flavor
Profile StringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- name String
- Name of the flavor. Changing this updates the existing flavor.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- description string
- The description of the flavor. Changing this updates the existing flavor.
- enabled boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - flavor
Profile stringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- name string
- Name of the flavor. Changing this updates the existing flavor.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- description str
- The description of the flavor. Changing this updates the existing flavor.
- enabled bool
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - flavor_
profile_ strid - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- name str
- Name of the flavor. Changing this updates the existing flavor.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
- description String
- The description of the flavor. Changing this updates the existing flavor.
- enabled Boolean
- Whether the flavor is enabled or not. Defaults to
true
. Changing this updates the existing flavor. - flavor
Profile StringId - The flavor_profile_id that the flavor will use. Changing this creates a new flavor.
- name String
- Name of the flavor. Changing this updates the existing flavor.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
region
argument of the provider is used. Changing this creates a new LB flavor.
Import
flavors can be imported using their id
. Example:
$ pulumi import openstack:loadbalancer/flavorV2:FlavorV2 flavor_1 2a0f2240-c5e6-41de-896d-e80d97428d6b
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.