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

Support for Tags #172

Open
grahamc opened this issue Jul 8, 2022 · 7 comments
Open

Support for Tags #172

grahamc opened this issue Jul 8, 2022 · 7 comments

Comments

@grahamc
Copy link
Contributor

grahamc commented Jul 8, 2022

I'm looking at using coldsnap as an input to my terraform codebase for deploying. I'm thinking about querying the uploaded snapshots with Terraform's snapshot data source, creating AMIs, and then using that as the input for launchconfigs. To make this work, it'd be interesting to have support for tagging snapshots to give more details for the snapshot data source.

I wonder if there are any opinions of if this is a good workflow in general? Perhaps there are other workflows that someone else here could suggest as an alternative?

Separately, would a PR implementing support for arbitrary tags be wanted?

@jpculp
Copy link
Contributor

jpculp commented Jul 11, 2022

Hi @grahamc, thanks for reaching out! That seems like a fine workflow to me. Regarding a PR, of course we always appreciate community engagement and contributions. Otherwise, I can discuss the feature request with the team.

@grahamc
Copy link
Contributor Author

grahamc commented Sep 29, 2022

Hey @jpculp, obviously (:)) I haven't sent a PR... I don't suppose you've discussed it with the team?

@jpculp
Copy link
Contributor

jpculp commented Oct 3, 2022

Hi @grahamc, no worries! I'll bring it up at our next team meeting.

@bcressey
Copy link
Contributor

bcressey commented Oct 5, 2022

In general where I'd hesitate would be if the feature would require calling other, non-EBS APIs.

However, it looks like the StartSnapshot API supports passing a list of tags, so I think this would largely be a matter of figuring out the right shape for the CLI and then how to get argh to deserialize that as a HashMap<String, String>.

My first instinct would be something like:

--tag foo --tag bar=baz

But that might be too restrictive or ambiguous given the allowed characters:

In general, the allowed characters are letters, numbers, spaces representable in UTF-8, and the following characters: _ . : / = + - @.

I'm not sure what the specific restrictions (if any) for snapshot tags are.

@bcressey
Copy link
Contributor

bcressey commented Oct 5, 2022

Maybe either of these:

--tag foo --tag bar,baz
--tag Key=foo Key=bar,Value=baz

With a preference for the first form, if commas aren't a valid character.

@grahamc
Copy link
Contributor Author

grahamc commented Oct 5, 2022

I don't have a stake in the design here, but I feel that sticking closer to the design used by aws cli (--tags Key=webserver,Value= Key=stack,Value=Production) may be good for consistency? Using a comma to separate the key from value would be surprising to me.

@bcressey
Copy link
Contributor

bcressey commented Oct 5, 2022

Since coldsnap is one of the projects supported by the Bottlerocket team at AWS, you're also welcome to show up at the Bottlerocket community meeting to chat about coldsnap usage if you'd like! Next meeting should be in a few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants