-
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
local_file resource crashes when replacing file with empty content #15
Labels
Comments
With Terraform 0.12 (at hashicorp/terraform@00cc578), this bug no longer causes unexpected behaviour from the user's perspective, but an invalid state file is still produced. Terraform 0.11With the reproduction steps above: State file
Terraform 0.12With the reproduction steps above: Actual behaviour
File State file
Log
|
This isn't reproducible with Terrorm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue was originally opened by @ned1313 as hashicorp/terraform#18316. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Error: Error applying plan:
1 error(s) occurred:
Please include the following information in your report:
Expected Behavior
The local file should have been overwritten with new content, in this case an empty string was submitted, so no content in the file.
Actual Behavior
The file was removed.
Steps to Reproduce
terraform init
terraform apply -var "chomp=String with one newline \n" -auto-approve
terraform apply -var "chomp=" -auto-approve
Additional Context
This only seems to happen when there is content in the file and then I am submitting an empty string as the new content.
References
The text was updated successfully, but these errors were encountered: