|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
// Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig"; DO NOT EDIT.
|
|
|
|
|
// Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig"; DO NOT EDIT.
|
|
|
|
|
package proxmox
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
@ -84,6 +84,7 @@ type FlatConfig struct {
|
|
|
|
|
CPUType *string `mapstructure:"cpu_type" cty:"cpu_type"`
|
|
|
|
|
Sockets *int `mapstructure:"sockets" cty:"sockets"`
|
|
|
|
|
OS *string `mapstructure:"os" cty:"os"`
|
|
|
|
|
VGA *FlatvgaConfig `mapstructure:"vga" cty:"vga"`
|
|
|
|
|
NICs []FlatnicConfig `mapstructure:"network_adapters" cty:"network_adapters"`
|
|
|
|
|
Disks []FlatdiskConfig `mapstructure:"disks" cty:"disks"`
|
|
|
|
|
ISOFile *string `mapstructure:"iso_file" cty:"iso_file"`
|
|
|
|
|
@ -182,6 +183,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
|
"cpu_type": &hcldec.AttrSpec{Name: "cpu_type", Type: cty.String, Required: false},
|
|
|
|
|
"sockets": &hcldec.AttrSpec{Name: "sockets", Type: cty.Number, Required: false},
|
|
|
|
|
"os": &hcldec.AttrSpec{Name: "os", Type: cty.String, Required: false},
|
|
|
|
|
"vga": &hcldec.BlockSpec{TypeName: "vga", Nested: hcldec.ObjectSpec((*FlatvgaConfig)(nil).HCL2Spec())},
|
|
|
|
|
"network_adapters": &hcldec.BlockListSpec{TypeName: "network_adapters", Nested: hcldec.ObjectSpec((*FlatnicConfig)(nil).HCL2Spec())},
|
|
|
|
|
"disks": &hcldec.BlockListSpec{TypeName: "disks", Nested: hcldec.ObjectSpec((*FlatdiskConfig)(nil).HCL2Spec())},
|
|
|
|
|
"iso_file": &hcldec.AttrSpec{Name: "iso_file", Type: cty.String, Required: false},
|
|
|
|
|
@ -256,3 +258,28 @@ func (*FlatnicConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
|
}
|
|
|
|
|
return s
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FlatvgaConfig is an auto-generated flat version of vgaConfig.
|
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
|
type FlatvgaConfig struct {
|
|
|
|
|
Type *string `mapstructure:"type" cty:"type"`
|
|
|
|
|
Memory *int `mapstructure:"memory" cty:"memory"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatvgaConfig.
|
|
|
|
|
// FlatvgaConfig is an auto-generated flat version of vgaConfig.
|
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
|
func (*vgaConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
|
return new(FlatvgaConfig)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a vgaConfig.
|
|
|
|
|
// This spec is used by HCL to read the fields of vgaConfig.
|
|
|
|
|
// The decoded values from this spec will then be applied to a FlatvgaConfig.
|
|
|
|
|
func (*FlatvgaConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
|
"type": &hcldec.AttrSpec{Name: "type", Type: cty.String, Required: false},
|
|
|
|
|
"memory": &hcldec.AttrSpec{Name: "memory", Type: cty.Number, Required: false},
|
|
|
|
|
}
|
|
|
|
|
return s
|
|
|
|
|
}
|
|
|
|
|
|