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
Is your feature request related to a problem? Please describe.
Add in an option of filter blocks within terraform so that I can do a data lookup on an object with multiple returns but only have it return based on a filter options. This would help when needing to lookup a network id based on a tag/name/other value.
Currently if i need to lookup a existing network id. i must do a data lookup on all my networks and then using a terraform loop i can loop through and set a local value of what I am trying to get.
For me to get one network id i must first pull in all the networks and then loop through until i can find the one with the correct name.
While it works it does make my state file much larger than it needs due to the data lookup ultimately returning all networks instead of just the one.
If this works then the name would equal the key in the returned and value would be the value on the lookup. This would ideally then do the loop for me ahead of actually storing anything in state and only store the returned value of the one ID.
Describe alternatives you've considered
The current workaround does work, but each site will essentially be storing all sites ids rather than just their own.
Additional context
I am not familiar enough with Go to know exactly how AWS Terraform base code does their filter as their registry is quite extensive.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Add in an option of filter blocks within terraform so that I can do a data lookup on an object with multiple returns but only have it return based on a filter options. This would help when needing to lookup a network id based on a tag/name/other value.
Currently if i need to lookup a existing network id. i must do a data lookup on all my networks and then using a terraform loop i can loop through and set a local value of what I am trying to get.
For me to get one network id i must first pull in all the networks and then loop through until i can find the one with the correct name.
While it works it does make my state file much larger than it needs due to the data lookup ultimately returning all networks instead of just the one.
Describe the solution you'd like
If we can add in a filter block similar to the AWS's registery filter block on their data lookups.
If this works then the name would equal the key in the returned and value would be the value on the lookup. This would ideally then do the loop for me ahead of actually storing anything in state and only store the returned value of the one ID.
Describe alternatives you've considered
The current workaround does work, but each site will essentially be storing all sites ids rather than just their own.
Additional context
I am not familiar enough with Go to know exactly how AWS Terraform base code does their filter as their registry is quite extensive.
The text was updated successfully, but these errors were encountered: