Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove get-plugins flag #27463

Merged
merged 2 commits into from
Jan 11, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type InitCommand struct {

func (c *InitCommand) Run(args []string) int {
var flagFromModule string
var flagBackend, flagGet, flagUpgrade, getPlugins bool
var flagBackend, flagGet, flagUpgrade bool
var flagPluginPath FlagStringSlice
var flagVerifyPlugins bool
flagConfigExtra := newRawFlags("-backend-config")
Expand All @@ -45,7 +45,6 @@ func (c *InitCommand) Run(args []string) int {
cmdFlags.Var(flagConfigExtra, "backend-config", "")
cmdFlags.StringVar(&flagFromModule, "from-module", "", "copy the source of the given module into the directory before init")
cmdFlags.BoolVar(&flagGet, "get", true, "")
cmdFlags.BoolVar(&getPlugins, "get-plugins", true, "no-op flag, use provider_installation blocks to customize provider installation")
cmdFlags.BoolVar(&c.forceInitCopy, "force-copy", false, "suppress prompts about copying state data")
cmdFlags.BoolVar(&c.Meta.stateLock, "lock", true, "lock state")
cmdFlags.DurationVar(&c.Meta.stateLockTimeout, "lock-timeout", 0, "lock timeout")
Expand All @@ -64,16 +63,6 @@ func (c *InitCommand) Run(args []string) int {
c.pluginPath = flagPluginPath
}

// If users are setting the no-op get-plugins command, give them a warning,
// this should allow us to remove the flag in the future.
if !getPlugins {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Warning,
"No-op -get-plugins flag used",
`As of Terraform 0.13+, the -get-plugins=false command is a no-op flag. If you would like to customize provider installation, use a provider_installation block or other available Terraform settings.`,
))
}

// Validate the arg count
args = cmdFlags.Args()
if len(args) > 1 {
Expand Down Expand Up @@ -980,11 +969,6 @@ Options:

-get=true Download any modules for this configuration.

-get-plugins=true Download any missing plugins for this configuration.
This command is a no-op in Terraform 0.13+: use
-plugin-dir settings or provider_installation blocks
instead.

-input=true Ask for input if necessary. If false, will error if
input was required.

Expand Down