From df4342bc3d309551a835d79579861e764e65e37e Mon Sep 17 00:00:00 2001 From: Vladislav Rassokhin Date: Tue, 29 Nov 2016 23:03:21 +0300 Subject: [PATCH] Regenerate plugin list since provisioners were changed in previous commits --- command/internal_plugin_list.go | 9 ++------- scripts/generate-plugins.go | 17 ++++------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/command/internal_plugin_list.go b/command/internal_plugin_list.go index 0ac40837b..271bc8f6c 100644 --- a/command/internal_plugin_list.go +++ b/command/internal_plugin_list.go @@ -75,6 +75,7 @@ import ( vaultprovider "github.com/hashicorp/terraform/builtin/providers/vault" vcdprovider "github.com/hashicorp/terraform/builtin/providers/vcd" vsphereprovider "github.com/hashicorp/terraform/builtin/providers/vsphere" + chefprovisioner "github.com/hashicorp/terraform/builtin/provisioners/chef" fileprovisioner "github.com/hashicorp/terraform/builtin/provisioners/file" localexecprovisioner "github.com/hashicorp/terraform/builtin/provisioners/local-exec" remoteexecprovisioner "github.com/hashicorp/terraform/builtin/provisioners/remote-exec" @@ -84,9 +85,6 @@ import ( //New Provider Builds opcprovider "github.com/hashicorp/terraform-provider-opc/opc" - - // Legacy, will remove once it conforms with new structure - chefprovisioner "github.com/hashicorp/terraform/builtin/provisioners/chef" ) var InternalProviders = map[string]plugin.ProviderFunc{ @@ -162,16 +160,13 @@ var InternalProviders = map[string]plugin.ProviderFunc{ } var InternalProvisioners = map[string]plugin.ProvisionerFunc{ + "chef": chefprovisioner.Provisioner, "file": fileprovisioner.Provisioner, "local-exec": localexecprovisioner.Provisioner, "remote-exec": remoteexecprovisioner.Provisioner, } func init() { - // Legacy provisioners that don't match our heuristics for auto-finding - // built-in provisioners. - InternalProvisioners["chef"] = func() terraform.ResourceProvisioner { return new(chefprovisioner.ResourceProvisioner) } - // New Provider Layouts InternalProviders["opc"] = func() terraform.ResourceProvider { return opcprovider.Provider() } } diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index b4a0bc9a4..415123891 100644 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -82,12 +82,11 @@ func makeProviderMap(items []plugin) string { // makeProvisionerMap creates a map of provisioners like this: // -// "file": func() terraform.ResourceProvisioner { return new(file.ResourceProvisioner) }, -// "local-exec": func() terraform.ResourceProvisioner { return new(localexec.ResourceProvisioner) }, -// "remote-exec": func() terraform.ResourceProvisioner { return new(remoteexec.ResourceProvisioner) }, +// "chef": chefprovisioner.Provisioner, +// "file": fileprovisioner.Provisioner, +// "local-exec": localexecprovisioner.Provisioner, +// "remote-exec": remoteexecprovisioner.Provisioner, // -// This is more verbose than the Provider case because there is no corresponding -// Provisioner function. func makeProvisionerMap(items []plugin) string { output := "" for _, item := range items { @@ -273,9 +272,6 @@ IMPORTS //New Provider Builds opcprovider "github.com/hashicorp/terraform-provider-opc/opc" - - // Legacy, will remove once it conforms with new structure - chefprovisioner "github.com/hashicorp/terraform/builtin/provisioners/chef" ) var InternalProviders = map[string]plugin.ProviderFunc{ @@ -287,12 +283,7 @@ PROVISIONERS } func init() { - // Legacy provisioners that don't match our heuristics for auto-finding - // built-in provisioners. - InternalProvisioners["chef"] = func() terraform.ResourceProvisioner { return new(chefprovisioner.ResourceProvisioner) } - // New Provider Layouts InternalProviders["opc"] = func() terraform.ResourceProvider { return opcprovider.Provider() } } - `