@@ -8,10 +8,11 @@ import (
88 "time"
99
1010 "github.com/aws/aws-sdk-go/aws/arn"
11- v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2"
1211 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1312 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1413 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
14+
15+ v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2"
1516)
1617
1718func getSecureOnboardingClient (c SysdigClients ) (v2.OnboardingSecureInterface , error ) {
@@ -344,6 +345,15 @@ func dataSourceSysdigSecureCloudIngestionAssets() *schema.Resource {
344345 },
345346
346347 Schema : map [string ]* schema.Schema {
348+ "cloud_provider" : {
349+ Type : schema .TypeString ,
350+ Required : true ,
351+ ValidateFunc : validation .StringInSlice ([]string {"aws" , "gcp" , "azure" }, false ),
352+ },
353+ "cloud_provider_id" : {
354+ Type : schema .TypeString ,
355+ Required : true ,
356+ },
347357 "aws" : {
348358 Type : schema .TypeMap ,
349359 Computed : true ,
@@ -359,6 +369,14 @@ func dataSourceSysdigSecureCloudIngestionAssets() *schema.Resource {
359369 Type : schema .TypeMap ,
360370 Computed : true ,
361371 },
372+ "sns_routing_key" : {
373+ Type : schema .TypeString ,
374+ Computed : true ,
375+ },
376+ "sns_metadata" : {
377+ Type : schema .TypeMap ,
378+ Computed : true ,
379+ },
362380 },
363381 }
364382}
@@ -370,7 +388,7 @@ func dataSourceSysdigSecureCloudIngestionAssetsRead(ctx context.Context, d *sche
370388 return diag .FromErr (err )
371389 }
372390
373- assets , err := client .GetCloudIngestionAssetsSecure (ctx )
391+ assets , err := client .GetCloudIngestionAssetsSecure (ctx , d . Get ( "cloud_provider" ).( string ), d . Get ( "cloud_provider_id" ).( string ) )
374392 if err != nil {
375393 return diag .FromErr (err )
376394 }
@@ -380,8 +398,10 @@ func dataSourceSysdigSecureCloudIngestionAssetsRead(ctx context.Context, d *sche
380398
381399 d .SetId ("cloudIngestionAssets" )
382400 err = d .Set ("aws" , map [string ]interface {}{
383- "eventBusARN" : assetsAws ["eventBusARN" ],
384- "eventBusARNGov" : assetsAws ["eventBusARNGov" ],
401+ "eventBusARN" : assetsAws ["eventBusARN" ],
402+ "eventBusARNGov" : assetsAws ["eventBusARNGov" ],
403+ "sns_routing_key" : assetsAws ["snsRoutingKey" ],
404+ "sns_metadata" : assetsAws ["snsMetadata" ],
385405 })
386406 if err != nil {
387407 return diag .FromErr (err )
0 commit comments