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
@radeksimko@stack72 I would love your input on whether we can reopen the development referenced in #13574.
The solution provided doesn't appear to actually help resolve the problem it was created to resolve. It is meant to provide a way to interpolate the tags passed to the ASG, but because there seems no combination of interpolation functions that can help construct a list of maps from any other source of data other that a manually defined list of maps, its no more useful than just creating the tag blocks individually supplying interpolated values.
Pretty much everyone I've seen that needs a solution for this is trying to apply the same map of tags to ASGs as to other things and their source data is a map.
I appreciate the difficulties in managing the data structure validation, but I think I might have a better alternative than the provided solution which would at least in the short term provide the solution we need.
Given that the third parameter is simply a boolean for propagation, and therefore can have only two values, why not use the same approach as with versioned and nonversioned objects in S3 lifecycle rules?
propagate_tags
nonpropogate_tags
Both could be supplied as a map, and while mutually exclusive with the other tag options, you could provide either one or both. Terraform then only needs to internally constructed two lists of blocks, one where each kv pair recieves propagate = true and one which receives propagate = false. Concatenate that list of maps and boom... profit.
The only other option I can see is to create an interpolation function that takes a map, and generates the output we need for the tags list.. but I cant work out how that would work as a generic function. For inputs you'd need a map, a key key, a value key, and then an optional additional map to merge with every map in the generated list
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.
ghost
locked and limited conversation to collaborators
Apr 8, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Taken from HangOps #terraform
@radeksimko @stack72 I would love your input on whether we can reopen the development referenced in #13574.
The solution provided doesn't appear to actually help resolve the problem it was created to resolve. It is meant to provide a way to interpolate the tags passed to the ASG, but because there seems no combination of interpolation functions that can help construct a list of maps from any other source of data other that a manually defined list of maps, its no more useful than just creating the tag blocks individually supplying interpolated values.
Pretty much everyone I've seen that needs a solution for this is trying to apply the same map of tags to ASGs as to other things and their source data is a map.
I appreciate the difficulties in managing the data structure validation, but I think I might have a better alternative than the provided solution which would at least in the short term provide the solution we need.
Given that the third parameter is simply a boolean for propagation, and therefore can have only two values, why not use the same approach as with versioned and nonversioned objects in S3 lifecycle rules?
propagate_tags
nonpropogate_tags
Both could be supplied as a map, and while mutually exclusive with the other tag options, you could provide either one or both. Terraform then only needs to internally constructed two lists of blocks, one where each kv pair recieves propagate = true and one which receives propagate = false. Concatenate that list of maps and boom... profit.
The only other option I can see is to create an interpolation function that takes a map, and generates the output we need for the tags list.. but I cant work out how that would work as a generic function. For inputs you'd need a map, a key key, a value key, and then an optional additional map to merge with every map in the generated list
maplist(inputmap, keykey, valkey [, mergemap]) => list(merge(map(keykey, keys(inputmap), valkey, values(inputmap)),mergemap), ...)
I can't imagine that solution having any other use or being particularly easy to implement
The text was updated successfully, but these errors were encountered: