Skip to content

Commit

Permalink
Add secretsmanager confmap provider (#1324)
Browse files Browse the repository at this point in the history
* Add secretsmanager confmap provider

* tidy deps

* tidy deps
  • Loading branch information
hkarn-godaddy authored Jun 13, 2024
1 parent 10cc2ef commit 03c6acb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require (
github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259
github.com/google/go-cmp v0.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0
github.com/open-telemetry/opentelemetry-lambda/collector/lambdacomponents v0.98.0
github.com/open-telemetry/opentelemetry-lambda/collector/lambdalifecycle v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -55,6 +56,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 // indirect
Expand Down
4 changes: 4 additions & 0 deletions collector/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfR
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM=
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0=
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM=
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1 h1:NSWsFzdHN41mJ5I/DOFzxgkKSYNHQADHn7Mu+lU/AKw=
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1/go.mod h1:5mMk0DgUgaHlcqtN65fNyZI0ZDX3i9Cw+nwq75HKB3U=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ=
Expand Down Expand Up @@ -417,6 +419,8 @@ github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mL
github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0 h1:IhXkhX9xl3zkWe+JKuzlgmSsN0esLGLHai+tjKuzrMs=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0/go.mod h1:zzrJwGGJmMcGnyjMcmiU+5gHRZfifkW5KwxNsswrZXA=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0 h1:l9fWmXpK0BZwfbTKu733OFTz1soH3s70wYWl2uRabvo=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0/go.mod h1:L2Y0/PMfHqJ2KcHp1igf4qxHug5UUp2kvIfAEbRpVSk=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.102.0 h1:jyFZk2+JJNp74U+KnHVw1xyWQuTEGcJjyl918Nh1Qbc=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.102.0/go.mod h1:xR0NbceSTwHMGKmFTv7M3/9nnhHBkYH/hjcRIi67cUE=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.102.0 h1:X9cOU9eRDcVSiptZl53Rs170Upt48DMulq9qlYl5Khk=
Expand Down
3 changes: 2 additions & 1 deletion collector/internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"os"

"github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider"
"github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap"
"go.opentelemetry.io/collector/confmap/converter/expandconverter"
Expand Down Expand Up @@ -60,7 +61,7 @@ func NewCollector(logger *zap.Logger, factories otelcol.Factories, version strin
cfgSet := otelcol.ConfigProviderSettings{
ResolverSettings: confmap.ResolverSettings{
URIs: []string{getConfig(l)},
ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory(), envprovider.NewFactory(), yamlprovider.NewFactory(), httpprovider.NewFactory(), s3provider.NewFactory()},
ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory(), envprovider.NewFactory(), yamlprovider.NewFactory(), httpprovider.NewFactory(), s3provider.NewFactory(), secretsmanagerprovider.NewFactory()},
ConverterFactories: []confmap.ConverterFactory{
expandconverter.NewFactory(),
confmap.NewConverterFactory(func(set confmap.ConverterSettings) confmap.Converter {
Expand Down

0 comments on commit 03c6acb

Please sign in to comment.