Extend file block functionality in the instance resource to provide more granular control #91
Labels
Documentation
Documentation needs updating
Easy
Good for new contributors
Feature
New feature, not a bug
Problem
terraform-provider-incus
provided only subset of/1.0/instances/{name}/files
functionality. It allows only to upload regular files and update owners and permissions.Incus API provides additional functionality:
directories
andsymlink
filesProposal
To extend
file
block configuration inincus_instance
resource with attributes:type
(optional) with values:file
(default), covers already implemented functionalitydirectory, manipulates with the single directory. Additional validation:
contentattribute must be
null`symlink
, manipulates with thesymlink
file. Additional validation:content
attribute must be one-line string.override
(default), creates newfile
,symlink
, ordirectory
if it not exists; overrides content of regularfile
or changes link target forsymlink
if it exists; keeps existing directory if it exists.append
, appends content of file if it's exists. Probably additional discussion about how to handlesymlink
,directory
or non-exist file is needed .The text was updated successfully, but these errors were encountered: