Use for_each + templatefile instead of template_dir #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To avoid template provider issue on windows: hashicorp/terraform-provider-template#73
Even though this PR still uses local_file resource, the change would also make it easier to change resource type to
aws_s3_bucket_object
by patching the content of the module.I'd like to customize the module for putting all generated files to s3 instead of local filesystem.
Changing all
local_file
toaws_s3_bucket_object
still requires some work when new files are added to the module, but better than nothing.I suppose it's also possible to output only content of generated manifests. That way, users of the module could put content to remote store like S3 if they want.
Let's start with this PR anyway, so that we could avoid making BC-breaking changes to the module.
template_dir
resource type doesn't support outputting to s3 and probably never will. Since the name of generated files is not included in the plan, it's not possible to consume generated files either without writing hand-written scripts.