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

Feature/37 terraform created files in archive #38

Conversation

taylorludwig
Copy link
Contributor

Fixes #37

Uses an approach similar to described in hashicorp/terraform-provider-archive#11

Adds a new optional input var source_dependent_files that can take a list of local_file resources.

This then forces the archive to not be created until all other terraform created files are in the source directory. Prior to this the archive would be created before any terraform created local_files existed.

With the extra null_resource and null_data_source workaround it allows terraform to converge (terraform plan/apply wont show changes unless there are actual file changes in source_directory or terraform created local_files). The comment above describes more why the workaround is needed.

A new example and test is created to demonstrate this by simply having the function return back the value of the random created terraform file.

Once this is in we can go back and properly fix terraform-google-modules/terraform-google-slo#7

@ocervell
Copy link

ocervell commented Dec 16, 2019

@taylorludwig thank you so much for this and creating a PR in terraform-google-slo too ! Will test this out and review shortly.

Copy link
Contributor

@aaron-lane aaron-lane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @taylorludwig!

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
examples/automatic-labelling-folder/variables.tf Outdated Show resolved Hide resolved
examples/dynamic-files/README.md Outdated Show resolved Hide resolved
examples/dynamic-files/main.tf Outdated Show resolved Hide resolved
examples/dynamic-files/outputs.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
@aaron-lane aaron-lane merged commit 841c5fa into terraform-google-modules:master Dec 17, 2019
@ocervell
Copy link

@taylorludwig thanks so much for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants