mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
Remove ability to declare a 'cloud' backend
With the alternative block introduced in 7bf9b2c7b, this removes the ability to explicitly declare the 'cloud' backend. The literal backend interface is an implementation detail and no longer a user-level concept when using Terraform Cloud.
This commit is contained in:
parent
a4c24e3147
commit
fccc873a3d
@ -371,6 +371,16 @@ func (c *InitCommand) initBackend(root *configs.Module, extraConfig rawFlags) (b
|
|||||||
var backendConfigOverride hcl.Body
|
var backendConfigOverride hcl.Body
|
||||||
if root.Backend != nil {
|
if root.Backend != nil {
|
||||||
backendType := root.Backend.Type
|
backendType := root.Backend.Type
|
||||||
|
if backendType == "cloud" {
|
||||||
|
diags = diags.Append(&hcl.Diagnostic{
|
||||||
|
Severity: hcl.DiagError,
|
||||||
|
Summary: "Unsupported backend type",
|
||||||
|
Detail: fmt.Sprintf("There is no explicit backend type named %q. To configure Terraform Cloud, declare a 'cloud' block instead.", backendType),
|
||||||
|
Subject: &root.Backend.TypeRange,
|
||||||
|
})
|
||||||
|
return nil, true, diags
|
||||||
|
}
|
||||||
|
|
||||||
bf := backendInit.Backend(backendType)
|
bf := backendInit.Backend(backendType)
|
||||||
if bf == nil {
|
if bf == nil {
|
||||||
diags = diags.Append(&hcl.Diagnostic{
|
diags = diags.Append(&hcl.Diagnostic{
|
||||||
|
Loading…
Reference in New Issue
Block a user