Open ParthaI opened 3 months ago
@ParthaI I think @Priyanka-Chatterjee-2000 would need this table for the Compliance benchmark, wherein passing a keyspace_name
might not be possible.
I would suggest adding the Parent table to eliminate the need of the required qual.
Thanks!!
I will add the parent table π
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Integration test logs
Logs
``` No env file present for the current environment: staging Falling back to .env config No env file present for the current environment: staging customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined SETUP: tests/aws_keyspaces_table [] PRETEST: tests/aws_keyspaces_table TEST: tests/aws_keyspaces_table Running terraform data.aws_partition.current: Reading... data.aws_caller_identity.current: Reading... data.aws_region.alternate: Reading... data.aws_region.primary: Reading... data.aws_partition.current: Read complete after 0s [id=aws] data.aws_region.primary: Read complete after 0s [id=us-east-1] data.aws_region.alternate: Read complete after 0s [id=us-east-2] data.aws_caller_identity.current: Read complete after 0s [id=xxxxxxxxxxxx] data.null_data_source.resource: Reading... data.null_data_source.resource: Read complete after 0s [id=static] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # aws_keyspaces_keyspace.named_test_resource will be created + resource "aws_keyspaces_keyspace" "named_test_resource" { + arn = (known after apply) + id = (known after apply) + name = "turbottest68990" + tags_all = (known after apply) } # aws_keyspaces_table.named_test_resource will be created + resource "aws_keyspaces_table" "named_test_resource" { + arn = (known after apply) + id = (known after apply) + keyspace_name = "turbottest68990" + table_name = "turbottest68990" + tags_all = (known after apply) + schema_definition { + column { + name = "test_id" + type = "ascii" } + partition_key { + name = "test_id" } } } Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs: + resource_aka = (known after apply) + resource_name = "turbottest68990" aws_keyspaces_keyspace.named_test_resource: Creating... aws_keyspaces_keyspace.named_test_resource: Creation complete after 3s [id=turbottest68990] aws_keyspaces_table.named_test_resource: Creating... aws_keyspaces_table.named_test_resource: Still creating... [10s elapsed] aws_keyspaces_table.named_test_resource: Still creating... [20s elapsed] aws_keyspaces_table.named_test_resource: Creation complete after 28s [id=turbottest68990/turbottest68990] Warning: Deprecated with data.null_data_source.resource, on variables.tf line 44, in data "null_data_source" "resource": 44: data "null_data_source" "resource" { The null_data_source was historically used to construct intermediate values to re-use elsewhere in configuration, the same can now be achieved using locals or the terraform_data resource type in Terraform 1.4 and later. (and one more similar warning elsewhere) Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: resource_aka = "arn:aws:cassandra:us-east-1:xxxxxxxxxxxx:/keyspace/turbottest68990/table/turbottest68990" resource_name = "turbottest68990" Running SQL query: test-get-call-query.sql Time: 10.9s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0. Scans: 1) aws_keyspaces_table.aws: Time: 10.1s. Fetched: 1. Hydrates: 0. Quals: table_name=turbottest68990, keyspace_name=turbottest68990. [ { "akas": [ "arn:aws:cassandra:us-east-1:xxxxxxxxxxxx:/keyspace/turbottest68990/table/turbottest68990" ], "table_name": "turbottest68990", "title": "turbottest68990" } ] β PASSED Running SQL query: test-list-call-query.sql Time: 1.6s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0. Scans: 1) aws_keyspaces_table.aws: Time: 303ms. Fetched: 1. Hydrates: 0. Quals: keyspace_name=turbottest68990. [ { "akas": [ "arn:aws:cassandra:us-east-1:xxxxxxxxxxxx:/keyspace/turbottest68990/table/turbottest68990" ], "keyspace_name": "turbottest68990", "table_name": "turbottest68990", "title": "turbottest68990" } ] β PASSED Running SQL query: test-turbot-query.sql Time: 0.7s. Rows returned: 1. Rows fetched: 1 (cached). Hydrate calls: 0. Scans: 1) aws_keyspaces_table.aws: Time: 203ms. Fetched: 1 (cached). Hydrates: 0. Quals: keyspace_name=turbottest68990. [ { "akas": [ "arn:aws:cassandra:us-east-1:xxxxxxxxxxxx:/keyspace/turbottest68990/table/turbottest68990" ], "title": "turbottest68990" } ] β PASSED POSTTEST: tests/aws_keyspaces_table TEARDOWN: tests/aws_keyspaces_table SUMMARY: 1/1 passed. ```Example query results
Results
``` > select * from aws_keyspaces_table where keyspace_name = 'turbottest53146' +-----------------+-----------------+------------------------------------------------------------------------------------------+--------+------------+-------------------------------+---------------------------+----------------------+--> | keyspace_name | table_name | arn | status | ttl_status | client_side_timestamps_status | creation_timestamp | default_time_to_live | c> +-----------------+-----------------+------------------------------------------------------------------------------------------+--------+------------+-------------------------------+---------------------------+----------------------+--> | turbottest53146 | turbottest53146 | arn:aws:cassandra:us-east-1:xxxxxxxxxxxx:/keyspace/turbottest53146/table/turbottest53146 | ACTIVE |