Skip to content

Commit

Permalink
Merge pull request #81 from Clever/pod-tagging
Browse files Browse the repository at this point in the history
Additional pod tags from env vars
  • Loading branch information
Sayan- authored Nov 25, 2019
2 parents 46319fd + 842de54 commit 45827fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.7
0.3.8
10 changes: 10 additions & 0 deletions cmd/sfncli/sfncli.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@ func tagsFromEnv() []*sfn.Tag {
if pod := os.Getenv("_POD_ID"); pod != "" {
tags = append(tags, &sfn.Tag{Key: aws.String("pod"), Value: aws.String(pod)})
}
if shortname := os.Getenv("_POD_SHORTNAME"); shortname != "" {
tags = append(tags, &sfn.Tag{Key: aws.String("pod-shortname"), Value: aws.String(shortname)})
}
if region := os.Getenv("_POD_REGION"); region != "" {
tags = append(tags, &sfn.Tag{Key: aws.String("pod-region"), Value: aws.String(region)})
}
if account := os.Getenv("_POD_ACCOUNT"); account != "" {
tags = append(tags, &sfn.Tag{Key: aws.String("pod-account"), Value: aws.String(account)})
}

return tags
}

Expand Down

0 comments on commit 45827fc

Please sign in to comment.