matchbox.Group
Explore with Pulumi AI
# Group Resource
A Group matches (one or more) machines and declares a machine should be boot with a named profile
.
import * as pulumi from "@pulumi/pulumi";
import * as matchbox from "@pulumiverse/matchbox";
const node1 = new matchbox.Group("node1", {
metadata: {
custom_variable: "machine_specific_value_here",
},
profile: matchbox_profile.myprofile.name,
selector: {
mac: "52:54:00:a1:9c:ae",
},
});
import pulumi
import pulumiverse_matchbox as matchbox
node1 = matchbox.Group("node1",
metadata={
"custom_variable": "machine_specific_value_here",
},
profile=matchbox_profile["myprofile"]["name"],
selector={
"mac": "52:54:00:a1:9c:ae",
})
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-matchbox/sdk/go/matchbox"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := matchbox.NewGroup(ctx, "node1", &matchbox.GroupArgs{
Metadata: pulumi.StringMap{
"custom_variable": pulumi.String("machine_specific_value_here"),
},
Profile: pulumi.Any(matchbox_profile.Myprofile.Name),
Selector: pulumi.StringMap{
"mac": pulumi.String("52:54:00:a1:9c:ae"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Matchbox = Pulumiverse.Matchbox;
return await Deployment.RunAsync(() =>
{
var node1 = new Matchbox.Group("node1", new()
{
Metadata =
{
{ "custom_variable", "machine_specific_value_here" },
},
Profile = matchbox_profile.Myprofile.Name,
Selector =
{
{ "mac", "52:54:00:a1:9c:ae" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.matchbox.Group;
import com.pulumi.matchbox.GroupArgs;
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 node1 = new Group("node1", GroupArgs.builder()
.metadata(Map.of("custom_variable", "machine_specific_value_here"))
.profile(matchbox_profile.myprofile().name())
.selector(Map.of("mac", "52:54:00:a1:9c:ae"))
.build());
}
}
resources:
node1:
type: matchbox:Group
properties:
metadata:
custom_variable: machine_specific_value_here
profile: ${matchbox_profile.myprofile.name}
selector:
mac: 52:54:00:a1:9c:ae
Create Group Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
@overload
def Group(resource_name: str,
args: GroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Group(resource_name: str,
opts: Optional[ResourceOptions] = None,
profile: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
selector: Optional[Mapping[str, str]] = None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
type: matchbox:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. GroupArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. GroupArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. GroupArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. GroupArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. GroupArgs - 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 groupResource = new Matchbox.Group("groupResource", new()
{
Profile = "string",
Metadata =
{
{ "string", "string" },
},
Name = "string",
Selector =
{
{ "string", "string" },
},
});
example, err := matchbox.NewGroup(ctx, "groupResource", &matchbox.GroupArgs{
Profile: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Selector: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var groupResource = new Group("groupResource", GroupArgs.builder()
.profile("string")
.metadata(Map.of("string", "string"))
.name("string")
.selector(Map.of("string", "string"))
.build());
group_resource = matchbox.Group("groupResource",
profile="string",
metadata={
"string": "string",
},
name="string",
selector={
"string": "string",
})
const groupResource = new matchbox.Group("groupResource", {
profile: "string",
metadata: {
string: "string",
},
name: "string",
selector: {
string: "string",
},
});
type: matchbox:Group
properties:
metadata:
string: string
name: string
profile: string
selector:
string: string
Group 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 Group resource accepts the following input properties:
- Profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- Metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- Name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- Selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- Profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- Metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- Name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- Selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- profile
This property is required. Changes to this property will trigger replacement.
- Name of a Matchbox profile
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
Outputs
All input properties are implicitly available as output properties. Additionally, the Group 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 Group Resource
Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
profile: Optional[str] = None,
selector: Optional[Mapping[str, str]] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
resources: _: type: matchbox:Group get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- Name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- Profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- Selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- Metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- Name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- Profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- Selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
- metadata
Changes to this property will trigger replacement.
- Map of group metadata (optional, seldom used)
- name
Changes to this property will trigger replacement.
- Unqiue name for the machine matcher
- profile
Changes to this property will trigger replacement.
- Name of a Matchbox profile
- selector
Changes to this property will trigger replacement.
- Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
Package Details
- Repository
- matchbox pulumiverse/pulumi-matchbox
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
matchbox
Terraform Provider.