mirror of https://github.com/kubernetes/kops.git
Simple code updates for 1.8 breakages
This commit is contained in:
parent
9d7b78766e
commit
0c89c9851e
2
Makefile
2
Makefile
|
|
@ -429,6 +429,8 @@ utils-dist:
|
|||
.PHONY: copydeps
|
||||
copydeps:
|
||||
rsync -avz _vendor/ vendor/ --delete --exclude vendor/ --exclude .git
|
||||
ln -sf kubernetes/staging/src/k8s.io/api vendor/k8s.io/api
|
||||
ln -sf kubernetes/staging/src/k8s.io/apiextensions-apiserver vendor/k8s.io/apiextensions-apiserver
|
||||
ln -sf kubernetes/staging/src/k8s.io/apimachinery vendor/k8s.io/apimachinery
|
||||
ln -sf kubernetes/staging/src/k8s.io/apiserver vendor/k8s.io/apiserver
|
||||
ln -sf kubernetes/staging/src/k8s.io/client-go vendor/k8s.io/client-go
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
const boilerPlate = `
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/resource"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
type CreateOptions struct {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/gce"
|
||||
"k8s.io/kops/upup/pkg/fi/utils"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
type CreateInstanceGroupOptions struct {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/resource"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
type DeleteOptions struct {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
type DeleteClusterOptions struct {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kops/util/pkg/ui"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package main
|
|||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
util_editor "k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
type EditClusterOptions struct {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import (
|
|||
"k8s.io/kops/pkg/pretty"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"k8s.io/kops/pkg/kubeconfig"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
"k8s.io/kops/cmd/kops/util"
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
"k8s.io/kops/pkg/apis/kops/registry"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import (
|
|||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package main
|
|||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/resource"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/kutil"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import (
|
|||
"k8s.io/kops/pkg/client/simple"
|
||||
"k8s.io/kops/upup/pkg/kutil"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
|
||||
// Register our APIs
|
||||
_ "k8s.io/kops/pkg/apis/kops/install"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/kutil"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
"k8s.io/kops/pkg/resources"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/utils"
|
||||
"k8s.io/kops/upup/pkg/kutil"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kops/federation"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package main
|
|||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ func (c *gceCloudImplementation) FindInstanceTemplates(clusterName string) ([]*c
|
|||
match := false
|
||||
for _, item := range t.Properties.Metadata.Items {
|
||||
if item.Key == "cluster-name" {
|
||||
if strings.TrimSpace(item.Value) == findClusterName {
|
||||
value := fi.StringValue(item.Value)
|
||||
if strings.TrimSpace(value) == findClusterName {
|
||||
match = true
|
||||
} else {
|
||||
match = false
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ func (e *Instance) Find(c *fi.Context) (*Instance, error) {
|
|||
if r.Metadata != nil {
|
||||
actual.Metadata = make(map[string]fi.Resource)
|
||||
for _, i := range r.Metadata.Items {
|
||||
actual.Metadata[i.Key] = fi.NewStringResource(i.Value)
|
||||
actual.Metadata[i.Key] = fi.NewStringResource(fi.StringValue(i.Value))
|
||||
}
|
||||
actual.metadataFingerprint = r.Metadata.Fingerprint
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ func (e *Instance) mapToGCE(project string, ipAddressResolver func(*Address) (*s
|
|||
}
|
||||
} else {
|
||||
scheduling = &compute.Scheduling{
|
||||
AutomaticRestart: true,
|
||||
AutomaticRestart: fi.Bool(true),
|
||||
// TODO: Migrate or terminate?
|
||||
OnHostMaintenance: "MIGRATE",
|
||||
Preemptible: false,
|
||||
|
|
@ -275,7 +275,7 @@ func (e *Instance) mapToGCE(project string, ipAddressResolver func(*Address) (*s
|
|||
}
|
||||
metadataItems = append(metadataItems, &compute.MetadataItems{
|
||||
Key: key,
|
||||
Value: v,
|
||||
Value: fi.String(v),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -460,7 +460,7 @@ func (_ *Instance) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *
|
|||
|
||||
if i.Scheduling != nil {
|
||||
tf.Scheduling = &terraformScheduling{
|
||||
AutomaticRestart: i.Scheduling.AutomaticRestart,
|
||||
AutomaticRestart: fi.BoolValue(i.Scheduling.AutomaticRestart),
|
||||
OnHostMaintenance: i.Scheduling.OnHostMaintenance,
|
||||
Preemptible: i.Scheduling.Preemptible,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ func (e *InstanceTemplate) Find(c *fi.Context) (*InstanceTemplate, error) {
|
|||
if p.Metadata != nil {
|
||||
actual.Metadata = make(map[string]*fi.ResourceHolder)
|
||||
for _, meta := range p.Metadata.Items {
|
||||
actual.Metadata[meta.Key] = fi.WrapResource(fi.NewStringResource(meta.Value))
|
||||
actual.Metadata[meta.Key] = fi.WrapResource(fi.NewStringResource(fi.StringValue(meta.Value)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -190,13 +190,13 @@ func (e *InstanceTemplate) mapToGCE(project string) (*compute.InstanceTemplate,
|
|||
|
||||
if fi.BoolValue(e.Preemptible) {
|
||||
scheduling = &compute.Scheduling{
|
||||
AutomaticRestart: false,
|
||||
AutomaticRestart: fi.Bool(false),
|
||||
OnHostMaintenance: "TERMINATE",
|
||||
Preemptible: true,
|
||||
}
|
||||
} else {
|
||||
scheduling = &compute.Scheduling{
|
||||
AutomaticRestart: true,
|
||||
AutomaticRestart: fi.Bool(true),
|
||||
// TODO: Migrate or terminate?
|
||||
OnHostMaintenance: "MIGRATE",
|
||||
Preemptible: false,
|
||||
|
|
@ -265,7 +265,7 @@ func (e *InstanceTemplate) mapToGCE(project string) (*compute.InstanceTemplate,
|
|||
}
|
||||
metadataItems = append(metadataItems, &compute.MetadataItems{
|
||||
Key: key,
|
||||
Value: v,
|
||||
Value: fi.String(v),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -473,7 +473,7 @@ func (t *terraformInstanceCommon) AddMetadata(target *terraform.TerraformTarget,
|
|||
t.Metadata = make(map[string]*terraform.Literal)
|
||||
}
|
||||
for _, g := range metadata.Items {
|
||||
v := fi.NewStringResource(g.Value)
|
||||
v := fi.NewStringResource(fi.StringValue(g.Value))
|
||||
tfResource, err := target.AddFile("google_compute_instance_template", name, "metadata_"+g.Key, v)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -541,7 +541,7 @@ func (_ *InstanceTemplate) RenderTerraform(t *terraform.TerraformTarget, a, e, c
|
|||
|
||||
if i.Properties.Scheduling != nil {
|
||||
tf.Scheduling = &terraformScheduling{
|
||||
AutomaticRestart: i.Properties.Scheduling.AutomaticRestart,
|
||||
AutomaticRestart: fi.BoolValue(i.Properties.Scheduling.AutomaticRestart),
|
||||
OnHostMaintenance: i.Properties.Scheduling.OnHostMaintenance,
|
||||
Preemptible: i.Properties.Scheduling.Preemptible,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue