Ability to retrieve (via datasource) secure files
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
It would be amazing to be able to retrieve secure_files via a datasource https://docs.gitlab.com/api/secure_files/
data "gitlab_secure_file" "this" {
project = "123" # ID or Path
id = "<file-id>" # If known ahead of time
name = "my-file" # via list, gets ID to then download
}
In the above:
-
projectMUST be passed - ID or path -
idornameMUST be passed
Effectively the behaviour would be as follows:
- if
nameis provided, list secure-files to source theid, download file contents and expose it ondata.gitlab_secure_file.this.data - if
idprovided, download file contents and expose it ondata.gitlab_secure_file.this.data
Optionally, we can expose .name , .id etc aswell (we could make the behaviour for id and name cause a "list" to enable additional information per the linked documentation above.
I'd actually really like to contribute this one if possible as i have a direct need for it in my tofu
Edited by 🤖 GitLab Bot 🤖