Repository navigation
Manage CloudFromation Stack tags - #17
Conversation
|
|
||
| Resource-specific tags have precedence over global tags. Thus if a tag is defined at command-line arguments and for a `Stack` resource, the value from the `Stack` resource will be used. | ||
|
|
||
| If we run the operation and a `Stack` resource with the describved above examples, we'll see such picture: |
There was a problem hiding this comment.
Hey @davidxjohnson , thank you, fixed. Along with some other texting issues.
|
@spa-87 awesome! I changed it a little to not require to parse json by using Let me know what you think. |
|
@linki it's ok for me |
|
@spa-87 Thank you! |
|
Hi @linki, I've found a bug with the approach based on |
|
If |
|
Damn 😞 There's one way to make it work by using kingpin's custom parser and building a slightly modified version of the StringMap parser (differs only in the regexp). I tested it quickly here which needs to be cleaned up but it seems to work: $ KUBERNETES_CONFIG=~/.kube/config go run ./cmd/cloudformation-operator/main.go --region eu-central-1 --dry-run --debug --tag sos:biliing:environment=qa
ERROR: logging before flag.Parse: E1106 16:40:59.504621 23339 memcache.go:153] couldn't get resource list for external.metrics.k8s.io/v1beta1: <nil>
(*map[string]string)(0xc4202f2180)((len=1) {
(string) (len=23) "sos:biliing:environment": (string) (len=2) "qa"
})If you still prefer the JSON approach I'm fine with that, too. |
|
It's ok for me to stay with Thank you for the fast response. |
|
Merged. Thanks for cleaning it up! |
Hello. I've implemented a possibility to manage tags for CloudFormation Stack. This feature is critical for us because we actively use tags for AWS billing reports.
In order to not to make developers assign global tags like environment, we want to define such tags as a command-line argument. But component-specific tags can be received only from a Stack resource. So we've implemented both possibilities: