-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Support for unanchored dynamic blocks #21219
Comments
Hi @mxplusb! Thanks for opening this issue. I think what you're describing here is the same use-case as #17179, where I left some notes about a slightly different approach we're planning to take by adding a The top-level objects in a Terraform configuration cannot be dynamic because Terraform needs to be able to process them before evaluating any expressions in order to build the dependency graph for traversal. However, as we can see with the existing I didn't quite follow exactly how you intended Since we already have #17179 open to track this use-case, I'm going to close this out just to consolidate the discussion. As you can see over there, we're hoping to finish the |
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. |
Current Terraform Version
Use-cases
I'd like to be able to create unanchored
dynamic
resource blocks.This allows me to pass a module a pipelined variable that allows me to dynamically define a
resource
type for highly repetitive tasks. For example, if I haveR
regional deployments withH
hostnames, I then have to provideR*H
A record resources. This starts to become untenable in large distributed systems with dozens of hostnames per system. If I were to support both IPv4 and IPv6 records, then I would haveR*2H
records, thus becoming unmaintainable. By supporting dynamicresource
types, it allows me to create a baseline definition for a record, then pass in pipeline data which can be resolved during the planning phase.Attempted Solutions
None yet, but I'm happy to take a stab at it in my free time if someone can show me where things are.
Proposal
References
Haven't seen any yet.
The text was updated successfully, but these errors were encountered: