openstack.compute.AggregateV2
Explore with Pulumi AI
Manages a Host Aggregate within Openstack Nova.
Example Usage
Full example
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const dellServers = new openstack.compute.AggregateV2("dell_servers", {
region: "RegionOne",
name: "dell_servers",
zone: "nova",
metadata: {
cpus: "56",
},
hosts: [
"myhost01.example.com",
"myhost02.example.com",
],
});
import pulumi
import pulumi_openstack as openstack
dell_servers = openstack.compute.AggregateV2("dell_servers",
region="RegionOne",
name="dell_servers",
zone="nova",
metadata={
"cpus": "56",
},
hosts=[
"myhost01.example.com",
"myhost02.example.com",
])
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewAggregateV2(ctx, "dell_servers", &compute.AggregateV2Args{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("dell_servers"),
Zone: pulumi.String("nova"),
Metadata: pulumi.StringMap{
"cpus": pulumi.String("56"),
},
Hosts: pulumi.StringArray{
pulumi.String("myhost01.example.com"),
pulumi.String("myhost02.example.com"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var dellServers = new OpenStack.Compute.AggregateV2("dell_servers", new()
{
Region = "RegionOne",
Name = "dell_servers",
Zone = "nova",
Metadata =
{
{ "cpus", "56" },
},
Hosts = new[]
{
"myhost01.example.com",
"myhost02.example.com",
},
});
});
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()
.region("RegionOne")
.name("dell_servers")
.zone("nova")
.metadata(Map.of("cpus", "56"))
.hosts(
"myhost01.example.com",
"myhost02.example.com")
.build());
}
}
resources:
dellServers:
type: openstack:compute:AggregateV2
name: dell_servers
properties:
region: RegionOne
name: dell_servers
zone: nova
metadata:
cpus: '56'
hosts:
- myhost01.example.com
- myhost02.example.com
Minimum required example
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const test = new openstack.compute.AggregateV2("test", {name: "test"});
import pulumi
import pulumi_openstack as openstack
test = openstack.compute.AggregateV2("test", name="test")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/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", &compute.AggregateV2Args{
Name: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var test = new OpenStack.Compute.AggregateV2("test", new()
{
Name = "test",
});
});
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 test = new AggregateV2("test", AggregateV2Args.builder()
.name("test")
.build());
}
}
resources:
test:
type: openstack:compute:AggregateV2
properties:
name: test
Create AggregateV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AggregateV2(name: string, args?: AggregateV2Args, opts?: CustomResourceOptions);
@overload
def AggregateV2(resource_name: str,
args: Optional[AggregateV2Args] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var aggregateV2Resource = new OpenStack.Compute.AggregateV2("aggregateV2Resource", new()
{
Hosts = new[]
{
"string",
},
Metadata =
{
{ "string", "string" },
},
Name = "string",
Region = "string",
Zone = "string",
});
example, err := compute.NewAggregateV2(ctx, "aggregateV2Resource", &compute.AggregateV2Args{
Hosts: pulumi.StringArray{
pulumi.String("string"),
},
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Zone: pulumi.String("string"),
})
var aggregateV2Resource = new AggregateV2("aggregateV2Resource", AggregateV2Args.builder()
.hosts("string")
.metadata(Map.of("string", "string"))
.name("string")
.region("string")
.zone("string")
.build());
aggregate_v2_resource = openstack.compute.AggregateV2("aggregateV2Resource",
hosts=["string"],
metadata={
"string": "string",
},
name="string",
region="string",
zone="string")
const aggregateV2Resource = new openstack.compute.AggregateV2("aggregateV2Resource", {
hosts: ["string"],
metadata: {
string: "string",
},
name: "string",
region: "string",
zone: "string",
});
type: openstack:compute:AggregateV2
properties:
hosts:
- string
metadata:
string: string
name: string
region: string
zone: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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 |
+—-+——+——————-+
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.