2023-05-02 10:33:06 -05:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-08-25 14:57:40 -05:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
2022-08-26 15:32:18 -05:00
|
|
|
"github.com/hashicorp/terraform/internal/backend"
|
|
|
|
"github.com/hashicorp/terraform/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
|
|
|
|
2022-08-30 17:01:44 -05:00
|
|
|
Terraform was unable to generate a description of the updated
|
|
|
|
state for use with external integrations in Terraform Cloud.
|
|
|
|
Any integrations configured for this workspace which depend on
|
|
|
|
information from the state may not work correctly when using the
|
|
|
|
result of this action.
|
|
|
|
|
|
|
|
This problem occurs when Terraform cannot read the schema for
|
|
|
|
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:
|
|
|
|
terraform 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
|
|
|
|
}
|