1. Packages
  2. Libvirt Provider
  3. API Docs
  4. Combustion
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 a Combustion script file for openSUSE MicroOS/Elemental systems.

    Combustion is a minimal provisioning framework that runs shell scripts on first boot. This resource generates the script 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 microos = new libvirt.Combustion("microos", {
        name: "microos-combustion",
        content: `#!/bin/bash
    # combustion: network
    echo \\"root:password\\" | chpasswd
    systemctl enable sshd
    `,
    });
    const combustion = new libvirt.Volume("combustion", {
        name: "microos-combustion.sh",
        pool: "default",
        format: "raw",
        create: {
            content: {
                url: microos.path,
            },
        },
    });
    
    import pulumi
    import pulumi_libvirt as libvirt
    
    microos = libvirt.Combustion("microos",
        name="microos-combustion",
        content="""#!/bin/bash
    # combustion: network
    echo \"root:password\" | chpasswd
    systemctl enable sshd
    """)
    combustion = libvirt.Volume("combustion",
        name="microos-combustion.sh",
        pool="default",
        format="raw",
        create={
            "content": {
                "url": microos.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 {
    		microos, err := libvirt.NewCombustion(ctx, "microos", &libvirt.CombustionArgs{
    			Name:    pulumi.String("microos-combustion"),
    			Content: pulumi.String("#!/bin/bash\n# combustion: network\necho \\\"root:password\\\" | chpasswd\nsystemctl enable sshd\n"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = libvirt.NewVolume(ctx, "combustion", &libvirt.VolumeArgs{
    			Name:   pulumi.String("microos-combustion.sh"),
    			Pool:   pulumi.String("default"),
    			Format: pulumi.String("raw"),
    			Create: &libvirt.VolumeCreateArgs{
    				Content: &libvirt.VolumeCreateContentArgs{
    					Url: microos.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 microos = new Libvirt.Combustion("microos", new()
        {
            Name = "microos-combustion",
            Content = @"#!/bin/bash
    # combustion: network
    echo \""root:password\"" | chpasswd
    systemctl enable sshd
    ",
        });
    
        var combustion = new Libvirt.Volume("combustion", new()
        {
            Name = "microos-combustion.sh",
            Pool = "default",
            Format = "raw",
            Create = new Libvirt.Inputs.VolumeCreateArgs
            {
                Content = new Libvirt.Inputs.VolumeCreateContentArgs
                {
                    Url = microos.Path,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.libvirt.Combustion;
    import com.pulumi.libvirt.CombustionArgs;
    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 microos = new Combustion("microos", CombustionArgs.builder()
                .name("microos-combustion")
                .content("""
    #!/bin/bash
    # combustion: network
    echo \"root:password\" | chpasswd
    systemctl enable sshd
                """)
                .build());
    
            var combustion = new Volume("combustion", VolumeArgs.builder()
                .name("microos-combustion.sh")
                .pool("default")
                .format("raw")
                .create(VolumeCreateArgs.builder()
                    .content(VolumeCreateContentArgs.builder()
                        .url(microos.path())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      microos:
        type: libvirt:Combustion
        properties:
          name: microos-combustion
          content: |
            #!/bin/bash
            # combustion: network
            echo \"root:password\" | chpasswd
            systemctl enable sshd        
      combustion:
        type: libvirt:Volume
        properties:
          name: microos-combustion.sh
          pool: default
          format: raw
          create:
            content:
              url: ${microos.path}
    

    See the Combustion documentation for script format details.

    Create Combustion Resource

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

    Constructor syntax

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

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

    Content string
    Combustion script content (shell script)
    Name string
    Name for this combustion resource
    Content string
    Combustion script content (shell script)
    Name string
    Name for this combustion resource
    content String
    Combustion script content (shell script)
    name String
    Name for this combustion resource
    content string
    Combustion script content (shell script)
    name string
    Name for this combustion resource
    content str
    Combustion script content (shell script)
    name str
    Name for this combustion resource
    content String
    Combustion script content (shell script)
    name String
    Name for this combustion resource

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    Full path to the generated combustion script 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 combustion script 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 combustion script 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 combustion script 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 combustion script 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 combustion script file
    size Number
    Size of the file in bytes

    Look up Existing Combustion Resource

    Get an existing Combustion 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?: CombustionState, opts?: CustomResourceOptions): Combustion
    @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) -> Combustion
    func GetCombustion(ctx *Context, name string, id IDInput, state *CombustionState, opts ...ResourceOption) (*Combustion, error)
    public static Combustion Get(string name, Input<string> id, CombustionState? state, CustomResourceOptions? opts = null)
    public static Combustion get(String name, Output<String> id, CombustionState state, CustomResourceOptions options)
    resources:  _:    type: libvirt:Combustion    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
    Combustion script content (shell script)
    Name string
    Name for this combustion resource
    Path string
    Full path to the generated combustion script file
    Size double
    Size of the file in bytes
    Content string
    Combustion script content (shell script)
    Name string
    Name for this combustion resource
    Path string
    Full path to the generated combustion script file
    Size float64
    Size of the file in bytes
    content String
    Combustion script content (shell script)
    name String
    Name for this combustion resource
    path String
    Full path to the generated combustion script file
    size Double
    Size of the file in bytes
    content string
    Combustion script content (shell script)
    name string
    Name for this combustion resource
    path string
    Full path to the generated combustion script file
    size number
    Size of the file in bytes
    content str
    Combustion script content (shell script)
    name str
    Name for this combustion resource
    path str
    Full path to the generated combustion script file
    size float
    Size of the file in bytes
    content String
    Combustion script content (shell script)
    name String
    Name for this combustion resource
    path String
    Full path to the generated combustion script 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