ServerGroup
Manages a V2 Server Group resource within OpenStack.
Policies
affinity- All instances/servers launched in this group will be hosted on the same compute node.anti-affinity- All instances/servers launched in this group will be hosted on different compute nodes.soft-affinity- All instances/servers launched in this group will be hosted on the same compute node if possible, but if not possible they still will be scheduled instead of failure. To use this policy your OpenStack environment should support Compute service API 2.15 or above.soft-anti-affinity- All instances/servers launched in this group will be hosted on different compute nodes if possible, but if not possible they still will be scheduled instead of failure. To use this policy your OpenStack environment should support Compute service API 2.15 or above.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var test_sg = new OpenStack.Compute.ServerGroup("test-sg", new OpenStack.Compute.ServerGroupArgs
{
Policies =
{
"anti-affinity",
},
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
test_sg = openstack.compute.ServerGroup("test-sg", policies=["anti-affinity"])import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const test_sg = new openstack.compute.ServerGroup("test-sg", {
policies: ["anti-affinity"],
});Create a ServerGroup Resource
new ServerGroup(name: string, args?: ServerGroupArgs, opts?: CustomResourceOptions);def ServerGroup(resource_name, opts=None, name=None, policies=None, region=None, value_specs=None, __props__=None);func NewServerGroup(ctx *Context, name string, args *ServerGroupArgs, opts ...ResourceOption) (*ServerGroup, error)public ServerGroup(string name, ServerGroupArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ServerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ServerGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ServerGroup resource accepts the following input properties:
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- Value
Specs Dictionary<string, object> Map of additional options.
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- Value
Specs map[string]interface{} Map of additional options.
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- value
Specs {[key: string]: any} Map of additional options.
- name str
A unique name for the server group. Changing this creates a new server group.
- policies List[str]
The set of policies for the server group. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region str
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- value_
specs Dict[str, Any] Map of additional options.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerGroup 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.
Look up an Existing ServerGroup Resource
Get an existing ServerGroup 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?: ServerGroupState, opts?: CustomResourceOptions): ServerGroupstatic get(resource_name, id, opts=None, members=None, name=None, policies=None, region=None, value_specs=None, __props__=None);func GetServerGroup(ctx *Context, name string, id IDInput, state *ServerGroupState, opts ...ResourceOption) (*ServerGroup, error)public static ServerGroup Get(string name, Input<string> id, ServerGroupState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- Value
Specs Dictionary<string, object> Map of additional options.
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- Value
Specs map[string]interface{} Map of additional options.
- 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. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- value
Specs {[key: string]: any} Map of additional options.
- members List[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 List[str]
The set of policies for the server group. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.
- region str
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.- value_
specs Dict[str, Any] Map of additional options.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.