-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add support for setting the file mode #5
base: master
Are you sure you want to change the base?
Conversation
I don't understand why the test fails; locally it passes. I suspect it might have something to do with left-over artifacts from previous test runs, but I'll investigate. |
Hi @koenw! Thanks for working on this. I'm not sure what causes the difference in the test behavior here either, but my first suspicion would be that this is being caused by To get the exact mode requested, it would be necessary to call This sort of complexity is, unfortunately, why Terraform does not generally try to do anything special with file permissions: they are necessarily OS-specific. We generally expect the process to be running with a reasonable umask (on platforms where that is a concept) so that files will, in practice, get a good default set of permissions similar to what would happen if you created the file using shell I/O redirection, for example. Perhaps a reasonable compromise here is to provide a boolean |
Is anyone still working on this? @koenw I'd be happy to add the requested changes. |
This could potentially resolve #19. Am I reading right that it's still setting 0777 by default, though? Is that intended to interact with |
Modes are now supported (implemented in pull request #30), see |
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
We're using the
local_file
provider to manage files with sensitive content, so it's nice to be able to set the file permissions too.