Update init reconfigure error message
If you move from the remote backend to the cloud block you will see this error message.
This commit is contained in:
parent
85f0bc6198
commit
cc6de251d8
|
@ -663,7 +663,11 @@ func (m *Meta) backendFromConfig(opts *BackendOpts) (backend.Backend, tfdiags.Di
|
||||||
}
|
}
|
||||||
|
|
||||||
if !m.migrateState {
|
if !m.migrateState {
|
||||||
|
if c.Type == "cloud" {
|
||||||
|
diags = diags.Append(migrateOrReconfigDiagCloud)
|
||||||
|
} else {
|
||||||
diags = diags.Append(migrateOrReconfigDiag)
|
diags = diags.Append(migrateOrReconfigDiag)
|
||||||
|
}
|
||||||
return nil, diags
|
return nil, diags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1384,3 +1388,10 @@ var migrateOrReconfigDiag = tfdiags.Sourceless(
|
||||||
"A change in the backend configuration has been detected, which may require migrating existing state.\n\n"+
|
"A change in the backend configuration has been detected, which may require migrating existing state.\n\n"+
|
||||||
"If you wish to attempt automatic migration of the state, use \"terraform init -migrate-state\".\n"+
|
"If you wish to attempt automatic migration of the state, use \"terraform init -migrate-state\".\n"+
|
||||||
`If you wish to store the current configuration with no changes to the state, use "terraform init -reconfigure".`)
|
`If you wish to store the current configuration with no changes to the state, use "terraform init -reconfigure".`)
|
||||||
|
|
||||||
|
var migrateOrReconfigDiagCloud = tfdiags.Sourceless(
|
||||||
|
tfdiags.Error,
|
||||||
|
"Terraform Cloud configuration changed",
|
||||||
|
"A change in the Terraform Cloud configuration has been detected, which may require migrating existing state.\n\n"+
|
||||||
|
"If you wish to attempt automatic migration of the state, use \"terraform init -migrate-state\".\n"+
|
||||||
|
`If you wish to store the current configuration with no changes to the state, use "terraform init -reconfigure".`)
|
||||||
|
|
Loading…
Reference in New Issue