You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Iterating over a resource using a for_each loop, but the set to be iterated over is not known until after apply.
In the case below, the identity attribute of azurerm_windows_function_app is an array of identity objects and the number of items in the array is not known until after apply.
The proposed solution from the command line output is to use --target to apply the function app resource first and then apply the remaining resources. This works but is not scalable.
Every other solution I've tried resolves back to the same error
Proposal
Implement a method to allow resources to be planned and applied after the initial apply, potentially iterating multiple times if needed. This could be done at the level of Terraform itself, the provider, or most likely the resource as a lifecycle argument.
lifecycle {
plan_after_apply = true
}
References
No response
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version
Use Cases
Iterating over a resource using a
for_each
loop, but the set to be iterated over is not known until after apply.In the case below, the
identity
attribute ofazurerm_windows_function_app
is an array ofidentity
objects and the number of items in the array is not known until after apply.Attempted Solutions
The proposed solution from the command line output is to use
--target
to apply the function app resource first and then apply the remaining resources. This works but is not scalable.Every other solution I've tried resolves back to the same error
Proposal
Implement a method to allow resources to be planned and applied after the initial apply, potentially iterating multiple times if needed. This could be done at the level of Terraform itself, the provider, or most likely the resource as a lifecycle argument.
References
No response
The text was updated successfully, but these errors were encountered: