1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ComputeServergroupV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.ComputeServergroupV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a V2 Server Group resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const test_sg = new flexibleengine.ComputeServergroupV2("test-sg", {policies: ["anti-affinity"]});
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    test_sg = flexibleengine.ComputeServergroupV2("test-sg", policies=["anti-affinity"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewComputeServergroupV2(ctx, "test-sg", &flexibleengine.ComputeServergroupV2Args{
    			Policies: pulumi.StringArray{
    				pulumi.String("anti-affinity"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var test_sg = new Flexibleengine.ComputeServergroupV2("test-sg", new()
        {
            Policies = new[]
            {
                "anti-affinity",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.ComputeServergroupV2;
    import com.pulumi.flexibleengine.ComputeServergroupV2Args;
    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 test_sg = new ComputeServergroupV2("test-sg", ComputeServergroupV2Args.builder()
                .policies("anti-affinity")
                .build());
    
        }
    }
    
    resources:
      test-sg:
        type: flexibleengine:ComputeServergroupV2
        properties:
          policies:
            - anti-affinity
    

    Create ComputeServergroupV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ComputeServergroupV2(name: string, args?: ComputeServergroupV2Args, opts?: CustomResourceOptions);
    @overload
    def ComputeServergroupV2(resource_name: str,
                             args: Optional[ComputeServergroupV2Args] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeServergroupV2(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             compute_servergroup_v2_id: Optional[str] = None,
                             name: Optional[str] = None,
                             policies: Optional[Sequence[str]] = None,
                             region: Optional[str] = None,
                             value_specs: Optional[Mapping[str, str]] = None)
    func NewComputeServergroupV2(ctx *Context, name string, args *ComputeServergroupV2Args, opts ...ResourceOption) (*ComputeServergroupV2, error)
    public ComputeServergroupV2(string name, ComputeServergroupV2Args? args = null, CustomResourceOptions? opts = null)
    public ComputeServergroupV2(String name, ComputeServergroupV2Args args)
    public ComputeServergroupV2(String name, ComputeServergroupV2Args args, CustomResourceOptions options)
    
    type: flexibleengine:ComputeServergroupV2
    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 ComputeServergroupV2Args
    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 ComputeServergroupV2Args
    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 ComputeServergroupV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeServergroupV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeServergroupV2Args
    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 computeServergroupV2Resource = new Flexibleengine.ComputeServergroupV2("computeServergroupV2Resource", new()
    {
        ComputeServergroupV2Id = "string",
        Name = "string",
        Policies = new[]
        {
            "string",
        },
        Region = "string",
        ValueSpecs = 
        {
            { "string", "string" },
        },
    });
    
    example, err := flexibleengine.NewComputeServergroupV2(ctx, "computeServergroupV2Resource", &flexibleengine.ComputeServergroupV2Args{
    	ComputeServergroupV2Id: pulumi.String("string"),
    	Name:                   pulumi.String("string"),
    	Policies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    	ValueSpecs: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var computeServergroupV2Resource = new ComputeServergroupV2("computeServergroupV2Resource", ComputeServergroupV2Args.builder()
        .computeServergroupV2Id("string")
        .name("string")
        .policies("string")
        .region("string")
        .valueSpecs(Map.of("string", "string"))
        .build());
    
    compute_servergroup_v2_resource = flexibleengine.ComputeServergroupV2("computeServergroupV2Resource",
        compute_servergroup_v2_id="string",
        name="string",
        policies=["string"],
        region="string",
        value_specs={
            "string": "string",
        })
    
    const computeServergroupV2Resource = new flexibleengine.ComputeServergroupV2("computeServergroupV2Resource", {
        computeServergroupV2Id: "string",
        name: "string",
        policies: ["string"],
        region: "string",
        valueSpecs: {
            string: "string",
        },
    });
    
    type: flexibleengine:ComputeServergroupV2
    properties:
        computeServergroupV2Id: string
        name: string
        policies:
            - string
        region: string
        valueSpecs:
            string: string
    

    ComputeServergroupV2 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 ComputeServergroupV2 resource accepts the following input properties:

    ComputeServergroupV2Id string
    Name string
    A unique name for the server group. Changing this creates a new server group.
    Policies List<string>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    ValueSpecs Dictionary<string, string>
    Map of additional options.
    ComputeServergroupV2Id string
    Name string
    A unique name for the server group. Changing this creates a new server group.
    Policies []string
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    ValueSpecs map[string]string
    Map of additional options.
    computeServergroupV2Id String
    name String
    A unique name for the server group. Changing this creates a new server group.
    policies List<String>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs Map<String,String>
    Map of additional options.
    computeServergroupV2Id string
    name string
    A unique name for the server group. Changing this creates a new server group.
    policies string[]
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs {[key: string]: string}
    Map of additional options.
    compute_servergroup_v2_id str
    name str
    A unique name for the server group. Changing this creates a new server group.
    policies Sequence[str]
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region str
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    value_specs Mapping[str, str]
    Map of additional options.
    computeServergroupV2Id String
    name String
    A unique name for the server group. Changing this creates a new server group.
    policies List<String>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs Map<String>
    Map of additional options.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputeServergroupV2 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Members List<string>
    The instances that are part of this server group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members []string
    The instances that are part of this server group.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    The instances that are part of this server group.
    id string
    The provider-assigned unique ID for this managed resource.
    members string[]
    The instances that are part of this server group.
    id str
    The provider-assigned unique ID for this managed resource.
    members Sequence[str]
    The instances that are part of this server group.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    The instances that are part of this server group.

    Look up Existing ComputeServergroupV2 Resource

    Get an existing ComputeServergroupV2 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?: ComputeServergroupV2State, opts?: CustomResourceOptions): ComputeServergroupV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute_servergroup_v2_id: Optional[str] = None,
            members: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            policies: Optional[Sequence[str]] = None,
            region: Optional[str] = None,
            value_specs: Optional[Mapping[str, str]] = None) -> ComputeServergroupV2
    func GetComputeServergroupV2(ctx *Context, name string, id IDInput, state *ComputeServergroupV2State, opts ...ResourceOption) (*ComputeServergroupV2, error)
    public static ComputeServergroupV2 Get(string name, Input<string> id, ComputeServergroupV2State? state, CustomResourceOptions? opts = null)
    public static ComputeServergroupV2 get(String name, Output<String> id, ComputeServergroupV2State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:ComputeServergroupV2    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.
    The following state arguments are supported:
    ComputeServergroupV2Id string
    Members List<string>
    The instances that are part of this server group.
    Name string
    A unique name for the server group. Changing this creates a new server group.
    Policies List<string>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    ValueSpecs Dictionary<string, string>
    Map of additional options.
    ComputeServergroupV2Id string
    Members []string
    The instances that are part of this server group.
    Name string
    A unique name for the server group. Changing this creates a new server group.
    Policies []string
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    ValueSpecs map[string]string
    Map of additional options.
    computeServergroupV2Id String
    members List<String>
    The instances that are part of this server group.
    name String
    A unique name for the server group. Changing this creates a new server group.
    policies List<String>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs Map<String,String>
    Map of additional options.
    computeServergroupV2Id string
    members string[]
    The instances that are part of this server group.
    name string
    A unique name for the server group. Changing this creates a new server group.
    policies string[]
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs {[key: string]: string}
    Map of additional options.
    compute_servergroup_v2_id str
    members Sequence[str]
    The instances that are part of this server group.
    name str
    A unique name for the server group. Changing this creates a new server group.
    policies Sequence[str]
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region str
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    value_specs Mapping[str, str]
    Map of additional options.
    computeServergroupV2Id String
    members List<String>
    The instances that are part of this server group.
    name String
    A unique name for the server group. Changing this creates a new server group.
    policies List<String>
    The set of policies for the server group. Only anti-affinity policy is supported right now, which menas all servers in this group must be deployed on different hosts. Changing this creates a new server group.
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.
    valueSpecs Map<String>
    Map of additional options.

    Import

    Server Groups can be imported using the id, e.g.

    $ pulumi import flexibleengine:index/computeServergroupV2:ComputeServergroupV2 test-sg 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud