Skip to content

Commit

Permalink
Fixes #29959, Apply without init error message
Browse files Browse the repository at this point in the history
When going from a local backend to Terraform Cloud, if you skip the
`terraform init` and run `terraform apply` this will give the user more
clear instructions.
  • Loading branch information
barrettclark committed Dec 1, 2021
1 parent d72a413 commit 3ac5e0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/command/meta_backend.go
Expand Up @@ -1513,7 +1513,8 @@ configuration or state have been made.
const errBackendInitCloudMigration = `
Reason: %s.
Migrating to Terraform Cloud requires reinitialization, to discover which Terraform Cloud workspaces belong to this configuration and to optionally migrate existing state to the corresponding Terraform Cloud workspaces.
Changes to the Terraform Cloud configuration block require reinitialization,
to discover any changes to the available workspaces.
To re-initialize, run:
terraform init
Expand Down

0 comments on commit 3ac5e0b

Please sign in to comment.