diff --git a/apis/fluentbit/v1alpha2/plugins/output/s3_types.go b/apis/fluentbit/v1alpha2/plugins/output/s3_types.go index c2e9a925d..640e68148 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/s3_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/s3_types.go @@ -63,7 +63,9 @@ type S3 struct { // Integer value to set the maximum number of retries allowed. RetryLimit *int32 `json:"RetryLimit,omitempty"` // Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. - ExternalId string `json:"ExternalId,omitempty"` + ExternalId string `json:"ExternalId,omitempty"` + // Option to specify an AWS Profile for credentials. + Profile string `json:"Profile,omitempty"` *plugins.TLS `json:"tls,omitempty"` } @@ -154,6 +156,9 @@ func (o *S3) Params(sl plugins.SecretLoader) (*params.KVs, error) { if o.ExternalId != "" { kvs.Insert("external_id", o.ExternalId) } + if o.Profile != "" { + kvs.Insert("profile", o.Profile) + } if o.TLS != nil { tls, err := o.TLS.Params(sl) if err != nil { diff --git a/apis/fluentbit/v1alpha2/plugins/output/s3_types_test.go b/apis/fluentbit/v1alpha2/plugins/output/s3_types_test.go index 39b622d7d..d49712e7f 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/s3_types_test.go +++ b/apis/fluentbit/v1alpha2/plugins/output/s3_types_test.go @@ -40,6 +40,7 @@ func TestOutput_S3_Params(t *testing.T) { StorageClass: "storage_class", RetryLimit: ptrAny(int32(1)), ExternalId: "external_id", + Profile: "my-profile", } expected := params.NewKVs() @@ -69,6 +70,7 @@ func TestOutput_S3_Params(t *testing.T) { expected.Insert("storage_class", "storage_class") expected.Insert("retry_limit", "1") expected.Insert("external_id", "external_id") + expected.Insert("profile", "my-profile") kvs, err := s3.Params(sl) g.Expect(err).NotTo(HaveOccurred())