1. Packages
  2. Matchbox
  3. API Docs
  4. Group
Matchbox v0.1.8 published on Monday, Sep 25, 2023 by Pulumiverse

matchbox.Group

Explore with Pulumi AI

matchbox logo
Matchbox v0.1.8 published on Monday, Sep 25, 2023 by Pulumiverse

    # 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",
        })
    
    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 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.AnyMap{
    				"custom_variable": pulumi.Any("machine_specific_value_here"),
    			},
    			Profile: pulumi.Any(matchbox_profile.Myprofile.Name),
    			Selector: pulumi.AnyMap{
    				"mac": pulumi.Any("52:54:00:a1:9c:ae"),
    			},
    		})
    		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.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, Any]] = None,
              name: Optional[str] = None,
              selector: Optional[Mapping[str, Any]] = None)
    func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
    public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
    public Group(String name, GroupArgs args)
    public Group(String name, GroupArgs args, CustomResourceOptions options)
    
    type: matchbox:Group
    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 GroupArgs
    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 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 string
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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", "any" },
        },
        Name = "string",
        Selector = 
        {
            { "string", "any" },
        },
    });
    
    example, err := matchbox.NewGroup(ctx, "groupResource", &matchbox.GroupArgs{
    	Profile: pulumi.String("string"),
    	Metadata: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name: pulumi.String("string"),
    	Selector: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var groupResource = new Group("groupResource", GroupArgs.builder()
        .profile("string")
        .metadata(Map.of("string", "any"))
        .name("string")
        .selector(Map.of("string", "any"))
        .build());
    
    group_resource = matchbox.Group("groupResource",
        profile="string",
        metadata={
            "string": "any",
        },
        name="string",
        selector={
            "string": "any",
        })
    
    const groupResource = new matchbox.Group("groupResource", {
        profile: "string",
        metadata: {
            string: "any",
        },
        name: "string",
        selector: {
            string: "any",
        },
    });
    
    type: matchbox:Group
    properties:
        metadata:
            string: any
        name: string
        profile: string
        selector:
            string: any
    

    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

    The Group resource accepts the following input properties:

    Profile string
    Name of a Matchbox profile
    Metadata Dictionary<string, object>
    Map of group metadata (optional, seldom used)
    Name string
    Unqiue name for the machine matcher
    Selector Dictionary<string, object>
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    Profile string
    Name of a Matchbox profile
    Metadata map[string]interface{}
    Map of group metadata (optional, seldom used)
    Name string
    Unqiue name for the machine matcher
    Selector map[string]interface{}
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    profile String
    Name of a Matchbox profile
    metadata Map<String,Object>
    Map of group metadata (optional, seldom used)
    name String
    Unqiue name for the machine matcher
    selector Map<String,Object>
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    profile string
    Name of a Matchbox profile
    metadata {[key: string]: any}
    Map of group metadata (optional, seldom used)
    name string
    Unqiue name for the machine matcher
    selector {[key: string]: any}
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    profile str
    Name of a Matchbox profile
    metadata Mapping[str, Any]
    Map of group metadata (optional, seldom used)
    name str
    Unqiue name for the machine matcher
    selector Mapping[str, Any]
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    profile String
    Name of a Matchbox profile
    metadata Map<Any>
    Map of group metadata (optional, seldom used)
    name String
    Unqiue name for the machine matcher
    selector Map<Any>
    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, Any]] = None,
            name: Optional[str] = None,
            profile: Optional[str] = None,
            selector: Optional[Mapping[str, Any]] = 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)
    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.
    The following state arguments are supported:
    Metadata Dictionary<string, object>
    Map of group metadata (optional, seldom used)
    Name string
    Unqiue name for the machine matcher
    Profile string
    Name of a Matchbox profile
    Selector Dictionary<string, object>
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    Metadata map[string]interface{}
    Map of group metadata (optional, seldom used)
    Name string
    Unqiue name for the machine matcher
    Profile string
    Name of a Matchbox profile
    Selector map[string]interface{}
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    metadata Map<String,Object>
    Map of group metadata (optional, seldom used)
    name String
    Unqiue name for the machine matcher
    profile String
    Name of a Matchbox profile
    selector Map<String,Object>
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    metadata {[key: string]: any}
    Map of group metadata (optional, seldom used)
    name string
    Unqiue name for the machine matcher
    profile string
    Name of a Matchbox profile
    selector {[key: string]: any}
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    metadata Mapping[str, Any]
    Map of group metadata (optional, seldom used)
    name str
    Unqiue name for the machine matcher
    profile str
    Name of a Matchbox profile
    selector Mapping[str, Any]
    Map of hardware machine selectors. See reserved selectors. An empty selector becomes a global default group that matches machines.
    metadata Map<Any>
    Map of group metadata (optional, seldom used)
    name String
    Unqiue name for the machine matcher
    profile String
    Name of a Matchbox profile
    selector Map<Any>
    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.
    matchbox logo
    Matchbox v0.1.8 published on Monday, Sep 25, 2023 by Pulumiverse