Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend file block functionality in the instance resource to provide more granular control #91

Open
tregubovav-dev opened this issue Jun 26, 2024 · 0 comments
Labels
Documentation Documentation needs updating Easy Good for new contributors Feature New feature, not a bug

Comments

@tregubovav-dev
Copy link

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:

  • manipulate with directories and symlink files
  • support file deletion

Proposal

To extend file block configuration in incus_instance resource with attributes:

  • type (optional) with values:
    • file (default), covers already implemented functionality
    • directory, manipulates with the single directory. Additional validation: contentattribute must benull`
    • symlink, manipulates with the symlink file. Additional validation: content attribute must be one-line string.
  • operation (optional) with values:
    • override (default), creates new file, symlink, or directory if it not exists; overrides content of regular file or changes link target for symlink if it exists; keeps existing directory if it exists.
    • append, appends content of file if it's exists. Probably additional discussion about how to handle symlink, directory or non-exist file is needed .
@stgraber stgraber changed the title Enhancement: Extend file block functionality in the instance resource to provide more granular control Extend file block functionality in the instance resource to provide more granular control Aug 22, 2024
@stgraber stgraber added Easy Good for new contributors Feature New feature, not a bug Documentation Documentation needs updating labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating Easy Good for new contributors Feature New feature, not a bug
Development

No branches or pull requests

2 participants