Skip to content

Commit 78d29eb

Browse files
committed
Revalidate tests
# Conflicts: # tests/aws/templates/opensearch_domain_alternative_types.yml diff --git c/tests/aws/services/cloudwatch/resources/test_cloudwatch.snapshot.json i/tests/aws/services/cloudwatch/resources/test_cloudwatch.snapshot.json new file mode 100644 index 000000000000..967da1cec049 --- /dev/null +++ i/tests/aws/services/cloudwatch/resources/test_cloudwatch.snapshot.json @@ -0,0 +1,115 @@ +{ + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_creation": { + "recorded-date": "11-04-2025, 12:11:07", + "recorded-content": { + "alarm_outputs": { + "AlarmArnFromAtt": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:<resource:1>", + "AlarmName": "<resource:1>" + } + } + }, + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_composite_alarm_creation": { + "recorded-date": "11-04-2025, 12:12:14", + "recorded-content": { + "composite_alarm": [ + { + "ActionsEnabled": true, + "AlarmActions": [ + "arn:<partition>:sns:<region>:111111111111:<alarm-action-name:1>" + ], + "AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighResourceUsage", + "AlarmConfigurationUpdatedTimestamp": "timestamp", + "AlarmDescription": "Indicates that the system resource usage is high while no known deployment is in progress", + "AlarmName": "HighResourceUsage", + "AlarmRule": "(ALARM(HighCPUUsage) OR ALARM(HighMemoryUsage))", + "InsufficientDataActions": [], + "OKActions": [], + "StateReason": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighResourceUsage was created and its alarm rule evaluates to OK", + "StateReasonData": { + "triggeringAlarms": [ + { + "arn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighMemoryUsage", + "state": { + "value": "INSUFFICIENT_DATA", + "timestamp": "date" + } + }, + { + "arn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighCPUUsage", + "state": { + "value": "INSUFFICIENT_DATA", + "timestamp": "date" + } + } + ] + }, + "StateUpdatedTimestamp": "timestamp", + "StateValue": "OK", + "StateTransitionedTimestamp": "timestamp" + } + ], + "metric_alarm": [ + { + "AlarmName": "HighMemoryUsage", + "AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighMemoryUsage", + "AlarmDescription": "Memory usage is high", + "AlarmConfigurationUpdatedTimestamp": "timestamp", + "ActionsEnabled": true, + "OKActions": [], + "AlarmActions": [], + "InsufficientDataActions": [], + "StateValue": "INSUFFICIENT_DATA", + "StateReason": "Unchecked: Initial alarm creation", + "StateUpdatedTimestamp": "timestamp", + "MetricName": "MemoryUsage", + "Namespace": "CustomNamespace", + "Statistic": "Average", + "Dimensions": [], + "Period": 60, + "EvaluationPeriods": 1, + "Threshold": 65.0, + "ComparisonOperator": "GreaterThanThreshold", + "TreatMissingData": "breaching", + "StateTransitionedTimestamp": "timestamp" + } + ] + } + }, + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_ext_statistic": { + "recorded-date": "11-04-2025, 12:12:29", + "recorded-content": { + "simple_alarm": [ + { + "AlarmName": "<alarm-name:1>", + "AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:<alarm-name:1>", + "AlarmDescription": "uses extended statistic", + "AlarmConfigurationUpdatedTimestamp": "timestamp", + "ActionsEnabled": true, + "OKActions": [], + "AlarmActions": [], + "InsufficientDataActions": [], + "StateValue": "INSUFFICIENT_DATA", + "StateReason": "Unchecked: Initial alarm creation", + "StateUpdatedTimestamp": "timestamp", + "MetricName": "Duration", + "Namespace": "<namespace:1>", + "ExtendedStatistic": "p99", + "Dimensions": [ + { + "Name": "FunctionName", + "Value": "my-function" + } + ], + "Period": 300, + "Unit": "Count", + "EvaluationPeriods": 3, + "DatapointsToAlarm": 3, + "Threshold": 10.0, + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "TreatMissingData": "ignore", + "StateTransitionedTimestamp": "timestamp" + } + ] + } + } +} diff --git c/tests/aws/services/cloudwatch/resources/test_cloudwatch.validation.json i/tests/aws/services/cloudwatch/resources/test_cloudwatch.validation.json new file mode 100644 index 000000000000..69fc7229f988 --- /dev/null +++ i/tests/aws/services/cloudwatch/resources/test_cloudwatch.validation.json @@ -0,0 +1,11 @@ +{ + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_creation": { + "last_validated_date": "2025-04-11T12:11:07+00:00" + }, + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_ext_statistic": { + "last_validated_date": "2025-04-11T12:12:29+00:00" + }, + "tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_composite_alarm_creation": { + "last_validated_date": "2025-04-11T12:12:14+00:00" + } +} diff --git c/tests/aws/services/dynamodb/resources/test_dynamodb.py i/tests/aws/services/dynamodb/resources/test_dynamodb.py index 8aa572c62bf0..43c0bb7ecc76 100644 --- c/tests/aws/services/dynamodb/resources/test_dynamodb.py +++ i/tests/aws/services/dynamodb/resources/test_dynamodb.py @@ -123,12 +123,13 @@ def test_billing_mode_as_conditional(deploy_cfn_template, snapshot, aws_client, "$..Table.Replicas", ] ) -def test_global_table(deploy_cfn_template, snapshot, aws_client): +def test_global_table(deploy_cfn_template, snapshot, aws_client, region_name): snapshot.add_transformer(snapshot.transform.dynamodb_api()) stack = deploy_cfn_template( template_path=os.path.join( os.path.dirname(__file__), "../../../templates/dynamodb_global_table.yml" ), + parameters={"ReplicaRegion": region_name}, ) snapshot.add_transformer(snapshot.transform.key_value("TableName", "table-name")) response = aws_client.dynamodb.describe_table(TableName=stack.outputs["TableName"]) diff --git c/tests/aws/services/dynamodb/resources/test_dynamodb.snapshot.json i/tests/aws/services/dynamodb/resources/test_dynamodb.snapshot.json new file mode 100644 index 000000000000..1bb2728747ac --- /dev/null +++ i/tests/aws/services/dynamodb/resources/test_dynamodb.snapshot.json @@ -0,0 +1,384 @@ +{ + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_default_name_for_table": { + "recorded-date": "11-04-2025, 12:15:43", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "keyName", + "AttributeType": "S" + } + ], + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "keyName", + "KeyType": "HASH" + } + ], + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 5, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 5 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "list_tags_of_resource": { + "Tags": [ + { + "Key": "TagKey1", + "Value": "TagValue1" + }, + { + "Key": "TagKey2", + "Value": "TagValue2" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_billing_mode_as_conditional[PROVISIONED]": { + "recorded-date": "11-04-2025, 12:16:18", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "LatestStreamArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>/stream/<latest-stream-label:1>", + "LatestStreamLabel": "<latest-stream-label:1>", + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + }, + "StreamSpecification": { + "StreamEnabled": true, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 5, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 5 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_billing_mode_as_conditional[PAY_PER_REQUEST]": { + "recorded-date": "11-04-2025, 12:16:53", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingModeSummary": { + "BillingMode": "PAY_PER_REQUEST", + "LastUpdateToPayPerRequestDateTime": "datetime" + }, + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "LatestStreamArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>/stream/<latest-stream-label:1>", + "LatestStreamLabel": "<latest-stream-label:1>", + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 0, + "WriteCapacityUnits": 0 + }, + "StreamSpecification": { + "StreamEnabled": true, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 12000, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 4000 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_global_table": { + "recorded-date": "11-04-2025, 12:37:54", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "keyName", + "AttributeType": "S" + } + ], + "BillingModeSummary": { + "BillingMode": "PAY_PER_REQUEST", + "LastUpdateToPayPerRequestDateTime": "datetime" + }, + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "keyName", + "KeyType": "HASH" + } + ], + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 0, + "WriteCapacityUnits": 0 + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 12000, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 4000 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_ttl_cdk": { + "recorded-date": "11-04-2025, 12:41:43", + "recorded-content": { + "table": { + "TimeToLiveDescription": { + "AttributeName": "expire_at", + "TimeToLiveStatus": "ENABLED" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_table_with_ttl_and_sse": { + "recorded-date": "11-04-2025, 12:42:04", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "pk", + "AttributeType": "S" + }, + { + "AttributeName": "sk", + "AttributeType": "S" + } + ], + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "pk", + "KeyType": "HASH" + }, + { + "AttributeName": "sk", + "KeyType": "RANGE" + } + ], + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 1, + "WriteCapacityUnits": 1 + }, + "SSEDescription": { + "KMSMasterKeyArn": "<kms-arn:1>", + "SSEType": "KMS", + "Status": "ENABLED" + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 1, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 1 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_global_table_with_ttl_and_sse": { + "recorded-date": "11-04-2025, 12:42:49", + "recorded-content": { + "table_description": { + "Table": { + "AttributeDefinitions": [ + { + "AttributeName": "gsi1pk", + "AttributeType": "S" + }, + { + "AttributeName": "gsi1sk", + "AttributeType": "S" + }, + { + "AttributeName": "pk", + "AttributeType": "S" + }, + { + "AttributeName": "sk", + "AttributeType": "S" + } + ], + "BillingModeSummary": { + "BillingMode": "PAY_PER_REQUEST", + "LastUpdateToPayPerRequestDateTime": "datetime" + }, + "CreationDateTime": "datetime", + "DeletionProtectionEnabled": false, + "GlobalSecondaryIndexes": [ + { + "IndexArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>/index/GSI1", + "IndexName": "GSI1", + "IndexSizeBytes": 0, + "IndexStatus": "ACTIVE", + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "gsi1pk", + "KeyType": "HASH" + }, + { + "AttributeName": "gsi1sk", + "KeyType": "RANGE" + } + ], + "Projection": { + "ProjectionType": "ALL" + }, + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 0, + "WriteCapacityUnits": 0 + }, + "WarmThroughput": { + "ReadUnitsPerSecond": 12000, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 4000 + } + } + ], + "ItemCount": 0, + "KeySchema": [ + { + "AttributeName": "pk", + "KeyType": "HASH" + }, + { + "AttributeName": "sk", + "KeyType": "RANGE" + } + ], + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 0, + "ReadCapacityUnits": 0, + "WriteCapacityUnits": 0 + }, + "SSEDescription": { + "KMSMasterKeyArn": "<kms-arn:1>", + "SSEType": "KMS", + "Status": "ENABLED" + }, + "TableArn": "arn:<partition>:dynamodb:<region>:111111111111:table/<table-name:1>", + "TableClassSummary": { + "TableClass": "STANDARD" + }, + "TableId": "<uuid:1>", + "TableName": "<table-name:1>", + "TableSizeBytes": 0, + "TableStatus": "ACTIVE", + "WarmThroughput": { + "ReadUnitsPerSecond": 12000, + "Status": "ACTIVE", + "WriteUnitsPerSecond": 4000 + } + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + } +} diff --git c/tests/aws/services/dynamodb/resources/test_dynamodb.validation.json i/tests/aws/services/dynamodb/resources/test_dynamodb.validation.json new file mode 100644 index 000000000000..a29ab85e13d4 --- /dev/null +++ i/tests/aws/services/dynamodb/resources/test_dynamodb.validation.json @@ -0,0 +1,29 @@ +{ + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_billing_mode_as_conditional[PAY_PER_REQUEST]": { + "last_validated_date": "2025-04-11T12:16:53+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_billing_mode_as_conditional[PROVISIONED]": { + "last_validated_date": "2025-04-11T12:16:18+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_default_name_for_table": { + "last_validated_date": "2025-04-11T12:15:43+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_deploy_stack_with_dynamodb_table": { + "last_validated_date": "2025-04-11T12:14:03+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_global_table": { + "last_validated_date": "2025-04-11T12:37:54+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_global_table_with_ttl_and_sse": { + "last_validated_date": "2025-04-11T12:42:49+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_globalindex_read_write_provisioned_throughput_dynamodb_table": { + "last_validated_date": "2025-04-11T12:14:46+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_table_with_ttl_and_sse": { + "last_validated_date": "2025-04-11T12:42:04+00:00" + }, + "tests/aws/services/dynamodb/resources/test_dynamodb.py::test_ttl_cdk": { + "last_validated_date": "2025-04-11T12:41:43+00:00" + } +} diff --git c/tests/aws/services/ec2/resources/test_ec2.snapshot.json i/tests/aws/services/ec2/resources/test_ec2.snapshot.json new file mode 100644 index 000000000000..5860c71ea028 --- /dev/null +++ i/tests/aws/services/ec2/resources/test_ec2.snapshot.json @@ -0,0 +1,303 @@ +{ + "tests/aws/services/ec2/resources/test_ec2.py::test_simple_route_table_creation_without_vpc": { + "recorded-date": "11-04-2025, 12:43:43", + "recorded-content": { + "tags": { + "Name": "Suspicious Route Table" + }, + "route_table": { + "Associations": [], + "OwnerId": "111111111111", + "PropagatingVgws": [], + "RouteTableId": "<vpc-id:2>", + "Routes": [ + { + "DestinationCidrBlock": "10.0.0.0/16", + "GatewayId": "local", + "Origin": "CreateRouteTable", + "State": "active" + } + ], + "VpcId": "<vpc-id:1>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_simple_route_table_creation": { + "recorded-date": "11-04-2025, 12:44:23", + "recorded-content": { + "tags": { + "Name": "Suspicious Route table" + }, + "route_table": { + "Associations": [], + "OwnerId": "111111111111", + "PropagatingVgws": [], + "RouteTableId": "<vpc-id:2>", + "Routes": [ + { + "DestinationCidrBlock": "10.0.0.0/16", + "GatewayId": "local", + "Origin": "CreateRouteTable", + "State": "active" + } + ], + "VpcId": "<vpc-id:1>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_cfn_with_multiple_route_table_associations": { + "recorded-date": "11-04-2025, 12:46:42", + "recorded-content": { + "route_table": { + "Associations": [ + { + "AssociationState": { + "State": "associated" + }, + "Main": false, + "RouteTableAssociationId": "<route-table-association-id:1>", + "RouteTableId": "<route-table-id:1>", + "SubnetId": "<subnet-id:1>" + }, + { + "AssociationState": { + "State": "associated" + }, + "Main": false, + "RouteTableAssociationId": "<route-table-association-id:2>", + "RouteTableId": "<route-table-id:1>", + "SubnetId": "<subnet-id:2>" + } + ], + "OwnerId": "111111111111", + "PropagatingVgws": [], + "RouteTableId": "<route-table-id:1>", + "Routes": [ + { + "DestinationCidrBlock": "100.0.0.0/20", + "GatewayId": "local", + "Origin": "CreateRouteTable", + "State": "active" + } + ], + "Tags": [ + { + "Key": "env", + "Value": "production" + }, + { + "Key": "aws:cloudformation:logical-id", + "Value": "RouteTable" + }, + { + "Key": "aws:cloudformation:stack-name", + "Value": "stack-0daec207" + }, + { + "Key": "aws:cloudformation:stack-id", + "Value": "arn:<partition>:cloudformation:<region>:111111111111:stack/stack-0daec207/f031e3b0-16d2-11f0-b66d-0aa58e870677" + } + ], + "VpcId": "<vpc-id:1>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_internet_gateway_ref_and_attr": { + "recorded-date": "11-04-2025, 12:47:30", + "recorded-content": { + "outputs": { + "IdAttachment": "<internet-gateway-ref:1>", + "RefAttachment": "<internet-gateway-ref:1>" + }, + "description": { + "DriftInformation": { + "StackResourceDriftStatus": "NOT_CHECKED" + }, + "LastUpdatedTimestamp": "<datetime>", + "LogicalResourceId": "Gateway", + "Metadata": {}, + "PhysicalResourceId": "<internet-gateway-ref:1>", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::EC2::InternetGateway", + "StackId": "arn:<partition>:cloudformation:<region>:111111111111:stack/<stack-name:1>/<resource:1>", + "StackName": "<stack-name:1>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_dhcp_options": { + "recorded-date": "11-04-2025, 12:47:51", + "recorded-content": { + "description": { + "DhcpConfigurations": [ + { + "Key": "domain-name", + "Values": [ + { + "Value": "example.com" + } + ] + }, + { + "Key": "domain-name-servers", + "Values": [ + { + "Value": "AmazonProvidedDNS" + } + ] + }, + { + "Key": "netbios-name-servers", + "Values": [ + { + "Value": "10.2.5.1" + } + ] + }, + { + "Key": "netbios-node-type", + "Values": [ + { + "Value": "2" + } + ] + }, + { + "Key": "ntp-servers", + "Values": [ + { + "Value": "10.2.5.1" + } + ] + } + ], + "DhcpOptionsId": "<dhcp-options-id:1>", + "OwnerId": "111111111111", + "Tags": [ + { + "Key": "aws:cloudformation:stack-id", + "Value": "arn:<partition>:cloudformation:<region>:111111111111:stack/stack-c8574f52/254932b0-16d3-11f0-bbb9-02c9293d2a15" + }, + { + "Key": "aws:cloudformation:stack-name", + "Value": "stack-c8574f52" + }, + { + "Key": "aws:cloudformation:logical-id", + "Value": "myDhcpOptions" + }, + { + "Key": "project", + "Value": "123" + } + ] + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_transit_gateway_attachment": { + "recorded-date": "11-04-2025, 12:52:34", + "recorded-content": { + "attachment": { + "Association": { + "State": "associated", + "TransitGatewayRouteTableId": "<transit-gateway-route-table-id:1>" + }, + "CreationTime": "<datetime>", + "ResourceId": "<resource-id:1>", + "ResourceOwnerId": "111111111111", + "ResourceType": "vpc", + "State": "available", + "Tags": [ + { + "Key": "Name", + "Value": "example-tag" + } + ], + "TransitGatewayAttachmentId": "<transit-gateway-attachment-id:1>", + "TransitGatewayId": "<transit-gateway-id:1>", + "TransitGatewayOwnerId": "111111111111" + }, + "gateway": { + "CreationTime": "<datetime>", + "Description": "TGW Route Integration Test", + "Options": { + "AmazonSideAsn": 65000, + "AssociationDefaultRouteTableId": "<transit-gateway-route-table-id:1>", + "AutoAcceptSharedAttachments": "disable", + "DefaultRouteTableAssociation": "enable", + "DefaultRouteTablePropagation": "enable", + "DnsSupport": "enable", + "MulticastSupport": "disable", + "PropagationDefaultRouteTableId": "<transit-gateway-route-table-id:1>", + "SecurityGroupReferencingSupport": "disable", + "VpnEcmpSupport": "enable" + }, + "OwnerId": "111111111111", + "State": "available", + "Tags": [ + { + "Key": "Application", + "Value": "arn:<partition>:cloudformation:<region>:111111111111:stack/stack-dc38ff33/3089c090-16d3-11f0-9212-0a8f5c4c7c8b" + } + ], + "TransitGatewayArn": "arn:<partition>:ec2:<region>:111111111111:transit-gateway/<transit-gateway-id:1>", + "TransitGatewayId": "<transit-gateway-id:1>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_vpc_with_route_table": { + "recorded-date": "11-04-2025, 12:53:14", + "recorded-content": { + "route_table": { + "RouteTables": [ + { + "Associations": [], + "OwnerId": "111111111111", + "PropagatingVgws": [], + "RouteTableId": "<route-table-id:1>", + "Routes": [ + { + "DestinationCidrBlock": "100.0.0.0/20", + "GatewayId": "local", + "Origin": "CreateRouteTable", + "State": "active" + } + ], + "Tags": { + "aws:cloudformation:logical-id": "RouteTable", + "aws:cloudformation:stack-id": "<stack_id>", + "aws:cloudformation:stack-name": "<stack_name>", + "env": "production" + }, + "VpcId": "<vpc-id:1>" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_ec2_security_group_id_with_vpc": { + "recorded-date": "11-04-2025, 12:53:44", + "recorded-content": { + "references": { + "SGWithVpcIdGroupId": "<with-vpcid-group-id>", + "SGWithVpcIdRef": "<with-vpcid-group-id>", + "SGWithoutVpcIdGroupId": "<without-vpcid-group-id>", + "SGWithoutVpcIdRef": "<without-vpcid-group-name>" + } + } + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_keypair_create_import": { + "recorded-date": "11-04-2025, 12:53:59", + "recorded-content": { + "outputs": { + "GeneratedKeyPairFingerprint": "<fingerprint>", + "GeneratedKeyPairName": "<generated-key-name>", + "ImportedKeyPairFingerprint": "4LmcYnyBOqlloHZ5TKAxfa8BgMK2wL6WeOOTvXVdhmw=", + "ImportedKeyPairName": "<imported-key-name>" + } + } + } +} diff --git c/tests/aws/services/ec2/resources/test_ec2.validation.json i/tests/aws/services/ec2/resources/test_ec2.validation.json new file mode 100644 index 000000000000..b0b60ff51972 --- /dev/null +++ i/tests/aws/services/ec2/resources/test_ec2.validation.json @@ -0,0 +1,35 @@ +{ + "tests/aws/services/ec2/resources/test_ec2.py::test_cfn_with_multiple_route_table_associations": { + "last_validated_date": "2025-04-11T12:46:42+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_cfn_with_multiple_route_tables": { + "last_validated_date": "2025-04-11T12:45:59+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_dhcp_options": { + "last_validated_date": "2025-04-11T12:47:51+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_ec2_security_group_id_with_vpc": { + "last_validated_date": "2025-04-11T12:53:44+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_internet_gateway_ref_and_attr": { + "last_validated_date": "2025-04-11T12:47:30+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_keypair_create_import": { + "last_validated_date": "2025-04-11T12:53:59+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_simple_route_table_creation": { + "last_validated_date": "2025-04-11T12:44:23+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_simple_route_table_creation_without_vpc": { + "last_validated_date": "2025-04-11T12:43:43+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_transit_gateway_attachment": { + "last_validated_date": "2025-04-11T12:52:34+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_vpc_creates_default_sg": { + "last_validated_date": "2025-04-11T12:45:01+00:00" + }, + "tests/aws/services/ec2/resources/test_ec2.py::test_vpc_with_route_table": { + "last_validated_date": "2025-04-11T12:53:14+00:00" + } +} diff --git c/tests/aws/services/es/resources/test_elasticsearch.snapshot.json i/tests/aws/services/es/resources/test_elasticsearch.snapshot.json new file mode 100644 index 000000000000..f07ef9ab1b7b --- /dev/null +++ i/tests/aws/services/es/resources/test_elasticsearch.snapshot.json @@ -0,0 +1,321 @@ +{ + "tests/aws/services/es/resources/test_elasticsearch.py::test_cfn_handle_elasticsearch_domain": { + "recorded-date": "11-04-2025, 13:26:11", + "recorded-content": { + "domain": { + "DomainStatus": { + "ARN": "arn:<partition>:es:<region>:111111111111:domain/<domain-name:1>", + "AccessPolicies": "", + "AdvancedOptions": { + "override_main_response_version": "false", + "rest.action.multi.allow_explicit_index": "true" + }, + "AdvancedSecurityOptions": { + "AnonymousAuthEnabled": false, + "Enabled": false, + "InternalUserDatabaseEnabled": false + }, + "AutoTuneOptions": { + "State": "ENABLED" + }, + "ChangeProgressDetails": { + "ChangeId": "<uuid:1>", + "ConfigChangeStatus": "ApplyingChanges", + "InitiatedBy": "CUSTOMER", + "LastUpdatedTime": "<datetime>", + "StartTime": "<datetime>" + }, + "CognitoOptions": { + "Enabled": false + }, + "Created": true, + "Deleted": false, + "DomainEndpointOptions": { + "CustomEndpointEnabled": false, + "EnforceHTTPS": false, + "TLSSecurityPolicy": "<t-l-s-security-policy:1>" + }, + "DomainId": "111111111111/<domain-name:1>", + "DomainName": "<domain-name:1>", + "DomainProcessingStatus": "Creating", + "EBSOptions": { + "EBSEnabled": true, + "Iops": 0, + "VolumeSize": 20, + "VolumeType": "gp2" + }, + "ElasticsearchClusterConfig": { + "ColdStorageOptions": { + "Enabled": false + }, + "DedicatedMasterCount": 3, + "DedicatedMasterEnabled": true, + "DedicatedMasterType": "m5.large.elasticsearch", + "InstanceCount": 2, + "InstanceType": "m5.large.elasticsearch", + "WarmEnabled": false, + "ZoneAwarenessConfig": { + "AvailabilityZoneCount": 2 + }, + "ZoneAwarenessEnabled": true + }, + "ElasticsearchVersion": "7.10", + "EncryptionAtRestOptions": { + "Enabled": false + }, + "Endpoint": "search-<domain-name:1>-zeyfj6devtz4d3bvfl2yam7co4.<region>.es.amazonaws.com", + "ModifyingProperties": [ + { + "ActiveValue": "", + "Name": "AIMLOptions.NaturalLanguageQueryGenerationOptions", + "PendingValue": { + "CurrentState": "NOT_ENABLED", + "DesiredState": "DISABLED" + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "AdvancedOptions", + "PendingValue": { + "override_main_response_version": "false", + "rest.action.multi.allow_explicit_index": "true" + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.AnonymousAuthDisableDate", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.AnonymousAuthEnabled", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.InternalUserDatabaseEnabled", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.JWTOptions", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.MasterUserOptions", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "AdvancedSecurityOptions.SAMLOptions", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.ColdStorageOptions", + "PendingValue": { + "Enabled": false + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.DedicatedMasterCount", + "PendingValue": "3", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.DedicatedMasterEnabled", + "PendingValue": "true", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.DedicatedMasterType", + "PendingValue": "m5.large.elasticsearch", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.InstanceCount", + "PendingValue": "2", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.InstanceType", + "PendingValue": "m5.large.elasticsearch", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.MultiAZWithStandbyEnabled", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.WarmCount", + "PendingValue": "", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.WarmEnabled", + "PendingValue": "false", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.WarmStorage", + "PendingValue": "", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.WarmType", + "PendingValue": "", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchClusterConfig.ZoneAwarenessEnabled", + "PendingValue": "true", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "ElasticsearchVersion", + "PendingValue": "7.10", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "IPAddressType", + "PendingValue": "ipv4", + "ValueType": "PLAIN_TEXT" + }, + { + "ActiveValue": "", + "Name": "TAGS", + "PendingValue": { + "k1": "v1", + "k2": "v2" + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "DomainEndpointOptions", + "PendingValue": { + "CustomEndpointEnabled": false, + "EnforceHTTPS": false, + "TLSSecurityPolicy": "<t-l-s-security-policy:1>" + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "EBSOptions", + "PendingValue": { + "EBSEnabled": true, + "Iops": 0, + "VolumeSize": 20, + "VolumeType": "gp2" + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "EncryptionAtRestOptions", + "PendingValue": { + "Enabled": false + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "NodeToNodeEncryptionOptions", + "PendingValue": { + "Enabled": false + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "OffPeakWindowOptions", + "PendingValue": { + "Enabled": true, + "OffPeakWindow": { + "WindowStartTime": { + "Hours": 20, + "Minutes": 0 + } + } + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "SnapshotOptions", + "PendingValue": { + "AutomatedSnapshotStartHour": 0 + }, + "ValueType": "STRINGIFIED_JSON" + }, + { + "ActiveValue": "", + "Name": "SoftwareUpdateOptions", + "PendingValue": { + "AutoSoftwareUpdateEnabled": false + }, + "ValueType": "STRINGIFIED_JSON" + } + ], + "NodeToNodeEncryptionOptions": { + "Enabled": false + }, + "Processing": false, + "ServiceSoftwareOptions": { + "AutomatedUpdateDate": "<datetime>", + "Cancellable": false, + "CurrentVersion": "<current-version:1>", + "Description": "<description:1>", + "NewVersion": "", + "OptionalDeployment": true, + "UpdateAvailable": false, + "UpdateStatus": "COMPLETED" + }, + "SnapshotOptions": { + "AutomatedSnapshotStartHour": 0 + }, + "UpgradeProcessing": false + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "tags": [ + { + "Key": "k1", + "Value": "v1" + }, + { + "Key": "k2", + "Value": "v2" + } + ] + } + } +} diff --git c/tests/aws/services/es/resources/test_elasticsearch.validation.json i/tests/aws/services/es/resources/test_elasticsearch.validation.json new file mode 100644 index 000000000000..e4addb3cb5bd --- /dev/null +++ i/tests/aws/services/es/resources/test_elasticsearch.validation.json @@ -0,0 +1,5 @@ +{ + "tests/aws/services/es/resources/test_elasticsearch.py::test_cfn_handle_elasticsearch_domain": { + "last_validated_date": "2025-04-11T13:26:11+00:00" + } +} diff --git c/tests/aws/services/events/resources/test_events.snapshot.json i/tests/aws/services/events/resources/test_events.snapshot.json new file mode 100644 index 000000000000..66001b7719cc --- /dev/null +++ i/tests/aws/services/events/resources/test_events.snapshot.json @@ -0,0 +1,70 @@ +{ + "tests/aws/services/events/resources/test_events.py::test_event_rule_creation_without_target": { + "recorded-date": "11-04-2025, 13:44:58", + "recorded-content": { + "describe_rule": { + "Arn": "arn:<partition>:events:<region>:111111111111:rule/event-rule-name", + "CreatedBy": "111111111111", + "EventBusName": "default", + "Name": "event-rule-name", + "ScheduleExpression": "cron(0 1 * * ? *)", + "State": "ENABLED", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/resources/test_events.py::test_rule_properties": { + "recorded-date": "11-04-2025, 13:46:46", + "recorded-content": { + "outputs": { + "RuleWithNameArn": "arn:<partition>:events:<region>:111111111111:rule/<event-bus-name>/<custom-rule-name>", + "RuleWithNameRef": "<event-bus-name>|<custom-rule-name>", + "RuleWithoutBusArn": "arn:<partition>:events:<region>:111111111111:rule/<without-bus-id>", + "RuleWithoutBusRef": "<without-bus-id>", + "RuleWithoutNameArn": "arn:<partition>:events:<region>:111111111111:rule/<event-bus-name>/<rule-id>", + "RuleWithoutNameRef": "<event-bus-name>|<rule-id>" + } + } + }, + "tests/aws/services/events/resources/test_events.py::test_rule_pattern_transformation": { + "recorded-date": "11-04-2025, 13:48:40", + "recorded-content": { + "rule": { + "Arn": "arn:<partition>:events:<region>:111111111111:rule/<name:1>", + "CreatedBy": "111111111111", + "EventBusName": "default", + "EventPattern": { + "detail-type": [ + "Object Created" + ], + "source": [ + "aws.s3" + ], + "detail": { + "bucket": { + "name": [ + "test-s3-bucket" + ] + }, + "object": { + "key": [ + { + "suffix": "/test.json" + } + ] + } + } + }, + "Name": "<name:1>", + "State": "ENABLED", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + } +} diff --git c/tests/aws/services/events/resources/test_events.validation.json i/tests/aws/services/events/resources/test_events.validation.json new file mode 100644 index 000000000000..0006fbb2fbce --- /dev/null +++ i/tests/aws/services/events/resources/test_events.validation.json @@ -0,0 +1,26 @@ +{ + "tests/aws/services/events/resources/test_events.py::test_cfn_event_api_destination_resource": { + "last_validated_date": "2025-04-11T13:41:35+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_cfn_event_bus_resource": { + "last_validated_date": "2025-04-11T13:46:03+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_event_rule_creation_without_target": { + "last_validated_date": "2025-04-11T13:44:58+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_event_rule_to_logs": { + "last_validated_date": "2025-04-11T13:43:43+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_eventbus_policies": { + "last_validated_date": "2025-04-11T13:41:58+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_eventbus_policy_statement": { + "last_validated_date": "2025-04-11T13:42:17+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_rule_pattern_transformation": { + "last_validated_date": "2025-04-11T13:48:40+00:00" + }, + "tests/aws/services/events/resources/test_events.py::test_rule_properties": { + "last_validated_date": "2025-04-11T13:46:46+00:00" + } +} diff --git c/tests/aws/services/firehose/resources/test_firehose.snapshot.json i/tests/aws/services/firehose/resources/test_firehose.snapshot.json new file mode 100644 index 000000000000..ebacb6668b82 --- /dev/null +++ i/tests/aws/services/firehose/resources/test_firehose.snapshot.json @@ -0,0 +1,99 @@ +{ + "tests/aws/services/firehose/resources/test_firehose.py::test_firehose_stack_with_kinesis_as_source": { + "recorded-date": "11-04-2025, 13:50:16", + "recorded-content": { + "outputs": { + "deliveryStreamRef": "<resource:1>" + }, + "delivery_stream": { + "DeliveryStreamDescription": { + "CreateTimestamp": "<datetime>", + "DeliveryStreamARN": "arn:<partition>:firehose:<region>:111111111111:deliverystream/<resource:1>", + "DeliveryStreamName": "<resource:1>", + "DeliveryStreamStatus": "ACTIVE", + "DeliveryStreamType": "KinesisStreamAsSource", + "Destinations": [ + { + "DestinationId": "destinationId-000000000001", + "ExtendedS3DestinationDescription": { + "BucketARN": "arn:<partition>:s3:::<resource:2>", + "BufferingHints": { + "IntervalInSeconds": 60, + "SizeInMBs": 64 + }, + "CloudWatchLoggingOptions": { + "Enabled": false + }, + "CompressionFormat": "UNCOMPRESSED", + "DataFormatConversionConfiguration": { + "Enabled": false + }, + "DynamicPartitioningConfiguration": { + "Enabled": true, + "RetryOptions": { + "DurationInSeconds": 300 + } + }, + "EncryptionConfiguration": { + "NoEncryptionConfig": "NoEncryption" + }, + "ErrorOutputPrefix": "firehoseTest-errors/!{firehose:error-output-type}/", + "Prefix": "firehoseTest/!{partitionKeyFromQuery:s3Prefix}", + "ProcessingConfiguration": { + "Enabled": true, + "Processors": [ + { + "Parameters": [ + { + "ParameterName": "MetadataExtractionQuery", + "ParameterValue": "{s3Prefix: .tableName}" + }, + { + "ParameterName": "JsonParsingEngine", + "ParameterValue": "JQ-1.6" + } + ], + "Type": "MetadataExtraction" + } + ] + }, + "RoleARN": "arn:<partition>:iam::111111111111:role/<resource:3>", + "S3BackupMode": "Disabled" + }, + "S3DestinationDescription": { + "BucketARN": "arn:<partition>:s3:::<resource:2>", + "BufferingHints": { + "IntervalInSeconds": 60, + "SizeInMBs": 64 + }, + "CloudWatchLoggingOptions": { + "Enabled": false + }, + "CompressionFormat": "UNCOMPRESSED", + "EncryptionConfiguration": { + "NoEncryptionConfig": "NoEncryption" + }, + "ErrorOutputPrefix": "firehoseTest-errors/!{firehose:error-output-type}/", + "Prefix": "firehoseTest/!{partitionKeyFromQuery:s3Prefix}", + "RoleARN": "arn:<partition>:iam::111111111111:role/<resource:3>" + } + } + ], + "HasMoreDestinations": false, + "Source": { + "KinesisStreamSourceDescription": { + "DeliveryStartTimestamp": "<datetime>", + "KinesisStreamARN": "arn:<partition>:kinesis:<region>:111111111111:stream/<resource:4>", + "RoleARN": "arn:<partition>:iam::111111111111:role/<resource:3>" + } + }, + "VersionId": "1" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + } +} diff --git c/tests/aws/services/firehose/resources/test_firehose.validation.json i/tests/aws/services/firehose/resources/test_firehose.validation.json new file mode 100644 index 000000000000..89cf631d4379 --- /dev/null +++ i/tests/aws/services/firehose/resources/test_firehose.validation.json @@ -0,0 +1,5 @@ +{ + "tests/aws/services/firehose/resources/test_firehose.py::test_firehose_stack_with_kinesis_as_source": { + "last_validated_date": "2025-04-11T13:50:16+00:00" + } +} diff --git c/tests/aws/services/kinesis/resources/test_kinesis.snapshot.json i/tests/aws/services/kinesis/resources/test_kinesis.snapshot.json new file mode 100644 index 000000000000..d51f95105d0b --- /dev/null +++ i/tests/aws/services/kinesis/resources/test_kinesis.snapshot.json @@ -0,0 +1,287 @@ +{ + "tests/aws/services/kinesis/resources/test_kinesis.py::test_stream_creation": { + "recorded-date": "11-04-2025, 13:51:24", + "recorded-content": { + "stack_output": { + "StreamArnFromAtt": "arn:<partition>:kinesis:<region>:111111111111:stream/<resource:1>", + "StreamNameFromRef": "<resource:1>" + }, + "resource_description": { + "StackResources": [ + { + "DriftInformation": { + "StackResourceDriftStatus": "NOT_CHECKED" + }, + "LogicalResourceId": "TestStream", + "PhysicalResourceId": "<resource:1>", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::Kinesis::Stream", + "StackId": "arn:<partition>:cloudformation:<region>:111111111111:stack/<stack-name:1>/<resource:2>", + "StackName": "<stack-name:1>", + "Timestamp": "timestamp" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "stream_description": { + "StreamDescription": { + "EncryptionType": "NONE", + "EnhancedMonitoring": [ + { + "ShardLevelMetrics": [] + } + ], + "HasMoreShards": false, + "RetentionPeriodHours": 24, + "Shards": [ + { + "HashKeyRange": { + "EndingHashKey": "<ending-hash-key:1>", + "StartingHashKey": "starting_hash" + }, + "SequenceNumberRange": { + "StartingSequenceNumber": "<starting_sequence_number:1>" + }, + "ShardId": "shard-id" + } + ], + "StreamARN": "arn:<partition>:kinesis:<region>:111111111111:stream/<resource:1>", + "StreamCreationTimestamp": "timestamp", + "StreamModeDetails": { + "StreamMode": "PROVISIONED" + }, + "StreamName": "<resource:1>", + "StreamStatus": "ACTIVE" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_default_parameters_kinesis": { + "recorded-date": "11-04-2025, 13:51:47", + "recorded-content": { + "describe_stream": { + "StreamDescription": { + "EncryptionType": "NONE", + "EnhancedMonitoring": [ + { + "ShardLevelMetrics": [] + } + ], + "HasMoreShards": false, + "RetentionPeriodHours": 24, + "Shards": [ + { + "HashKeyRange": { + "EndingHashKey": "ending_hash", + "StartingHashKey": "starting_hash" + }, + "SequenceNumberRange": { + "StartingSequenceNumber": "<starting_sequence_number:1>" + }, + "ShardId": "<shard_id:1>" + } + ], + "StreamARN": "arn:<partition>:kinesis:<region>:111111111111:stream/<stream-name:1>", + "StreamCreationTimestamp": "timestamp", + "StreamModeDetails": { + "StreamMode": "PROVISIONED" + }, + "StreamName": "<stream-name:1>", + "StreamStatus": "ACTIVE" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_cfn_handle_kinesis_firehose_resources": { + "recorded-date": "11-04-2025, 13:53:36", + "recorded-content": {} + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_describe_template": { + "recorded-date": "11-04-2025, 13:53:38", + "recorded-content": { + "get_template_summary_by_url": { + "Capabilities": [ + "CAPABILITY_NAMED_IAM" + ], + "CapabilitiesReason": "The following resource(s) require capabilities: [AWS::IAM::Role]", + "Parameters": [ + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "KinesisRoleName", + "ParameterType": "String" + }, + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "DeliveryStreamName", + "ParameterType": "String" + }, + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "KinesisStreamName", + "ParameterType": "String" + } + ], + "ResourceIdentifierSummaries": [ + { + "LogicalResourceIds": [ + "MyBucket" + ], + "ResourceIdentifiers": [ + "BucketName" + ], + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceIds": [ + "MyRole" + ], + "ResourceIdentifiers": [ + "RoleName" + ], + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceIds": [ + "KinesisStream" + ], + "ResourceIdentifiers": [ + "Name" + ], + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceIds": [ + "DeliveryStream" + ], + "ResourceIdentifiers": [ + "DeliveryStreamName" + ], + "ResourceType": "AWS::KinesisFirehose::DeliveryStream" + } + ], + "ResourceTypes": [ + "AWS::Kinesis::Stream", + "AWS::IAM::Role", + "AWS::S3::Bucket", + "AWS::KinesisFirehose::DeliveryStream" + ], + "Version": "2010-09-09", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "get_template_summary_by_body": { + "Capabilities": [ + "CAPABILITY_NAMED_IAM" + ], + "CapabilitiesReason": "The following resource(s) require capabilities: [AWS::IAM::Role]", + "Parameters": [ + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "KinesisRoleName", + "ParameterType": "String" + }, + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "DeliveryStreamName", + "ParameterType": "String" + }, + { + "NoEcho": false, + "ParameterConstraints": {}, + "ParameterKey": "KinesisStreamName", + "ParameterType": "String" + } + ], + "ResourceIdentifierSummaries": [ + { + "LogicalResourceIds": [ + "MyBucket" + ], + "ResourceIdentifiers": [ + "BucketName" + ], + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceIds": [ + "MyRole" + ], + "ResourceIdentifiers": [ + "RoleName" + ], + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceIds": [ + "KinesisStream" + ], + "ResourceIdentifiers": [ + "Name" + ], + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceIds": [ + "DeliveryStream" + ], + "ResourceIdentifiers": [ + "DeliveryStreamName" + ], + "ResourceType": "AWS::KinesisFirehose::DeliveryStream" + } + ], + "ResourceTypes": [ + "AWS::Kinesis::Stream", + "AWS::IAM::Role", + "AWS::S3::Bucket", + "AWS::KinesisFirehose::DeliveryStream" + ], + "Version": "2010-09-09", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_dynamodb_stream_response_with_cf": { + "recorded-date": "11-04-2025, 13:54:36", + "recorded-content": { + "describe_kinesis_streaming_destination": { + "KinesisDataStreamDestinations": [ + { + "DestinationStatus": "ACTIVE", + "StreamArn": "arn:<partition>:kinesis:<region>:111111111111:stream/EventStream" + } + ], + "TableName": "<table-name:1>", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_kinesis_stream_consumer_creations": { + "recorded-date": "11-04-2025, 13:55:24", + "recorded-content": {} + } +} diff --git c/tests/aws/services/kinesis/resources/test_kinesis.validation.json i/tests/aws/services/kinesis/resources/test_kinesis.validation.json new file mode 100644 index 000000000000..9ffaa3e4a9c7 --- /dev/null +++ i/tests/aws/services/kinesis/resources/test_kinesis.validation.json @@ -0,0 +1,20 @@ +{ + "tests/aws/services/kinesis/resources/test_kinesis.py::test_cfn_handle_kinesis_firehose_resources": { + "last_validated_date": "2025-04-11T13:53:36+00:00" + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_default_parameters_kinesis": { + "last_validated_date": "2025-04-11T13:51:39+00:00" + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_describe_template": { + "last_validated_date": "2025-04-11T13:53:38+00:00" + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_dynamodb_stream_response_with_cf": { + "last_validated_date": "2025-04-11T13:54:15+00:00" + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_kinesis_stream_consumer_creations": { + "last_validated_date": "2025-04-11T13:55:03+00:00" + }, + "tests/aws/services/kinesis/resources/test_kinesis.py::test_stream_creation": { + "last_validated_date": "2025-04-11T13:51:16+00:00" + } +} diff --git c/tests/aws/services/kms/resources/test_kms.snapshot.json i/tests/aws/services/kms/resources/test_kms.snapshot.json new file mode 100644 index 000000000000..35b2b1942143 --- /dev/null +++ i/tests/aws/services/kms/resources/test_kms.snapshot.json @@ -0,0 +1,11 @@ +{ + "tests/aws/services/kms/resources/test_kms.py::test_cfn_with_kms_resources": { + "recorded-date": "11-04-2025, 13:58:56", + "recorded-content": { + "stack-outputs": { + "KeyAlias": "<key-alias:1>", + "KeyArn": "arn:<partition>:kms:<region>:111111111111:key/<resource:1>" + } + } + } +} diff --git c/tests/aws/services/kms/resources/test_kms.validation.json i/tests/aws/services/kms/resources/test_kms.validation.json new file mode 100644 index 000000000000..b0c14417616e --- /dev/null +++ i/tests/aws/services/kms/resources/test_kms.validation.json @@ -0,0 +1,11 @@ +{ + "tests/aws/services/kms/resources/test_kms.py::test_cfn_with_kms_resources": { + "last_validated_date": "2025-04-11T13:58:56+00:00" + }, + "tests/aws/services/kms/resources/test_kms.py::test_deploy_stack_with_kms": { + "last_validated_date": "2025-04-11T13:59:40+00:00" + }, + "tests/aws/services/kms/resources/test_kms.py::test_kms_key_disabled": { + "last_validated_date": "2025-04-11T13:55:49+00:00" + } +} diff --git c/tests/aws/services/lambda_/resources/test_lambda.snapshot.json i/tests/aws/services/lambda_/resources/test_lambda.snapshot.json new file mode 100644 index 000000000000..c43a947df05e --- /dev/null +++ i/tests/aws/services/lambda_/resources/test_lambda.snapshot.json @@ -0,0 +1,1670 @@ +{ + "tests/aws/services/lambda_/resources/test_lambda.py::test_lam…
1 parent 306645f commit 78d29eb

File tree

43 files changed

+4650
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4650
-6
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_creation": {
3+
"recorded-date": "11-04-2025, 12:11:07",
4+
"recorded-content": {
5+
"alarm_outputs": {
6+
"AlarmArnFromAtt": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:<resource:1>",
7+
"AlarmName": "<resource:1>"
8+
}
9+
}
10+
},
11+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_composite_alarm_creation": {
12+
"recorded-date": "11-04-2025, 12:12:14",
13+
"recorded-content": {
14+
"composite_alarm": [
15+
{
16+
"ActionsEnabled": true,
17+
"AlarmActions": [
18+
"arn:<partition>:sns:<region>:111111111111:<alarm-action-name:1>"
19+
],
20+
"AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighResourceUsage",
21+
"AlarmConfigurationUpdatedTimestamp": "timestamp",
22+
"AlarmDescription": "Indicates that the system resource usage is high while no known deployment is in progress",
23+
"AlarmName": "HighResourceUsage",
24+
"AlarmRule": "(ALARM(HighCPUUsage) OR ALARM(HighMemoryUsage))",
25+
"InsufficientDataActions": [],
26+
"OKActions": [],
27+
"StateReason": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighResourceUsage was created and its alarm rule evaluates to OK",
28+
"StateReasonData": {
29+
"triggeringAlarms": [
30+
{
31+
"arn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighMemoryUsage",
32+
"state": {
33+
"value": "INSUFFICIENT_DATA",
34+
"timestamp": "date"
35+
}
36+
},
37+
{
38+
"arn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighCPUUsage",
39+
"state": {
40+
"value": "INSUFFICIENT_DATA",
41+
"timestamp": "date"
42+
}
43+
}
44+
]
45+
},
46+
"StateUpdatedTimestamp": "timestamp",
47+
"StateValue": "OK",
48+
"StateTransitionedTimestamp": "timestamp"
49+
}
50+
],
51+
"metric_alarm": [
52+
{
53+
"AlarmName": "HighMemoryUsage",
54+
"AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:HighMemoryUsage",
55+
"AlarmDescription": "Memory usage is high",
56+
"AlarmConfigurationUpdatedTimestamp": "timestamp",
57+
"ActionsEnabled": true,
58+
"OKActions": [],
59+
"AlarmActions": [],
60+
"InsufficientDataActions": [],
61+
"StateValue": "INSUFFICIENT_DATA",
62+
"StateReason": "Unchecked: Initial alarm creation",
63+
"StateUpdatedTimestamp": "timestamp",
64+
"MetricName": "MemoryUsage",
65+
"Namespace": "CustomNamespace",
66+
"Statistic": "Average",
67+
"Dimensions": [],
68+
"Period": 60,
69+
"EvaluationPeriods": 1,
70+
"Threshold": 65.0,
71+
"ComparisonOperator": "GreaterThanThreshold",
72+
"TreatMissingData": "breaching",
73+
"StateTransitionedTimestamp": "timestamp"
74+
}
75+
]
76+
}
77+
},
78+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_ext_statistic": {
79+
"recorded-date": "11-04-2025, 12:12:29",
80+
"recorded-content": {
81+
"simple_alarm": [
82+
{
83+
"AlarmName": "<alarm-name:1>",
84+
"AlarmArn": "arn:<partition>:cloudwatch:<region>:111111111111:alarm:<alarm-name:1>",
85+
"AlarmDescription": "uses extended statistic",
86+
"AlarmConfigurationUpdatedTimestamp": "timestamp",
87+
"ActionsEnabled": true,
88+
"OKActions": [],
89+
"AlarmActions": [],
90+
"InsufficientDataActions": [],
91+
"StateValue": "INSUFFICIENT_DATA",
92+
"StateReason": "Unchecked: Initial alarm creation",
93+
"StateUpdatedTimestamp": "timestamp",
94+
"MetricName": "Duration",
95+
"Namespace": "<namespace:1>",
96+
"ExtendedStatistic": "p99",
97+
"Dimensions": [
98+
{
99+
"Name": "FunctionName",
100+
"Value": "my-function"
101+
}
102+
],
103+
"Period": 300,
104+
"Unit": "Count",
105+
"EvaluationPeriods": 3,
106+
"DatapointsToAlarm": 3,
107+
"Threshold": 10.0,
108+
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
109+
"TreatMissingData": "ignore",
110+
"StateTransitionedTimestamp": "timestamp"
111+
}
112+
]
113+
}
114+
}
115+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_creation": {
3+
"last_validated_date": "2025-04-11T12:11:07+00:00"
4+
},
5+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_alarm_ext_statistic": {
6+
"last_validated_date": "2025-04-11T12:12:29+00:00"
7+
},
8+
"tests/aws/services/cloudwatch/resources/test_cloudwatch.py::test_composite_alarm_creation": {
9+
"last_validated_date": "2025-04-11T12:12:14+00:00"
10+
}
11+
}

tests/aws/services/dynamodb/resources/test_dynamodb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ def test_billing_mode_as_conditional(deploy_cfn_template, snapshot, aws_client,
123123
"$..Table.Replicas",
124124
]
125125
)
126-
def test_global_table(deploy_cfn_template, snapshot, aws_client):
126+
def test_global_table(deploy_cfn_template, snapshot, aws_client, region_name):
127127
snapshot.add_transformer(snapshot.transform.dynamodb_api())
128128
stack = deploy_cfn_template(
129129
template_path=os.path.join(
130130
os.path.dirname(__file__), "../../../templates/dynamodb_global_table.yml"
131131
),
132+
parameters={"ReplicaRegion": region_name},
132133
)
133134
snapshot.add_transformer(snapshot.transform.key_value("TableName", "table-name"))
134135
response = aws_client.dynamodb.describe_table(TableName=stack.outputs["TableName"])

0 commit comments

Comments
 (0)