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

Revisiting AWS ASG Tagging #15298

Closed
Zordrak opened this issue Jun 15, 2017 · 2 comments
Closed

Revisiting AWS ASG Tagging #15298

Zordrak opened this issue Jun 15, 2017 · 2 comments

Comments

@Zordrak
Copy link

Zordrak commented Jun 15, 2017

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

@Zordrak
Copy link
Author

Zordrak commented Jun 15, 2017

Moved to hashicorp/terraform-provider-aws#874

@Zordrak Zordrak closed this as completed Jun 15, 2017
@ghost
Copy link

ghost commented Apr 8, 2020

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 ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant