generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run terraform fmt on the examples directory (#280)
I just ran `terraform fmt --recursive` on the examples directory and then re-generated the docs.
- Loading branch information
Showing
29 changed files
with
398 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,11 @@ data "astra_streaming_tenant_tokens" "tokens" { | |
// Example referencing astra_streaming_tenant | ||
resource "astra_streaming_tenant" "tenant" { | ||
tenant_name = "mytenant" | ||
topic = "topic1" | ||
region = "us-east4" | ||
cloud_provider = "gcp" | ||
user_email = "[email protected]" | ||
tenant_name = "mytenant" | ||
topic = "topic1" | ||
region = "us-east4" | ||
cloud_provider = "gcp" | ||
user_email = "[email protected]" | ||
} | ||
data "astra_streaming_tenant_tokens" "tokens" { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,57 +25,57 @@ resource "random_uuid" "identifier" {} | |
# Create a new tenant | ||
resource "astra_streaming_tenant" "streaming_tenant" { | ||
tenant_name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 32) | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = true | ||
region = "us-central1" | ||
tenant_name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 32) | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = false | ||
region = "us-central1" | ||
} | ||
# Create a new database | ||
resource "astra_database" "db_database" { | ||
name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 50) | ||
keyspace = "click_data" # 48 characters max | ||
cloud_provider = "gcp" # this must match the cloud_provider of the tenant | ||
regions = ["us-central1"] # this must match the region of the tenant | ||
deletion_protection = false | ||
name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 50) | ||
keyspace = "click_data" # 48 characters max | ||
cloud_provider = "gcp" # this must match the cloud_provider of the tenant | ||
regions = ["us-central1"] # this must match the region of the tenant | ||
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" | ||
} | ||
] | ||
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 | ||
keyspace = astra_database.db_database.keyspace | ||
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name | ||
topic_partitions = 3 | ||
database_id = astra_database.db_database.id | ||
database_name = astra_database.db_database.name | ||
table = astra_table.db_table.table | ||
keyspace = astra_database.db_database.keyspace | ||
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name | ||
topic_partitions = 3 | ||
} | ||
# --Formatted Outputs-- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,39 +18,39 @@ resource "random_pet" "server" {} | |
# Create a new tenant | ||
resource "astra_streaming_tenant" "streaming_tenant" { | ||
tenant_name = "my-tenant-${random_pet.server.id}" | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = false # let terraform destroy the tenant | ||
region = "us-central1" | ||
tenant_name = "my-tenant-${random_pet.server.id}" | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = false # let terraform destroy the tenant | ||
region = "us-central1" | ||
} | ||
# Create a new namespace | ||
resource "astra_streaming_namespace" "streaming_namespace" { | ||
# Required | ||
cluster = astra_streaming_tenant.streaming_tenant.cluster_name | ||
tenant = astra_streaming_tenant.streaming_tenant.tenant_name | ||
namespace = "my-namespace" | ||
cluster = astra_streaming_tenant.streaming_tenant.cluster_name | ||
tenant = astra_streaming_tenant.streaming_tenant.tenant_name | ||
namespace = "my-namespace" | ||
# Optional | ||
policies = { | ||
auto_topic_creation_override = { | ||
policies = { | ||
auto_topic_creation_override = { | ||
allow_auto_topic_creation = true | ||
default_num_partitions = 1 | ||
topic_type = "partitioned" # "partitioned" or "non_partitioned" | ||
default_num_partitions = 1 | ||
topic_type = "partitioned" # "partitioned" or "non_partitioned" | ||
} | ||
backlog_quota_map = { | ||
backlog_quota_map = { | ||
"destination_storage" = { | ||
"limit": 500170751, | ||
"limit_size": 500170751, | ||
"limit_time": 0, | ||
"policy": "producer_exception" # "producer_exception" or "producer_request_hold" or "consumer_backlog_eviction" | ||
"limit" : 500170751, | ||
"limit_size" : 500170751, | ||
"limit_time" : 0, | ||
"policy" : "producer_exception" # "producer_exception" or "producer_request_hold" or "consumer_backlog_eviction" | ||
} | ||
} | ||
is_allow_auto_update_schema = true | ||
message_ttl_in_seconds = 0 | ||
retention_policies = { | ||
retention_size_in_mb = 0 | ||
is_allow_auto_update_schema = true | ||
message_ttl_in_seconds = 0 | ||
retention_policies = { | ||
retention_size_in_mb = 0 | ||
retention_time_in_minutes = 0 | ||
} | ||
schema_auto_update_compatibility_strategy = "Full" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,26 +19,26 @@ resource "random_pet" "pet_name" {} | |
# Create a new tenant | ||
resource "astra_streaming_tenant" "streaming_tenant" { | ||
# Required | ||
tenant_name = substr( "my-tenant-${random_pet.pet_name.id}", 0, 32) | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = false | ||
region = "us-central1" | ||
tenant_name = substr("my-tenant-${random_pet.pet_name.id}", 0, 32) | ||
user_email = "[email protected]" | ||
cloud_provider = "gcp" | ||
deletion_protection = false | ||
region = "us-central1" | ||
} | ||
# Create a new pulsar token for the tenant | ||
resource "astra_streaming_pulsar_token" "streaming_token" { | ||
# Required | ||
cluster = astra_streaming_tenant.streaming_tenant.cluster_name | ||
tenant = astra_streaming_tenant.streaming_tenant.tenant_name | ||
cluster = astra_streaming_tenant.streaming_tenant.cluster_name | ||
tenant = astra_streaming_tenant.streaming_tenant.tenant_name | ||
# Optional | ||
time_to_live = "30d" # Token will be valid for 30 days | ||
time_to_live = "30d" # Token will be valid for 30 days | ||
} | ||
output "streaming_token" { | ||
description = "The streaming token" | ||
value = nonsensitive(astra_streaming_pulsar_token.streaming_token.token) | ||
value = nonsensitive(astra_streaming_pulsar_token.streaming_token.token) | ||
} | ||
# --Formatted Outputs-- | ||
|
Oops, something went wrong.