opentelekomcloud.ComputeServergroupV2
Explore with Pulumi AI
Up-to-date reference of API arguments for ECS server group management you can get at documentation portal
Manages a V2 Server Group resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const test_sg = new opentelekomcloud.ComputeServergroupV2("test-sg", {policies: ["anti-affinity"]});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
test_sg = opentelekomcloud.ComputeServergroupV2("test-sg", policies=["anti-affinity"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.NewComputeServergroupV2(ctx, "test-sg", &opentelekomcloud.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 Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var test_sg = new Opentelekomcloud.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.opentelekomcloud.ComputeServergroupV2;
import com.pulumi.opentelekomcloud.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: opentelekomcloud:ComputeServergroupV2
properties:
policies:
- anti-affinity
Policies
anti-affinity
- All instances/servers launched in this group will be hosted on different compute nodes.
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: ComputeServergroupV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ComputeServergroupV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
policies: Optional[Sequence[str]] = None,
compute_servergroup_v2_id: Optional[str] = None,
name: Optional[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, CustomResourceOptions? opts = null)
public ComputeServergroupV2(String name, ComputeServergroupV2Args args)
public ComputeServergroupV2(String name, ComputeServergroupV2Args args, CustomResourceOptions options)
type: opentelekomcloud: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 Opentelekomcloud.ComputeServergroupV2("computeServergroupV2Resource", new()
{
Policies = new[]
{
"string",
},
ComputeServergroupV2Id = "string",
Name = "string",
Region = "string",
ValueSpecs =
{
{ "string", "string" },
},
});
example, err := opentelekomcloud.NewComputeServergroupV2(ctx, "computeServergroupV2Resource", &opentelekomcloud.ComputeServergroupV2Args{
Policies: pulumi.StringArray{
pulumi.String("string"),
},
ComputeServergroupV2Id: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var computeServergroupV2Resource = new ComputeServergroupV2("computeServergroupV2Resource", ComputeServergroupV2Args.builder()
.policies("string")
.computeServergroupV2Id("string")
.name("string")
.region("string")
.valueSpecs(Map.of("string", "string"))
.build());
compute_servergroup_v2_resource = opentelekomcloud.ComputeServergroupV2("computeServergroupV2Resource",
policies=["string"],
compute_servergroup_v2_id="string",
name="string",
region="string",
value_specs={
"string": "string",
})
const computeServergroupV2Resource = new opentelekomcloud.ComputeServergroupV2("computeServergroupV2Resource", {
policies: ["string"],
computeServergroupV2Id: "string",
name: "string",
region: "string",
valueSpecs: {
string: "string",
},
});
type: opentelekomcloud: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:
- Policies List<string>
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Compute
Servergroup stringV2Id - ID of the server group.
- Name string
- A unique name for the server group. Changing this creates a new server group.
- Region string
- Value
Specs Dictionary<string, string> - Map of additional options.
- Policies []string
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Compute
Servergroup stringV2Id - ID of the server group.
- Name string
- A unique name for the server group. Changing this creates a new server group.
- Region string
- Value
Specs map[string]string - Map of additional options.
- policies List<String>
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- compute
Servergroup StringV2Id - ID of the server group.
- name String
- A unique name for the server group. Changing this creates a new server group.
- region String
- value
Specs Map<String,String> - Map of additional options.
- policies string[]
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- compute
Servergroup stringV2Id - ID of the server group.
- name string
- A unique name for the server group. Changing this creates a new server group.
- region string
- value
Specs {[key: string]: string} - Map of additional options.
- policies Sequence[str]
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- compute_
servergroup_ strv2_ id - ID of the server group.
- name str
- A unique name for the server group. Changing this creates a new server group.
- region str
- value_
specs Mapping[str, str] - Map of additional options.
- policies List<String>
- The set of policies for the server group. Only two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- compute
Servergroup StringV2Id - ID of the server group.
- name String
- A unique name for the server group. Changing this creates a new server group.
- region String
- value
Specs 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:
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: opentelekomcloud: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.
- Compute
Servergroup stringV2Id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
- Value
Specs Dictionary<string, string> - Map of additional options.
- Compute
Servergroup stringV2Id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
- Value
Specs map[string]string - Map of additional options.
- compute
Servergroup StringV2Id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region String
- value
Specs Map<String,String> - Map of additional options.
- compute
Servergroup stringV2Id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region string
- value
Specs {[key: string]: string} - Map of additional options.
- compute_
servergroup_ strv2_ id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region str
- value_
specs Mapping[str, str] - Map of additional options.
- compute
Servergroup StringV2Id - ID of the server group.
- 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 two two policies are available right now, and both are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region String
- value
Specs Map<String> - Map of additional options.
Import
Server Groups can be imported using the id
, e.g.
$ pulumi import opentelekomcloud:index/computeServergroupV2:ComputeServergroupV2 test-sg 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.