Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions deepfence_agent/tools/apache/scope/probe/host/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ func getCloudMetadata(cloudProvider string) (string, cloud_metadata.CloudMetadat
cloudMetadata.CloudProvider = report.CloudProviderServerless
cloudMetadata.Region = report.CloudRegionServerless
}
customCloudProvider := os.Getenv("CLOUD_PROVIDER")
if customCloudProvider != "" {
log.Info().Msgf("CLOUD_PROVIDER was configured")
cloudProvider = customCloudProvider
cloudMetadata.CloudProvider = customCloudProvider
}
customCloudRegion := os.Getenv("CLOUD_REGION")
if customCloudRegion != "" {
log.Info().Msgf("CLOUD_REGION was configured")
cloudMetadata.Region = customCloudRegion
}
if cloudProvider == "" {
cloudProvider = DefaultCloud
cloudMetadata = cloud_metadata.CloudMetadata{
Expand Down