Cloud Backend reference migrating away from TFC

This commit is contained in:
Barrett Clark 2021-10-27 16:27:12 -05:00 committed by Chris Arcand
parent 2c0294c7e3
commit f5366468b4
1 changed files with 8 additions and 1 deletions

View File

@ -779,7 +779,11 @@ func (m *Meta) backend_c_r_S(c *configs.Backend, cHash int, sMgr *clistate.Local
// Get the backend type for output // Get the backend type for output
backendType := s.Backend.Type backendType := s.Backend.Type
if s.Backend.Type == "cloud" {
m.Ui.Output(strings.TrimSpace(outputBackendMigrateLocalFromCloud))
} else {
m.Ui.Output(fmt.Sprintf(strings.TrimSpace(outputBackendMigrateLocal), s.Backend.Type)) m.Ui.Output(fmt.Sprintf(strings.TrimSpace(outputBackendMigrateLocal), s.Backend.Type))
}
// Grab a purely local backend to get the local state if it exists // Grab a purely local backend to get the local state if it exists
localB, diags := m.Backend(&BackendOpts{ForceLocal: true, Init: true}) localB, diags := m.Backend(&BackendOpts{ForceLocal: true, Init: true})
@ -1360,6 +1364,9 @@ Terraform detected that the backend type changed from %q to Terraform Cloud.
const outputBackendMigrateLocal = ` const outputBackendMigrateLocal = `
Terraform has detected you're unconfiguring your previously set %q backend. Terraform has detected you're unconfiguring your previously set %q backend.
` `
const outputBackendMigrateLocalFromCloud = `
Terraform has detected you're unconfiguring Terraform Cloud.
`
const outputBackendReconfigure = ` const outputBackendReconfigure = `
[reset][bold]Backend configuration changed![reset] [reset][bold]Backend configuration changed![reset]