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

add support for buildkite token from ssm #76

Merged
merged 3 commits into from
Apr 30, 2019

Conversation

arromer
Copy link
Contributor

@arromer arromer commented Mar 26, 2019

ssm support extracted from #59

@lox
Copy link
Contributor

lox commented Mar 26, 2019

Thanks @arromer, this looks good. Perhaps could we go for BUILDKITE_AGENT_TOKEN_SSM_PARAM that specifies a path in SSM to look for? That way folks can customize there that token lives vs it being hard-coded.

backend/ssm.go Outdated
"sync"
)

var ssmClient *ssm.SSM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think it's worth caching this client between lambda invocations?

backend/ssm.go Outdated

func GetSsmClient() *ssm.SSM {
once.Do(func() {
ssmClient = ssm.New(session.Must(session.NewSession()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps move this into RetrieveFromParameterStore and use an if ssmClient != nil check vs sync.once.

arromer added a commit to arromer/buildkite-agent-metrics that referenced this pull request Mar 28, 2019
@lox
Copy link
Contributor

lox commented Apr 30, 2019

Sorry for being slow to get this merged in, really appreciate your patience and the contribution! 🙌🏻

@lox lox merged commit 1d5c59d into buildkite:master Apr 30, 2019
@arromer arromer deleted the andres/token-in-ssm branch May 1, 2019 05:20
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

Successfully merging this pull request may close these issues.

2 participants