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

# 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`;
Copy
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"
Copy
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
	})
}
Copy
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";

});
Copy
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);

    }
}
Copy
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
Copy

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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var profileResource = new Profile("profileResource", ProfileArgs.builder()
    .args("string")
    .containerLinuxConfig("string")
    .genericConfig("string")
    .initrds("string")
    .kernel("string")
    .name("string")
    .rawIgnition("string")
    .build());
Copy
profile_resource = matchbox.Profile("profileResource",
    args=["string"],
    container_linux_config="string",
    generic_config="string",
    initrds=["string"],
    kernel="string",
    name="string",
    raw_ignition="string")
Copy
const profileResource = new matchbox.Profile("profileResource", {
    args: ["string"],
    containerLinuxConfig: "string",
    genericConfig: "string",
    initrds: ["string"],
    kernel: "string",
    name: "string",
    rawIgnition: "string",
});
Copy
type: matchbox:Profile
properties:
    args:
        - string
    containerLinuxConfig: string
    genericConfig: string
    initrds:
        - string
    kernel: string
    name: string
    rawIgnition: string
Copy

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 Changes to this property will trigger replacement. List<string>
List of kernel arguments
ContainerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
GenericConfig Changes to this property will trigger replacement. string
Generic configuration
Initrds Changes to this property will trigger replacement. List<string>
List of URLs to init RAM filesystems
Kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
Name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
RawIgnition Changes to this property will trigger replacement. string
Args Changes to this property will trigger replacement. []string
List of kernel arguments
ContainerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
GenericConfig Changes to this property will trigger replacement. string
Generic configuration
Initrds Changes to this property will trigger replacement. []string
List of URLs to init RAM filesystems
Kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
Name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
RawIgnition Changes to this property will trigger replacement. string
args Changes to this property will trigger replacement. List<String>
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. String
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. String
Generic configuration
initrds Changes to this property will trigger replacement. List<String>
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. String
URL of the kernel image to boot
name Changes to this property will trigger replacement. String
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. String
args Changes to this property will trigger replacement. string[]
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. string
Generic configuration
initrds Changes to this property will trigger replacement. string[]
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. string
args Changes to this property will trigger replacement. Sequence[str]
List of kernel arguments
container_linux_config Changes to this property will trigger replacement. str
CoreOS Container Linux Config (CLC) (for backwards compatibility)
generic_config Changes to this property will trigger replacement. str
Generic configuration
initrds Changes to this property will trigger replacement. Sequence[str]
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. str
URL of the kernel image to boot
name Changes to this property will trigger replacement. str
Unqiue name for the machine matcher
raw_ignition Changes to this property will trigger replacement. str
args Changes to this property will trigger replacement. List<String>
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. String
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. String
Generic configuration
initrds Changes to this property will trigger replacement. List<String>
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. String
URL of the kernel image to boot
name Changes to this property will trigger replacement. String
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. 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)
resources:  _:    type: matchbox:Profile    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.
The following state arguments are supported:
Args Changes to this property will trigger replacement. List<string>
List of kernel arguments
ContainerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
GenericConfig Changes to this property will trigger replacement. string
Generic configuration
Initrds Changes to this property will trigger replacement. List<string>
List of URLs to init RAM filesystems
Kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
Name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
RawIgnition Changes to this property will trigger replacement. string
Args Changes to this property will trigger replacement. []string
List of kernel arguments
ContainerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
GenericConfig Changes to this property will trigger replacement. string
Generic configuration
Initrds Changes to this property will trigger replacement. []string
List of URLs to init RAM filesystems
Kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
Name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
RawIgnition Changes to this property will trigger replacement. string
args Changes to this property will trigger replacement. List<String>
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. String
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. String
Generic configuration
initrds Changes to this property will trigger replacement. List<String>
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. String
URL of the kernel image to boot
name Changes to this property will trigger replacement. String
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. String
args Changes to this property will trigger replacement. string[]
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. string
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. string
Generic configuration
initrds Changes to this property will trigger replacement. string[]
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. string
URL of the kernel image to boot
name Changes to this property will trigger replacement. string
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. string
args Changes to this property will trigger replacement. Sequence[str]
List of kernel arguments
container_linux_config Changes to this property will trigger replacement. str
CoreOS Container Linux Config (CLC) (for backwards compatibility)
generic_config Changes to this property will trigger replacement. str
Generic configuration
initrds Changes to this property will trigger replacement. Sequence[str]
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. str
URL of the kernel image to boot
name Changes to this property will trigger replacement. str
Unqiue name for the machine matcher
raw_ignition Changes to this property will trigger replacement. str
args Changes to this property will trigger replacement. List<String>
List of kernel arguments
containerLinuxConfig Changes to this property will trigger replacement. String
CoreOS Container Linux Config (CLC) (for backwards compatibility)
genericConfig Changes to this property will trigger replacement. String
Generic configuration
initrds Changes to this property will trigger replacement. List<String>
List of URLs to init RAM filesystems
kernel Changes to this property will trigger replacement. String
URL of the kernel image to boot
name Changes to this property will trigger replacement. String
Unqiue name for the machine matcher
rawIgnition Changes to this property will trigger replacement. String

Package Details

Repository
matchbox pulumiverse/pulumi-matchbox
License
Apache-2.0
Notes
This Pulumi package is based on the matchbox Terraform Provider.