openstack.compute.AggregateV2
Explore with Pulumi AI
Manages a Host Aggregate within Openstack Nova.
Example Usage
Full example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var dellServers = new OpenStack.Compute.AggregateV2("dellServers", new()
{
Hosts = new[]
{
"myhost01.example.com",
"myhost02.example.com",
},
Metadata =
{
{ "cpus", "56" },
},
Region = "RegionOne",
Zone = "nova",
});
});
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewAggregateV2(ctx, "dellServers", &compute.AggregateV2Args{
Hosts: pulumi.StringArray{
pulumi.String("myhost01.example.com"),
pulumi.String("myhost02.example.com"),
},
Metadata: pulumi.StringMap{
"cpus": pulumi.String("56"),
},
Region: pulumi.String("RegionOne"),
Zone: pulumi.String("nova"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.AggregateV2;
import com.pulumi.openstack.compute.AggregateV2Args;
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 dellServers = new AggregateV2("dellServers", AggregateV2Args.builder()
.hosts(
"myhost01.example.com",
"myhost02.example.com")
.metadata(Map.of("cpus", "56"))
.region("RegionOne")
.zone("nova")
.build());
}
}
import pulumi
import pulumi_openstack as openstack
dell_servers = openstack.compute.AggregateV2("dellServers",
hosts=[
"myhost01.example.com",
"myhost02.example.com",
],
metadata={
"cpus": "56",
},
region="RegionOne",
zone="nova")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const dellServers = new openstack.compute.AggregateV2("dellServers", {
hosts: [
"myhost01.example.com",
"myhost02.example.com",
],
metadata: {
cpus: "56",
},
region: "RegionOne",
zone: "nova",
});
resources:
dellServers:
type: openstack:compute:AggregateV2
properties:
hosts:
- myhost01.example.com
- myhost02.example.com
metadata:
cpus: '56'
region: RegionOne
zone: nova
Minimum required example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var test = new OpenStack.Compute.AggregateV2("test");
});
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewAggregateV2(ctx, "test", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.AggregateV2;
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 = new AggregateV2("test");
}
}
import pulumi
import pulumi_openstack as openstack
test = openstack.compute.AggregateV2("test")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const test = new openstack.compute.AggregateV2("test", {});
resources:
test:
type: openstack:compute:AggregateV2
Create AggregateV2 Resource
new AggregateV2(name: string, args?: AggregateV2Args, opts?: CustomResourceOptions);
@overload
def AggregateV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
hosts: Optional[Sequence[str]] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
region: Optional[str] = None,
zone: Optional[str] = None)
@overload
def AggregateV2(resource_name: str,
args: Optional[AggregateV2Args] = None,
opts: Optional[ResourceOptions] = None)
func NewAggregateV2(ctx *Context, name string, args *AggregateV2Args, opts ...ResourceOption) (*AggregateV2, error)
public AggregateV2(string name, AggregateV2Args? args = null, CustomResourceOptions? opts = null)
public AggregateV2(String name, AggregateV2Args args)
public AggregateV2(String name, AggregateV2Args args, CustomResourceOptions options)
type: openstack:compute:AggregateV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AggregateV2Args
- 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 AggregateV2Args
- 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 AggregateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AggregateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AggregateV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AggregateV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AggregateV2 resource accepts the following input properties:
- Hosts List<string>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- Metadata Dictionary<string, string>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- Name string
- The name of the Host Aggregate
- Region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - Zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- Hosts []string
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- Metadata map[string]string
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- Name string
- The name of the Host Aggregate
- Region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - Zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts List<String>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Map<String,String>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name String
- The name of the Host Aggregate
- region String
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone String
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts string[]
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata {[key: string]: string}
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name string
- The name of the Host Aggregate
- region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts Sequence[str]
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Mapping[str, str]
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name str
- The name of the Host Aggregate
- region str
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone str
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts List<String>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Map<String>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name String
- The name of the Host Aggregate
- region String
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone String
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the AggregateV2 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 AggregateV2 Resource
Get an existing AggregateV2 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?: AggregateV2State, opts?: CustomResourceOptions): AggregateV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
hosts: Optional[Sequence[str]] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
region: Optional[str] = None,
zone: Optional[str] = None) -> AggregateV2
func GetAggregateV2(ctx *Context, name string, id IDInput, state *AggregateV2State, opts ...ResourceOption) (*AggregateV2, error)
public static AggregateV2 Get(string name, Input<string> id, AggregateV2State? state, CustomResourceOptions? opts = null)
public static AggregateV2 get(String name, Output<String> id, AggregateV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Hosts List<string>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- Metadata Dictionary<string, string>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- Name string
- The name of the Host Aggregate
- Region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - Zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- Hosts []string
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- Metadata map[string]string
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- Name string
- The name of the Host Aggregate
- Region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - Zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts List<String>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Map<String,String>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name String
- The name of the Host Aggregate
- region String
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone String
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts string[]
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata {[key: string]: string}
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name string
- The name of the Host Aggregate
- region string
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone string
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts Sequence[str]
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Mapping[str, str]
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name str
- The name of the Host Aggregate
- region str
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone str
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
- hosts List<String>
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
- metadata Map<String>
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
- name String
- The name of the Host Aggregate
- region String
- The region in which to create the Host Aggregate. If
omitted, the
region
argument of the provider is used. Changing this creates a new Host Aggregate. - zone String
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
Import
You can import an existing Host Aggregate by their ID.
$ pulumi import openstack:compute/aggregateV2:AggregateV2 myaggregate 24
The ID can be obtained with an openstack command$ openstack aggregate list +—-+——+——————-+ | ID | Name | Availability Zone | +—-+——+——————-+ | 59 | test | None
| +—-+——+——————-+
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.