terraform/internal/cloud/errors.go

32 lines
977 B
Go
Raw Normal View History

2021-09-09 01:02:25 +02:00
package cloud
import (
2021-09-13 21:18:32 +02:00
"fmt"
2021-09-09 01:02:25 +02:00
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/zclconf/go-cty/cty"
)
var (
invalidOrganizationConfigMissingValue = tfdiags.AttributeValue(
tfdiags.Error,
"Invalid organization value",
2021-09-13 21:18:32 +02:00
`The "organization" attribute value must not be empty.\n\n%s`,
2021-09-09 01:02:25 +02:00
cty.Path{cty.GetAttrStep{Name: "organization"}},
)
invalidWorkspaceConfigMissingValues = tfdiags.AttributeValue(
tfdiags.Error,
"Invalid workspaces configuration",
2021-09-13 21:18:32 +02:00
fmt.Sprintf("Missing workspace mapping strategy. Either workspace \"tags\", \"name\", or \"prefix\" is required.\n\n%s", workspaceConfigurationHelp),
2021-09-09 01:02:25 +02:00
cty.Path{cty.GetAttrStep{Name: "workspaces"}},
)
invalidWorkspaceConfigMisconfiguration = tfdiags.AttributeValue(
tfdiags.Error,
"Invalid workspaces configuration",
2021-09-13 21:18:32 +02:00
fmt.Sprintf("Only one of workspace \"tags\", \"name\", or \"prefix\" is allowed.\n\n%s", workspaceConfigurationHelp),
2021-09-09 01:02:25 +02:00
cty.Path{cty.GetAttrStep{Name: "workspaces"}},
)
)