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-10-11 23:26:07 +02:00
|
|
|
fmt.Sprintf("Missing workspace mapping strategy. Either workspace \"tags\" or \"name\" 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-10-11 23:26:07 +02:00
|
|
|
fmt.Sprintf("Only one of workspace \"tags\" or \"name\" is allowed.\n\n%s", workspaceConfigurationHelp),
|
2021-09-09 01:02:25 +02:00
|
|
|
cty.Path{cty.GetAttrStep{Name: "workspaces"}},
|
|
|
|
)
|
|
|
|
)
|