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

Resource artifactory_artifact should accept file content from variable. #1083

Open
pascal-hofmann opened this issue Sep 25, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@pascal-hofmann
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to upload a file to artifactory whose contents depend on terraform resources. I tried using local_file as a workaround to get the data passed to resource artifactory_artifact but during planning terraform bails out with

Error: Invalid file path
[…]
stat ./somefile: no such file or directory

Describe the solution you'd like
Resource artifactory_artifact should have a param content that can be used to pass in the desired file content.

@pascal-hofmann pascal-hofmann added the enhancement New feature or request label Sep 25, 2024
@alexhung
Copy link
Member

@pascal-hofmann Thanks for the suggestion. I've added this to our plan.

@alexhung
Copy link
Member

@alexhung
Copy link
Member

@pascal-hofmann Question: what type of data would you use with this content attribute? Binary? String?

Terraform does not support binary, so the next logical type is string. The more I think about this, the less useful I feel. Uploading a string type artifact seems unusual to me.

@alexhung alexhung added the question Further information is requested label Nov 6, 2024
@RedlineTriad
Copy link

RedlineTriad commented Nov 19, 2024

@pascal-hofmann Question: what type of data would you use with this content attribute? Binary? String?

@alexhung I think it would make the most sense to model this based on the local_file provider which supports content and content_base64 for binary data:
https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file

And I am in the same boat of where having this would make the provider significantly nicer to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants