2024-02-08 03:48:59 -06:00
|
|
|
// Copyright (c) The OpenTofu Authors
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
2023-05-02 10:33:06 -05:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-08-25 14:57:40 -05:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
2023-09-20 06:35:35 -05:00
|
|
|
"github.com/opentofu/opentofu/internal/backend"
|
|
|
|
"github.com/opentofu/opentofu/internal/cloud"
|
2022-08-25 14:57:40 -05:00
|
|
|
)
|
|
|
|
|
2022-08-26 14:17:37 -05:00
|
|
|
const failedToLoadSchemasMessage = `
|
2022-08-30 17:01:44 -05:00
|
|
|
Warning: Failed to update data for external integrations
|
2022-08-26 14:17:37 -05:00
|
|
|
|
2023-09-21 07:38:46 -05:00
|
|
|
OpenTofu was unable to generate a description of the updated
|
2023-10-12 06:07:16 -05:00
|
|
|
state for use with external integrations in the cloud backend.
|
2022-08-30 17:01:44 -05:00
|
|
|
Any integrations configured for this workspace which depend on
|
|
|
|
information from the state may not work correctly when using the
|
|
|
|
result of this action.
|
|
|
|
|
2023-09-21 07:38:46 -05:00
|
|
|
This problem occurs when OpenTofu cannot read the schema for
|
2022-08-30 17:01:44 -05:00
|
|
|
one or more of the providers used in the state. The next successful
|
|
|
|
apply will correct the problem by re-generating the JSON description
|
|
|
|
of the state:
|
2023-09-21 07:38:46 -05:00
|
|
|
tofu apply
|
2022-08-26 14:17:37 -05:00
|
|
|
`
|
|
|
|
|
2022-08-26 15:32:18 -05:00
|
|
|
func isCloudMode(b backend.Enhanced) bool {
|
|
|
|
_, ok := b.(*cloud.Cloud)
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|