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

fix: Forces the local_filename output to wait for the package to be built #356

Merged

Conversation

lorengordon
Copy link
Contributor

Description

Uses depends_on to force the output local_filename to wait until the package is available, so the output can be relied on to tailor the terraform graph in cases where the package must be available before it is used.

Fixes #355

Motivation and Context

See #355

Breaking Changes

I don't believe there are any breaking changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@antonbabenko antonbabenko changed the title Forces the local_filename output to wait for the package to be built fix: Forces the local_filename output to wait for the package to be built Oct 14, 2022
@antonbabenko antonbabenko merged commit 745dc53 into terraform-aws-modules:master Oct 14, 2022
antonbabenko pushed a commit that referenced this pull request Oct 14, 2022
### [4.1.1](v4.1.0...v4.1.1) (2022-10-14)

### Bug Fixes

* Forces the local_filename output to wait for the package to be built ([#356](#356)) ([745dc53](745dc53))
@antonbabenko
Copy link
Member

This PR is included in version 4.1.1 🎉

@lorengordon
Copy link
Contributor Author

@antonbabenko You are amazing. 🥇

Example output showing the lambda function is waiting for the package to finish:

module.test_create_package.null_resource.archive[0] (local-exec): Base64sha256: mjUxYWr/sarJAcoe9xYIG6+geDQg4Gn9+/h8HNhhtPQ=
module.test_create_package.null_resource.archive[0]: Creation complete after 11s [id=1861059490256417180]
module.test_create_function.module.lambda.aws_lambda_function.this[0]: Creating...
module.test_create_function.module.lambda.aws_lambda_function.this[0]: Still creating... [10s elapsed]
module.test_create_function.module.lambda.aws_lambda_function.this[0]: Creation complete after 12s [id=foo]

@lorengordon lorengordon deleted the filename-depends branch October 14, 2022 18:51
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output local_filename is available _before_ the package is available
2 participants