1. Packages
  2. Libvirt Provider
  3. API Docs
  4. Ignition
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
libvirt logo
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar

    Generates an Ignition configuration file for CoreOS/Fedora CoreOS systems.

    Ignition is a provisioning tool that reads a configuration file and provisions the machine accordingly on first boot. This resource generates the Ignition file that can be uploaded to a volume and provided to the virtual machine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as libvirt from "@pulumi/libvirt";
    
    const fcos = new libvirt.Ignition("fcos", {
        name: "fcos-ignition",
        content: fcosIgnitionConfig.rendered,
    });
    const ignition = new libvirt.Volume("ignition", {
        name: "fcos-ignition.ign",
        pool: "default",
        format: "raw",
        create: {
            content: {
                url: fcos.path,
            },
        },
    });
    
    import pulumi
    import pulumi_libvirt as libvirt
    
    fcos = libvirt.Ignition("fcos",
        name="fcos-ignition",
        content=fcos_ignition_config["rendered"])
    ignition = libvirt.Volume("ignition",
        name="fcos-ignition.ign",
        pool="default",
        format="raw",
        create={
            "content": {
                "url": fcos.path,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fcos, err := libvirt.NewIgnition(ctx, "fcos", &libvirt.IgnitionArgs{
    			Name:    pulumi.String("fcos-ignition"),
    			Content: pulumi.Any(fcosIgnitionConfig.Rendered),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = libvirt.NewVolume(ctx, "ignition", &libvirt.VolumeArgs{
    			Name:   pulumi.String("fcos-ignition.ign"),
    			Pool:   pulumi.String("default"),
    			Format: pulumi.String("raw"),
    			Create: &libvirt.VolumeCreateArgs{
    				Content: &libvirt.VolumeCreateContentArgs{
    					Url: fcos.Path,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Libvirt = Pulumi.Libvirt;
    
    return await Deployment.RunAsync(() => 
    {
        var fcos = new Libvirt.Ignition("fcos", new()
        {
            Name = "fcos-ignition",
            Content = fcosIgnitionConfig.Rendered,
        });
    
        var ignition = new Libvirt.Volume("ignition", new()
        {
            Name = "fcos-ignition.ign",
            Pool = "default",
            Format = "raw",
            Create = new Libvirt.Inputs.VolumeCreateArgs
            {
                Content = new Libvirt.Inputs.VolumeCreateContentArgs
                {
                    Url = fcos.Path,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.libvirt.Ignition;
    import com.pulumi.libvirt.IgnitionArgs;
    import com.pulumi.libvirt.Volume;
    import com.pulumi.libvirt.VolumeArgs;
    import com.pulumi.libvirt.inputs.VolumeCreateArgs;
    import com.pulumi.libvirt.inputs.VolumeCreateContentArgs;
    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 fcos = new Ignition("fcos", IgnitionArgs.builder()
                .name("fcos-ignition")
                .content(fcosIgnitionConfig.rendered())
                .build());
    
            var ignition = new Volume("ignition", VolumeArgs.builder()
                .name("fcos-ignition.ign")
                .pool("default")
                .format("raw")
                .create(VolumeCreateArgs.builder()
                    .content(VolumeCreateContentArgs.builder()
                        .url(fcos.path())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      fcos:
        type: libvirt:Ignition
        properties:
          name: fcos-ignition
          content: ${fcosIgnitionConfig.rendered}
      ignition:
        type: libvirt:Volume
        properties:
          name: fcos-ignition.ign
          pool: default
          format: raw
          create:
            content:
              url: ${fcos.path}
    

    See the Ignition documentation for configuration details.

    Create Ignition Resource

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

    Constructor syntax

    new Ignition(name: string, args: IgnitionArgs, opts?: CustomResourceOptions);
    @overload
    def Ignition(resource_name: str,
                 args: IgnitionArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ignition(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 content: Optional[str] = None,
                 name: Optional[str] = None)
    func NewIgnition(ctx *Context, name string, args IgnitionArgs, opts ...ResourceOption) (*Ignition, error)
    public Ignition(string name, IgnitionArgs args, CustomResourceOptions? opts = null)
    public Ignition(String name, IgnitionArgs args)
    public Ignition(String name, IgnitionArgs args, CustomResourceOptions options)
    
    type: libvirt:Ignition
    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 IgnitionArgs
    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 IgnitionArgs
    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 IgnitionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IgnitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IgnitionArgs
    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 ignitionResource = new Libvirt.Ignition("ignitionResource", new()
    {
        Content = "string",
        Name = "string",
    });
    
    example, err := libvirt.NewIgnition(ctx, "ignitionResource", &libvirt.IgnitionArgs{
    	Content: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var ignitionResource = new Ignition("ignitionResource", IgnitionArgs.builder()
        .content("string")
        .name("string")
        .build());
    
    ignition_resource = libvirt.Ignition("ignitionResource",
        content="string",
        name="string")
    
    const ignitionResource = new libvirt.Ignition("ignitionResource", {
        content: "string",
        name: "string",
    });
    
    type: libvirt:Ignition
    properties:
        content: string
        name: string
    

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

    Content string
    Ignition configuration content (JSON)
    Name string
    Name for this ignition resource
    Content string
    Ignition configuration content (JSON)
    Name string
    Name for this ignition resource
    content String
    Ignition configuration content (JSON)
    name String
    Name for this ignition resource
    content string
    Ignition configuration content (JSON)
    name string
    Name for this ignition resource
    content str
    Ignition configuration content (JSON)
    name str
    Name for this ignition resource
    content String
    Ignition configuration content (JSON)
    name String
    Name for this ignition resource

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ignition resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    Full path to the generated ignition file
    Size double
    Size of the file in bytes
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    Full path to the generated ignition file
    Size float64
    Size of the file in bytes
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    Full path to the generated ignition file
    size Double
    Size of the file in bytes
    id string
    The provider-assigned unique ID for this managed resource.
    path string
    Full path to the generated ignition file
    size number
    Size of the file in bytes
    id str
    The provider-assigned unique ID for this managed resource.
    path str
    Full path to the generated ignition file
    size float
    Size of the file in bytes
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    Full path to the generated ignition file
    size Number
    Size of the file in bytes

    Look up Existing Ignition Resource

    Get an existing Ignition 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?: IgnitionState, opts?: CustomResourceOptions): Ignition
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            name: Optional[str] = None,
            path: Optional[str] = None,
            size: Optional[float] = None) -> Ignition
    func GetIgnition(ctx *Context, name string, id IDInput, state *IgnitionState, opts ...ResourceOption) (*Ignition, error)
    public static Ignition Get(string name, Input<string> id, IgnitionState? state, CustomResourceOptions? opts = null)
    public static Ignition get(String name, Output<String> id, IgnitionState state, CustomResourceOptions options)
    resources:  _:    type: libvirt:Ignition    get:      id: ${id}
    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:
    Content string
    Ignition configuration content (JSON)
    Name string
    Name for this ignition resource
    Path string
    Full path to the generated ignition file
    Size double
    Size of the file in bytes
    Content string
    Ignition configuration content (JSON)
    Name string
    Name for this ignition resource
    Path string
    Full path to the generated ignition file
    Size float64
    Size of the file in bytes
    content String
    Ignition configuration content (JSON)
    name String
    Name for this ignition resource
    path String
    Full path to the generated ignition file
    size Double
    Size of the file in bytes
    content string
    Ignition configuration content (JSON)
    name string
    Name for this ignition resource
    path string
    Full path to the generated ignition file
    size number
    Size of the file in bytes
    content str
    Ignition configuration content (JSON)
    name str
    Name for this ignition resource
    path str
    Full path to the generated ignition file
    size float
    Size of the file in bytes
    content String
    Ignition configuration content (JSON)
    name String
    Name for this ignition resource
    path String
    Full path to the generated ignition file
    size Number
    Size of the file in bytes

    Package Details

    Repository
    libvirt dmacvicar/terraform-provider-libvirt
    License
    Notes
    This Pulumi package is based on the libvirt Terraform Provider.
    libvirt logo
    libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
      Meet Neo: Your AI Platform Teammate