Merge pull request #28820 from hashicorp/radditude/refresh-error-message
backend/remote: point refresh users towards -refresh-only
This commit is contained in:
commit
2f980f1dfe
|
@ -721,6 +721,10 @@ func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend
|
||||||
f = b.opPlan
|
f = b.opPlan
|
||||||
case backend.OperationTypeApply:
|
case backend.OperationTypeApply:
|
||||||
f = b.opApply
|
f = b.opApply
|
||||||
|
case backend.OperationTypeRefresh:
|
||||||
|
return nil, fmt.Errorf(
|
||||||
|
"\n\nThe \"refresh\" operation is not supported when using the \"remote\" backend. " +
|
||||||
|
"Use \"terraform apply -refresh-only\" instead.")
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf(
|
return nil, fmt.Errorf(
|
||||||
"\n\nThe \"remote\" backend does not support the %q operation.", op.Type)
|
"\n\nThe \"remote\" backend does not support the %q operation.", op.Type)
|
||||||
|
|
Loading…
Reference in New Issue