github.com/hashicorp/packer@v1.14.3/provisioner/sleep/provisioner.hcl2spec.go (about) 1 // Code generated by "packer-sdc mapstructure-to-hcl2"; DO NOT EDIT. 2 3 package sleep 4 5 import ( 6 "github.com/hashicorp/hcl/v2/hcldec" 7 "github.com/zclconf/go-cty/cty" 8 ) 9 10 // FlatProvisioner is an auto-generated flat version of Provisioner. 11 // Where the contents of a field with a `mapstructure:,squash` tag are bubbled up. 12 type FlatProvisioner struct { 13 Duration *string `cty:"duration" hcl:"duration"` 14 } 15 16 // FlatMapstructure returns a new FlatProvisioner. 17 // FlatProvisioner is an auto-generated flat version of Provisioner. 18 // Where the contents a fields with a `mapstructure:,squash` tag are bubbled up. 19 func (*Provisioner) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } { 20 return new(FlatProvisioner) 21 } 22 23 // HCL2Spec returns the hcl spec of a Provisioner. 24 // This spec is used by HCL to read the fields of Provisioner. 25 // The decoded values from this spec will then be applied to a FlatProvisioner. 26 func (*FlatProvisioner) HCL2Spec() map[string]hcldec.Spec { 27 s := map[string]hcldec.Spec{ 28 "duration": &hcldec.AttrSpec{Name: "duration", Type: cty.String, Required: false}, 29 } 30 return s 31 }