engine: resources: Change the default file state
The default file state should be undefined. This is important because if a reverse scenario that doesn't specify the state gets given this default, it will be as if it was specified explicitly, which wouldn't necessarily be what we want. Instead, an undefined state should implicitly cause a file to get created if there's a reason to do so, such as if content or another attribute is specified. Hopefully this change doesn't introduce any bugs in the CheckApply code, if it does, then it was due to a lack of implicit file creation.
This commit is contained in:
@@ -96,7 +96,7 @@ type FileRes struct {
|
|||||||
// Default returns some sensible defaults for this resource.
|
// Default returns some sensible defaults for this resource.
|
||||||
func (obj *FileRes) Default() engine.Res {
|
func (obj *FileRes) Default() engine.Res {
|
||||||
return &FileRes{
|
return &FileRes{
|
||||||
State: FileStateExists,
|
//State: FileStateUndefined, // the default must be undefined!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user