From 6e9eaa1edd13dce5f951f17602cf6c50df00dc3e Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 7 Jul 2020 16:01:41 -0700 Subject: [PATCH] generate code --- builder/googlecompute/config.hcl2spec.go | 2 ++ .../step_start_tunnel.hcl2spec.go | 18 ++++++++++-------- .../googlecompute/IAPConfig-not-required.mdx | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/builder/googlecompute/config.hcl2spec.go b/builder/googlecompute/config.hcl2spec.go index 68c2ec5ac..109d971c9 100644 --- a/builder/googlecompute/config.hcl2spec.go +++ b/builder/googlecompute/config.hcl2spec.go @@ -78,6 +78,7 @@ type FlatConfig struct { IAPLocalhostPort *int `mapstructure:"iap_localhost_port" cty:"iap_localhost_port" hcl:"iap_localhost_port"` IAPHashBang *string `mapstructure:"iap_hashbang" required:"false" cty:"iap_hashbang" hcl:"iap_hashbang"` IAPExt *string `mapstructure:"iap_ext" required:"false" cty:"iap_ext" hcl:"iap_ext"` + IAPTunnelLaunchTimeout *int `mapstructure:"iap_tunnel_launch_timeout" required:"false" cty:"iap_tunnel_launch_timeout" hcl:"iap_tunnel_launch_timeout"` ImageName *string `mapstructure:"image_name" required:"false" cty:"image_name" hcl:"image_name"` ImageDescription *string `mapstructure:"image_description" required:"false" cty:"image_description" hcl:"image_description"` ImageEncryptionKey *FlatCustomerEncryptionKey `mapstructure:"image_encryption_key" required:"false" cty:"image_encryption_key" hcl:"image_encryption_key"` @@ -194,6 +195,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "iap_localhost_port": &hcldec.AttrSpec{Name: "iap_localhost_port", Type: cty.Number, Required: false}, "iap_hashbang": &hcldec.AttrSpec{Name: "iap_hashbang", Type: cty.String, Required: false}, "iap_ext": &hcldec.AttrSpec{Name: "iap_ext", Type: cty.String, Required: false}, + "iap_tunnel_launch_timeout": &hcldec.AttrSpec{Name: "iap_tunnel_launch_timeout", Type: cty.Number, Required: false}, "image_name": &hcldec.AttrSpec{Name: "image_name", Type: cty.String, Required: false}, "image_description": &hcldec.AttrSpec{Name: "image_description", Type: cty.String, Required: false}, "image_encryption_key": &hcldec.BlockSpec{TypeName: "image_encryption_key", Nested: hcldec.ObjectSpec((*FlatCustomerEncryptionKey)(nil).HCL2Spec())}, diff --git a/builder/googlecompute/step_start_tunnel.hcl2spec.go b/builder/googlecompute/step_start_tunnel.hcl2spec.go index f88667b27..e4194a179 100644 --- a/builder/googlecompute/step_start_tunnel.hcl2spec.go +++ b/builder/googlecompute/step_start_tunnel.hcl2spec.go @@ -9,10 +9,11 @@ import ( // FlatIAPConfig is an auto-generated flat version of IAPConfig. // Where the contents of a field with a `mapstructure:,squash` tag are bubbled up. type FlatIAPConfig struct { - IAP *bool `mapstructure:"use_iap" required:"false" cty:"use_iap" hcl:"use_iap"` - IAPLocalhostPort *int `mapstructure:"iap_localhost_port" cty:"iap_localhost_port" hcl:"iap_localhost_port"` - IAPHashBang *string `mapstructure:"iap_hashbang" required:"false" cty:"iap_hashbang" hcl:"iap_hashbang"` - IAPExt *string `mapstructure:"iap_ext" required:"false" cty:"iap_ext" hcl:"iap_ext"` + IAP *bool `mapstructure:"use_iap" required:"false" cty:"use_iap" hcl:"use_iap"` + IAPLocalhostPort *int `mapstructure:"iap_localhost_port" cty:"iap_localhost_port" hcl:"iap_localhost_port"` + IAPHashBang *string `mapstructure:"iap_hashbang" required:"false" cty:"iap_hashbang" hcl:"iap_hashbang"` + IAPExt *string `mapstructure:"iap_ext" required:"false" cty:"iap_ext" hcl:"iap_ext"` + IAPTunnelLaunchTimeout *int `mapstructure:"iap_tunnel_launch_timeout" required:"false" cty:"iap_tunnel_launch_timeout" hcl:"iap_tunnel_launch_timeout"` } // FlatMapstructure returns a new FlatIAPConfig. @@ -27,10 +28,11 @@ func (*IAPConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spe // The decoded values from this spec will then be applied to a FlatIAPConfig. func (*FlatIAPConfig) HCL2Spec() map[string]hcldec.Spec { s := map[string]hcldec.Spec{ - "use_iap": &hcldec.AttrSpec{Name: "use_iap", Type: cty.Bool, Required: false}, - "iap_localhost_port": &hcldec.AttrSpec{Name: "iap_localhost_port", Type: cty.Number, Required: false}, - "iap_hashbang": &hcldec.AttrSpec{Name: "iap_hashbang", Type: cty.String, Required: false}, - "iap_ext": &hcldec.AttrSpec{Name: "iap_ext", Type: cty.String, Required: false}, + "use_iap": &hcldec.AttrSpec{Name: "use_iap", Type: cty.Bool, Required: false}, + "iap_localhost_port": &hcldec.AttrSpec{Name: "iap_localhost_port", Type: cty.Number, Required: false}, + "iap_hashbang": &hcldec.AttrSpec{Name: "iap_hashbang", Type: cty.String, Required: false}, + "iap_ext": &hcldec.AttrSpec{Name: "iap_ext", Type: cty.String, Required: false}, + "iap_tunnel_launch_timeout": &hcldec.AttrSpec{Name: "iap_tunnel_launch_timeout", Type: cty.Number, Required: false}, } return s } diff --git a/website/pages/partials/builder/googlecompute/IAPConfig-not-required.mdx b/website/pages/partials/builder/googlecompute/IAPConfig-not-required.mdx index 6158bb52e..f3132f914 100644 --- a/website/pages/partials/builder/googlecompute/IAPConfig-not-required.mdx +++ b/website/pages/partials/builder/googlecompute/IAPConfig-not-required.mdx @@ -22,3 +22,6 @@ - `iap_ext` (string) - What file extension to use for script that sets up gcloud. Default: ".sh" + +- `iap_tunnel_launch_timeout` (int) - How long to wait, in seconds, before assuming a tunnel launch was + successful. Defaults to 30 seconds.