backend/local: "environment_dir" renamed to "workspace_dir"
As part of switching our terminology, we begin a deprecation cycle for "environment_dir" and advise users to switch to "workspace_dir" instead.
This commit is contained in:
parent
31d556894f
commit
5026e1d313
|
@ -291,10 +291,19 @@ func (b *Local) init() {
|
||||||
Default: "",
|
Default: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"workspace_dir": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Optional: true,
|
||||||
|
Default: "",
|
||||||
|
},
|
||||||
|
|
||||||
"environment_dir": &schema.Schema{
|
"environment_dir": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: "",
|
Default: "",
|
||||||
|
ConflictsWith: []string{"workspace_dir"},
|
||||||
|
|
||||||
|
Deprecated: "workspace_dir should be used instead, with the same meaning",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -317,6 +326,14 @@ func (b *Local) schemaConfigure(ctx context.Context) error {
|
||||||
b.StateOutPath = path
|
b.StateOutPath = path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if raw, ok := d.GetOk("workspace_dir"); ok {
|
||||||
|
path := raw.(string)
|
||||||
|
if path != "" {
|
||||||
|
b.StateEnvDir = path
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legacy name, which ConflictsWith workspace_dir
|
||||||
if raw, ok := d.GetOk("environment_dir"); ok {
|
if raw, ok := d.GetOk("environment_dir"); ok {
|
||||||
path := raw.(string)
|
path := raw.(string)
|
||||||
if path != "" {
|
if path != "" {
|
||||||
|
|
Loading…
Reference in New Issue