@@ -428,7 +428,7 @@ func dataSourceSysdigSecureCloudIngestionAssetsRead(ctx context.Context, d *sche
428428 return diag .FromErr (err )
429429 }
430430 } else {
431- // AWS Api Destination case
431+ // AWS EventBridge case
432432 assets , err = client .GetCloudIngestionAssetsSecure (ctx , d .Get ("cloud_provider" ).(string ), d .Get ("cloud_provider_id" ).(string ), componentType .(string ))
433433 if err != nil {
434434 return diag .FromErr (err )
@@ -437,17 +437,19 @@ func dataSourceSysdigSecureCloudIngestionAssetsRead(ctx context.Context, d *sche
437437 assetsAws , _ := assets ["aws" ].(map [string ]interface {})
438438
439439 var ingestionURL string
440- if assetsAws ["apiDestMetadata" ] != nil {
441- ingestionURL = assetsAws ["apiDestMetadata" ].(map [string ]interface {})["ingestionURL" ].(string )
440+ var apiKey string
441+ if assetsAws ["ebMetadata" ] != nil {
442+ ingestionURL = assetsAws ["ebMetadata" ].(map [string ]interface {})["ingestionURL" ].(string )
443+ apiKey = assetsAws ["ebMetadata" ].(map [string ]interface {})["apiKey" ].(string )
442444 }
443445
444446 d .SetId ("cloudIngestionAssets" )
445447 err = d .Set ("aws" , map [string ]interface {}{
446- "eventBusARN" : assetsAws ["eventBusARN" ],
447- "eventBusARNGov" : assetsAws ["eventBusARNGov" ],
448- "api_dest_routing_key " : assetsAws ["apiDestRoutingKey " ],
449- "api_dest_routing_url " : ingestionURL ,
450- "api_dest_token " : assetsAws [ "apiDestToken" ] ,
448+ "eventBusARN" : assetsAws ["eventBusARN" ],
449+ "eventBusARNGov" : assetsAws ["eventBusARNGov" ],
450+ "eb_routing_key " : assetsAws ["ebRoutingKey " ],
451+ "eb_routing_url " : ingestionURL ,
452+ "eb_api_key " : apiKey ,
451453 })
452454 if err != nil {
453455 return diag .FromErr (err )
0 commit comments