1. Packages
  2. Matchbox
  3. API Docs
  4. Profile
Matchbox v0.2.0 published on Friday, Oct 11, 2024 by Pulumiverse

matchbox.Profile

Explore with Pulumi AI

matchbox logo
Matchbox v0.2.0 published on Friday, Oct 11, 2024 by Pulumiverse

    # Profile Resource

    A Profile defines network boot and declarative provisioning configurations.

    import * as pulumi from "@pulumi/pulumi";
    
    const config = new pulumi.Config();
    const osStream = config.get("osStream") || "stable";
    const osVersion = config.require("osVersion");
    const kernel = `https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-live-kernel-x86_64`;
    const initrd = `https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-live-initramfs.x86_64.img`;
    
    import pulumi
    
    config = pulumi.Config()
    os_stream = config.get("osStream")
    if os_stream is None:
        os_stream = "stable"
    os_version = config.require("osVersion")
    kernel = f"https://builds.coreos.fedoraproject.org/prod/streams/{os_stream}/builds/{os_version}/x86_64/fedora-coreos-{os_version}-live-kernel-x86_64"
    initrd = f"https://builds.coreos.fedoraproject.org/prod/streams/{os_stream}/builds/{os_version}/x86_64/fedora-coreos-{os_version}-live-initramfs.x86_64.img"
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		osStream := "stable"
    		if param := cfg.Get("osStream"); param != "" {
    			osStream = param
    		}
    		osVersion := cfg.Require("osVersion")
    		_ := fmt.Sprintf("https://builds.coreos.fedoraproject.org/prod/streams/%v/builds/%v/x86_64/fedora-coreos-%v-live-kernel-x86_64", osStream, osVersion, osVersion)
    		_ := fmt.Sprintf("https://builds.coreos.fedoraproject.org/prod/streams/%v/builds/%v/x86_64/fedora-coreos-%v-live-initramfs.x86_64.img", osStream, osVersion, osVersion)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var osStream = config.Get("osStream") ?? "stable";
        var osVersion = config.Require("osVersion");
        var kernel = $"https://builds.coreos.fedoraproject.org/prod/streams/{osStream}/builds/{osVersion}/x86_64/fedora-coreos-{osVersion}-live-kernel-x86_64";
    
        var initrd = $"https://builds.coreos.fedoraproject.org/prod/streams/{osStream}/builds/{osVersion}/x86_64/fedora-coreos-{osVersion}-live-initramfs.x86_64.img";
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
            final var config = ctx.config();
            final var osStream = config.get("osStream").orElse("stable");
            final var osVersion = config.get("osVersion");
            final var kernel = String.format("https://builds.coreos.fedoraproject.org/prod/streams/%s/builds/%s/x86_64/fedora-coreos-%s-live-kernel-x86_64", osStream,osVersion,osVersion);
    
            final var initrd = String.format("https://builds.coreos.fedoraproject.org/prod/streams/%s/builds/%s/x86_64/fedora-coreos-%s-live-initramfs.x86_64.img", osStream,osVersion,osVersion);
    
        }
    }
    
    configuration:
      osStream:
        type: string
        default: stable
      osVersion:
        type: string
    variables:
      kernel: https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-live-kernel-x86_64
      initrd: https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-live-initramfs.x86_64.img
    

    Create Profile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Profile(name: string, args?: ProfileArgs, opts?: CustomResourceOptions);
    @overload
    def Profile(resource_name: str,
                args: Optional[ProfileArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Profile(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                args: Optional[Sequence[str]] = None,
                container_linux_config: Optional[str] = None,
                generic_config: Optional[str] = None,
                initrds: Optional[Sequence[str]] = None,
                kernel: Optional[str] = None,
                name: Optional[str] = None,
                raw_ignition: Optional[str] = None)
    func NewProfile(ctx *Context, name string, args *ProfileArgs, opts ...ResourceOption) (*Profile, error)
    public Profile(string name, ProfileArgs? args = null, CustomResourceOptions? opts = null)
    public Profile(String name, ProfileArgs args)
    public Profile(String name, ProfileArgs args, CustomResourceOptions options)
    
    type: matchbox:Profile
    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 ProfileArgs
    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 ProfileArgs
    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 ProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProfileArgs
    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 profileResource = new Matchbox.Profile("profileResource", new()
    {
        Args = new[]
        {
            "string",
        },
        ContainerLinuxConfig = "string",
        GenericConfig = "string",
        Initrds = new[]
        {
            "string",
        },
        Kernel = "string",
        Name = "string",
        RawIgnition = "string",
    });
    
    example, err := matchbox.NewProfile(ctx, "profileResource", &matchbox.ProfileArgs{
    	Args: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ContainerLinuxConfig: pulumi.String("string"),
    	GenericConfig:        pulumi.String("string"),
    	Initrds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Kernel:      pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	RawIgnition: pulumi.String("string"),
    })
    
    var profileResource = new Profile("profileResource", ProfileArgs.builder()
        .args("string")
        .containerLinuxConfig("string")
        .genericConfig("string")
        .initrds("string")
        .kernel("string")
        .name("string")
        .rawIgnition("string")
        .build());
    
    profile_resource = matchbox.Profile("profileResource",
        args=["string"],
        container_linux_config="string",
        generic_config="string",
        initrds=["string"],
        kernel="string",
        name="string",
        raw_ignition="string")
    
    const profileResource = new matchbox.Profile("profileResource", {
        args: ["string"],
        containerLinuxConfig: "string",
        genericConfig: "string",
        initrds: ["string"],
        kernel: "string",
        name: "string",
        rawIgnition: "string",
    });
    
    type: matchbox:Profile
    properties:
        args:
            - string
        containerLinuxConfig: string
        genericConfig: string
        initrds:
            - string
        kernel: string
        name: string
        rawIgnition: string
    

    Profile 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 Profile resource accepts the following input properties:

    Args List<string>
    List of kernel arguments
    ContainerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    GenericConfig string
    Generic configuration
    Initrds List<string>
    List of URLs to init RAM filesystems
    Kernel string
    URL of the kernel image to boot
    Name string
    Unqiue name for the machine matcher
    RawIgnition string
    Args []string
    List of kernel arguments
    ContainerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    GenericConfig string
    Generic configuration
    Initrds []string
    List of URLs to init RAM filesystems
    Kernel string
    URL of the kernel image to boot
    Name string
    Unqiue name for the machine matcher
    RawIgnition string
    args List<String>
    List of kernel arguments
    containerLinuxConfig String
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig String
    Generic configuration
    initrds List<String>
    List of URLs to init RAM filesystems
    kernel String
    URL of the kernel image to boot
    name String
    Unqiue name for the machine matcher
    rawIgnition String
    args string[]
    List of kernel arguments
    containerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig string
    Generic configuration
    initrds string[]
    List of URLs to init RAM filesystems
    kernel string
    URL of the kernel image to boot
    name string
    Unqiue name for the machine matcher
    rawIgnition string
    args Sequence[str]
    List of kernel arguments
    container_linux_config str
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    generic_config str
    Generic configuration
    initrds Sequence[str]
    List of URLs to init RAM filesystems
    kernel str
    URL of the kernel image to boot
    name str
    Unqiue name for the machine matcher
    raw_ignition str
    args List<String>
    List of kernel arguments
    containerLinuxConfig String
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig String
    Generic configuration
    initrds List<String>
    List of URLs to init RAM filesystems
    kernel String
    URL of the kernel image to boot
    name String
    Unqiue name for the machine matcher
    rawIgnition String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Profile 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 Profile Resource

    Get an existing Profile 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?: ProfileState, opts?: CustomResourceOptions): Profile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            args: Optional[Sequence[str]] = None,
            container_linux_config: Optional[str] = None,
            generic_config: Optional[str] = None,
            initrds: Optional[Sequence[str]] = None,
            kernel: Optional[str] = None,
            name: Optional[str] = None,
            raw_ignition: Optional[str] = None) -> Profile
    func GetProfile(ctx *Context, name string, id IDInput, state *ProfileState, opts ...ResourceOption) (*Profile, error)
    public static Profile Get(string name, Input<string> id, ProfileState? state, CustomResourceOptions? opts = null)
    public static Profile get(String name, Output<String> id, ProfileState 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:
    Args List<string>
    List of kernel arguments
    ContainerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    GenericConfig string
    Generic configuration
    Initrds List<string>
    List of URLs to init RAM filesystems
    Kernel string
    URL of the kernel image to boot
    Name string
    Unqiue name for the machine matcher
    RawIgnition string
    Args []string
    List of kernel arguments
    ContainerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    GenericConfig string
    Generic configuration
    Initrds []string
    List of URLs to init RAM filesystems
    Kernel string
    URL of the kernel image to boot
    Name string
    Unqiue name for the machine matcher
    RawIgnition string
    args List<String>
    List of kernel arguments
    containerLinuxConfig String
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig String
    Generic configuration
    initrds List<String>
    List of URLs to init RAM filesystems
    kernel String
    URL of the kernel image to boot
    name String
    Unqiue name for the machine matcher
    rawIgnition String
    args string[]
    List of kernel arguments
    containerLinuxConfig string
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig string
    Generic configuration
    initrds string[]
    List of URLs to init RAM filesystems
    kernel string
    URL of the kernel image to boot
    name string
    Unqiue name for the machine matcher
    rawIgnition string
    args Sequence[str]
    List of kernel arguments
    container_linux_config str
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    generic_config str
    Generic configuration
    initrds Sequence[str]
    List of URLs to init RAM filesystems
    kernel str
    URL of the kernel image to boot
    name str
    Unqiue name for the machine matcher
    raw_ignition str
    args List<String>
    List of kernel arguments
    containerLinuxConfig String
    CoreOS Container Linux Config (CLC) (for backwards compatibility)
    genericConfig String
    Generic configuration
    initrds List<String>
    List of URLs to init RAM filesystems
    kernel String
    URL of the kernel image to boot
    name String
    Unqiue name for the machine matcher
    rawIgnition String

    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.2.0 published on Friday, Oct 11, 2024 by Pulumiverse