Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions docs/resources/cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,11 @@ resource "astra_database" "db_database" {
deletion_protection = false
}

# Create a new table in that database
resource "astra_table" "db_table" {
keyspace = astra_database.db_database.keyspace
database_id = astra_database.db_database.id
region = astra_database.db_database.regions[0]
table = "all_product_clicks"
clustering_columns = "visitor_id:click_timestamp"
partition_keys = "visitor_id:click_url"
column_definitions = [
{
Name : "click_timestamp"
Static : false
TypeDefinition : "bigint"
},
{
Name : "visitor_id"
Static : false
TypeDefinition : "uuid"
},
{
Name : "click_url"
Static : false
TypeDefinition : "text"
}
]
}

# Create a new CDC connection between tenant topic and db table
resource "astra_cdc" "db_cdc" {
database_id = astra_database.db_database.id
database_name = astra_database.db_database.name
table = astra_table.db_table.table
table = "all_product_clicks"
keyspace = astra_database.db_database.keyspace
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name
topic_partitions = 3
Expand Down
31 changes: 2 additions & 29 deletions docs/resources/cdc_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,14 @@ resource "astra_database" "db_database" {
deletion_protection = false
}

# Create a new table in that database
resource "astra_table" "db_table1" {
keyspace = astra_database.db_database.keyspace
database_id = astra_database.db_database.id
region = astra_database.db_database.regions[0]
table = "table1"
clustering_columns = "click_timestamp"
partition_keys = "visitor_id:click_url"
column_definitions = [
{
Name : "visitor_id"
Static : false
TypeDefinition : "uuid"
},
{
Name : "click_url"
Static : false
TypeDefinition : "text"
},
{
Name : "click_timestamp"
Static : false
TypeDefinition : "bigint"
},
]
}

# Create a new CDC connection between tenant topic and db table
resource "astra_cdc_v3" "db_cdc" {
database_id = astra_database.db_database.id
database_name = astra_database.db_database.name
tables = [
{
keyspace = astra_table.db_table1.keyspace
table = astra_table.db_table1.table
keyspace = astra_database.db_database.keyspace
table = "table1"
},
]
regions = [
Expand Down
100 changes: 0 additions & 100 deletions docs/resources/table.md

This file was deleted.

29 changes: 1 addition & 28 deletions examples/resources/astra_cdc/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,11 @@ resource "astra_database" "db_database" {
deletion_protection = false
}

# Create a new table in that database
resource "astra_table" "db_table" {
keyspace = astra_database.db_database.keyspace
database_id = astra_database.db_database.id
region = astra_database.db_database.regions[0]
table = "all_product_clicks"
clustering_columns = "visitor_id:click_timestamp"
partition_keys = "visitor_id:click_url"
column_definitions = [
{
Name : "click_timestamp"
Static : false
TypeDefinition : "bigint"
},
{
Name : "visitor_id"
Static : false
TypeDefinition : "uuid"
},
{
Name : "click_url"
Static : false
TypeDefinition : "text"
}
]
}

# Create a new CDC connection between tenant topic and db table
resource "astra_cdc" "db_cdc" {
database_id = astra_database.db_database.id
database_name = astra_database.db_database.name
table = astra_table.db_table.table
table = "all_product_clicks"
keyspace = astra_database.db_database.keyspace
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name
topic_partitions = 3
Expand Down
31 changes: 2 additions & 29 deletions examples/resources/astra_cdc_v3/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,14 @@ resource "astra_database" "db_database" {
deletion_protection = false
}

# Create a new table in that database
resource "astra_table" "db_table1" {
keyspace = astra_database.db_database.keyspace
database_id = astra_database.db_database.id
region = astra_database.db_database.regions[0]
table = "table1"
clustering_columns = "click_timestamp"
partition_keys = "visitor_id:click_url"
column_definitions = [
{
Name : "visitor_id"
Static : false
TypeDefinition : "uuid"
},
{
Name : "click_url"
Static : false
TypeDefinition : "text"
},
{
Name : "click_timestamp"
Static : false
TypeDefinition : "bigint"
},
]
}

# Create a new CDC connection between tenant topic and db table
resource "astra_cdc_v3" "db_cdc" {
database_id = astra_database.db_database.id
database_name = astra_database.db_database.name
tables = [
{
keyspace = astra_table.db_table1.keyspace
table = astra_table.db_table1.table
keyspace = astra_database.db_database.keyspace
table = "table1"
},
]
regions = [
Expand Down
2 changes: 0 additions & 2 deletions examples/resources/astra_table/import.sh

This file was deleted.

55 changes: 0 additions & 55 deletions examples/resources/astra_table/resource.tf

This file was deleted.

Loading
Loading