@@ -13,23 +13,23 @@ Feature: AWS Integration
1313 Scenario : Create an AWS account returns "AWS Account object" response
1414 Given operation "CreateAWSAccount" enabled
1515 And new "CreateAWSAccount" request
16- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
16+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "{{ unique_aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
1717 When the request is sent
1818 Then the response status is 200 AWS Account object
1919
2020 @team:DataDog/aws-integrations
2121 Scenario : Create an AWS integration returns "AWS Account object" response
2222 Given operation "CreateAWSAccount" enabled
2323 And new "CreateAWSAccount" request
24- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
24+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "{{ unique_aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
2525 When the request is sent
2626 Then the response status is 200 AWS Account object
2727
2828 @team:DataDog/aws-integrations
2929 Scenario : Create an AWS integration returns "Bad Request" response
3030 Given operation "CreateAWSAccount" enabled
3131 And new "CreateAWSAccount" request
32- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws-invalid" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
32+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "{{ unique_aws_account_id }} " , "aws_partition" : "aws-invalid" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
3333 When the request is sent
3434 Then the response status is 400 Bad Request
3535
@@ -38,7 +38,7 @@ Feature: AWS Integration
3838 Given operation "CreateAWSAccount" enabled
3939 And there is a valid "aws_account_v2" in the system
4040 And new "CreateAWSAccount" request
41- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
41+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "{{ aws_account_v2.data.attributes.aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
4242 When the request is sent
4343 Then the response status is 409 Conflict
4444
@@ -140,7 +140,7 @@ Feature: AWS Integration
140140 And there is a valid "aws_account_v2" in the system
141141 And new "UpdateAWSAccount" request
142142 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
143- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
143+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "{{ aws_account_v2.data.attributes.aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
144144 When the request is sent
145145 Then the response status is 200 AWS Account object
146146
@@ -150,7 +150,7 @@ Feature: AWS Integration
150150 And there is a valid "aws_account_v2" in the system
151151 And new "UpdateAWSAccount" request
152152 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
153- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
153+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "{{ aws_account_v2.data.attributes.aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
154154 When the request is sent
155155 Then the response status is 400 Bad Request
156156
@@ -159,6 +159,6 @@ Feature: AWS Integration
159159 Given operation "UpdateAWSAccount" enabled
160160 And new "UpdateAWSAccount" request
161161 And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
162- And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012 " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012 :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
162+ And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "{{ unique_aws_account_id }} " , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }} :function:DatadogLambdaLogForwarder" ], "sources" : ["s3" ], "log_source_config" : { "tag_filters" : [{ "source" : "s3" , "tags" : [ "test:test" ]}]} }}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
163163 When the request is sent
164164 Then the response status is 404 Not Found
0 commit comments