Back to Packer

FloppyConfig Not Required

website/content/partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig-not-required.mdx

1.15.31.7 KB
Original Source
<!-- Code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; DO NOT EDIT MANUALLY -->
  • floppy_files ([]string) - A list of files to place onto a floppy disk that is attached when the VM is booted. Currently, no support exists for creating sub-directories on the floppy. Wildcard characters (\*, ?, and []) are allowed. Directory names are also allowed, which will add all the files found in the directory to the floppy.

  • floppy_dirs ([]string) - A list of directories to place onto the floppy disk recursively. This is similar to the floppy_files option except that the directory structure is preserved. This is useful for when your floppy disk includes drivers or if you just want to organize it's contents as a hierarchy. Wildcard characters (\*, ?, and []) are allowed. The maximum summary size of all files in the listed directories are the same as in floppy_files.

  • floppy_content (map[string]string) - Key/Values to add to the floppy disk. The keys represent the paths, and the values contents. It can be used alongside floppy_files or floppy_dirs, which is useful to add large files without loading them into memory. If any paths are specified by both, the contents in floppy_content will take precedence.

    Usage example (HCL):

    hcl
    floppy_files = ["vendor-data"]
    floppy_content = {
      "meta-data" = jsonencode(local.instance_data)
      "user-data" = templatefile("user-data", { packages = ["nginx"] })
    }
    floppy_label = "cidata"
    
  • floppy_label (string) - Floppy Label

<!-- End of code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; -->