-
Notifications
You must be signed in to change notification settings - Fork 27
/
post-processor.hcl2spec.go
76 lines (72 loc) · 5.45 KB
/
post-processor.hcl2spec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package main
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatConfig is an auto-generated flat version of Config.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatConfig struct {
Region *string `mapstructure:"region" cty:"region"`
Bucket *string `mapstructure:"bucket" cty:"bucket"`
CloudFront *string `mapstructure:"cloudfront" cty:"cloudfront"`
ManifestPath *string `mapstructure:"manifest" cty:"manifest"`
BoxName *string `mapstructure:"box_name" cty:"box_name"`
BoxDir *string `mapstructure:"box_dir" cty:"box_dir"`
Version *string `mapstructure:"version" cty:"version"`
ACL *string `mapstructure:"acl" cty:"acl"`
CredentialFile *string `mapstructure:"credentials" cty:"credentials"`
CredentialProfile *string `mapstructure:"profile" cty:"profile"`
AccessKey *string `mapstructure:"access_key_id" cty:"access_key_id"`
SecretKey *string `mapstructure:"secret_key" cty:"secret_key"`
SessionToken *string `mapstructure:"session_token" cty:"session_token"`
SignedExpiry *string `mapstructure:"signed_expiry" cty:"signed_expiry"`
StorageClass *string `mapstructure:"storage_class" cty:"storage_class"`
PartSize *int64 `mapstructure:"part_size" cty:"part_size"`
Concurrency *int `mapstructure:"concurrency" cty:"concurrency"`
PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name"`
PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type"`
PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug"`
PackerForce *bool `mapstructure:"packer_force" cty:"packer_force"`
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error"`
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables"`
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables"`
}
// FlatMapstructure returns a new FlatConfig.
// FlatConfig is an auto-generated flat version of Config.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatConfig)
}
// HCL2Spec returns the hcl spec of a Config.
// This spec is used by HCL to read the fields of Config.
// The decoded values from this spec will then be applied to a FlatConfig.
func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"region": &hcldec.AttrSpec{Name: "region", Type: cty.String, Required: false},
"bucket": &hcldec.AttrSpec{Name: "bucket", Type: cty.String, Required: false},
"cloudfront": &hcldec.AttrSpec{Name: "cloudfront", Type: cty.String, Required: false},
"manifest": &hcldec.AttrSpec{Name: "manifest", Type: cty.String, Required: false},
"box_name": &hcldec.AttrSpec{Name: "box_name", Type: cty.String, Required: false},
"box_dir": &hcldec.AttrSpec{Name: "box_dir", Type: cty.String, Required: false},
"version": &hcldec.AttrSpec{Name: "version", Type: cty.String, Required: false},
"acl": &hcldec.AttrSpec{Name: "acl", Type: cty.String, Required: false},
"credentials": &hcldec.AttrSpec{Name: "credentials", Type: cty.String, Required: false},
"profile": &hcldec.AttrSpec{Name: "profile", Type: cty.String, Required: false},
"access_key_id": &hcldec.AttrSpec{Name: "access_key_id", Type: cty.String, Required: false},
"secret_key": &hcldec.AttrSpec{Name: "secret_key", Type: cty.String, Required: false},
"session_token": &hcldec.AttrSpec{Name: "session_token", Type: cty.String, Required: false},
"signed_expiry": &hcldec.AttrSpec{Name: "signed_expiry", Type: cty.String, Required: false},
"storage_class": &hcldec.AttrSpec{Name: "storage_class", Type: cty.String, Required: false},
"part_size": &hcldec.AttrSpec{Name: "part_size", Type: cty.Number, Required: false},
"concurrency": &hcldec.AttrSpec{Name: "concurrency", Type: cty.Number, Required: false},
"packer_build_name": &hcldec.AttrSpec{Name: "packer_build_name", Type: cty.String, Required: false},
"packer_builder_type": &hcldec.AttrSpec{Name: "packer_builder_type", Type: cty.String, Required: false},
"packer_debug": &hcldec.AttrSpec{Name: "packer_debug", Type: cty.Bool, Required: false},
"packer_force": &hcldec.AttrSpec{Name: "packer_force", Type: cty.Bool, Required: false},
"packer_on_error": &hcldec.AttrSpec{Name: "packer_on_error", Type: cty.String, Required: false},
"packer_user_variables": &hcldec.BlockAttrsSpec{TypeName: "packer_user_variables", ElementType: cty.String, Required: false},
"packer_sensitive_variables": &hcldec.AttrSpec{Name: "packer_sensitive_variables", Type: cty.List(cty.String), Required: false},
}
return s
}