-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Terraform CLI and Provider Versions
Terraform 0.14.6
hashicorp/archive v2.2.0
Use Cases or Problem Statement
I wanted to zip a folder and add a single extra file to the archive which is a config file created using the templatefile function. If I can add the content directly to the zip then I don't need to use the local_file resource, which creates churn at plan time.
I got the error message from
ConflictsWith: []string{"source_file", "source_dir", "source_content", "source_content_filename"}, |
about source_dir and source conflicting.
I was wondering what the conflict was as I couldn't think what the conflict could be (duplicate filenames seem possible with source too).
Proposal
Adjust validation so source_dir and source can be specified at the same time.
I could imagine it's desirable to create a "source_file" block attribute that contains file include/excludes, and they could be mixed with the current source blocks. That sounds like a lot more work though.
How much impact is this issue causing?
Low
Additional Information
Big benefit of this would be removal of plan churn because the only current way to make this work is to use local_file provider
Code of Conduct
- I agree to follow this project's Code of Conduct