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(misconf): expand dynamic blocks from top to bottom #7590

Closed
wants to merge 1 commit into from

Conversation

nikpivkin
Copy link
Contributor

@nikpivkin nikpivkin commented Sep 25, 2024

Description

The direction of expanding dynamic blocks has been changed from bottom-up to top-down.

Before

2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting module evaluation...     path="."
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2024-09-25T20:15:12+06:00       ERROR   [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.      block="dynamic.child" value="cty.NilVal"
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Expanded block into clones via 'for_each' attribute.  block="dynamic.block" clones=0
2024-09-25T20:15:12+06:00       ERROR   [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.      block="dynamic.child" value="cty.NilVal"
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Expanded block into clones via 'for_each' attribute.  block="dynamic.block" clones=0
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting post-submodules evaluation...
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-09-25T20:15:12+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1

After

2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting module evaluation...     path="."
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Expanded block into clones via 'for_each' attribute.  block="dynamic.block" clones=0
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Expanded block into clones via 'for_each' attribute.  block="dynamic.block" clones=0
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting post-submodules evaluation...
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-09-25T20:14:11+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
@nikpivkin
Copy link
Contributor Author

Closed in favor of #7612

@nikpivkin nikpivkin closed this Sep 28, 2024
@nikpivkin nikpivkin deleted the tf-dynamics branch September 28, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(terraform): expand dynamic blocks from top to bottom
1 participant