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

feat(remote/aws): support AWS Secrets Manager as remote component #718

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

hainenber
Copy link
Contributor

@hainenber hainenber commented Apr 30, 2024

PR Description

Which issue(s) this PR fixes

Closes #689

Notes to the Reviewer

  • Should I poll the Secrets Manager API continuously to fetch latest secret. Pricing per API calls for Secrets Manager is much expensive compared to AWS SSM Parameter Store and AWS S3 API calls so I'm hesitant to implement poller. Would like to hear everyone thoughts about it.
  • I expose the inner component.Component in componenttest in order to verify the component's health status. Is this A-OK?

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests added

@hainenber hainenber changed the title Support aws secret manager as remote component Support AWS Secrets Manager as remote component Apr 30, 2024
@mattdurham
Copy link
Collaborator

I think it would be nice if it could poll but set the default to not poll. Most of our pulling mechanisms support it so it would be odd if this one did not have that capability.

@hainenber
Copy link
Contributor Author

Thanks Matt! I'll implement the poller and fix whatever makes the tests failed.

Maybe in the long run, we can have a reusable implementation. But that's for another day, I suppose :D

@hainenber hainenber changed the title Support AWS Secrets Manager as remote component feat(remote/aws): support AWS Secrets Manager as remote component May 1, 2024
@@ -106,11 +100,11 @@ func (s *Component) Run(ctx context.Context) error {
func (s *Component) Update(args component.Arguments) error {
newArgs := args.(Arguments)

s3cfg, err := generateS3Config(newArgs)
awsCfg, err := aws_common_config.GenerateAWSConfig(newArgs.Options.Client)
if err != nil {
return nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rfratto pinging 'cause you authored this in the past. Do you know why this returns nil in the present of non-nil error? 👀

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label May 2, 2024
@rfratto rfratto added the backport-to-agent:no PR should NOT be backported to the agent repo. label May 3, 2024
@clayton-cornell clayton-cornell requested a review from a team May 13, 2024 16:42
@clayton-cornell
Copy link
Contributor

Docs look ok.

@hainenber hainenber force-pushed the support-aws-secret-manager-as-remote-component branch from 68ec808 to e453b57 Compare May 14, 2024 15:02
hainenber and others added 10 commits May 16, 2024 22:05
…tions used in remote AWS components

Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
…n test in Docker-present env

Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
…ial poller is configured

Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
@hainenber hainenber force-pushed the support-aws-secret-manager-as-remote-component branch from e453b57 to 20a34d0 Compare May 16, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-agent:no PR should NOT be backported to the agent repo. type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support AWS secret manager
4 participants