Skip to content

Commit

Permalink
add region fallback for kinesis and SH
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
  • Loading branch information
fjogeleit committed Sep 14, 2024
1 parent ce9aae7 commit 4d7a2e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/target/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ func (f *TargetFactory) CreateKinesisTarget(config, parent *target.Config[target
return nil
}

setFallback(&config.Config.Region, os.Getenv("AWS_REGION"))

config.MapBaseParent(parent)

kinesisClient := aws.NewKinesisClient(
Expand Down Expand Up @@ -628,6 +630,7 @@ func (f *TargetFactory) CreateSecurityHubTarget(config, parent *target.Config[ta
if config.Config.AccountID == "" {
return nil
}
setFallback(&config.Config.Region, os.Getenv("AWS_REGION"))

sugar := zap.S()
if err := checkAWSConfig(config.Name, config.Config.AWSConfig, parent.Config.AWSConfig); err != nil {
Expand Down

0 comments on commit 4d7a2e2

Please sign in to comment.