Skip to content

Commit b82d16f

Browse files
authored
run terraform fmt on the examples directory (#280)
I just ran `terraform fmt --recursive` on the examples directory and then re-generated the docs.
1 parent 59cdd07 commit b82d16f

File tree

29 files changed

+398
-399
lines changed

29 files changed

+398
-399
lines changed

docs/data-sources/secure_connect_bundle_url.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,46 @@ data "astra_secure_connect_bundle_url" "scb" {
2222
// Example 1: Hard-coded IDs
2323
// Primary datacenter SCB
2424
data "astra_secure_connect_bundle_url" "scb1" {
25-
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
25+
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
2626
datacenter_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73-1" // for the primary dataceneter, the datacenter ID is not required
2727
}
2828
// Second datacenter SCB
2929
data "astra_secure_connect_bundle_url" "scb2" {
30-
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
30+
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
3131
datacenter_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73-2"
3232
}
3333
// Third datacenter SCB
3434
data "astra_secure_connect_bundle_url" "scb3" {
35-
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
35+
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
3636
datacenter_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73-3"
3737
}
3838
3939
// Example 2: Referenced IDs
4040
// Database example for referencing
41-
resource astra_database "mydb" {
42-
name = "dbname"
43-
keyspace = "testks"
44-
cloud_provider = "gcp"
45-
regions = ["us-west4", "us-east4", "us-central1"]
46-
timeouts {
47-
create = "45m"
48-
delete = "45m"
49-
update = "45m"
50-
}
41+
resource "astra_database" "mydb" {
42+
name = "dbname"
43+
keyspace = "testks"
44+
cloud_provider = "gcp"
45+
regions = ["us-west4", "us-east4", "us-central1"]
46+
timeouts {
47+
create = "45m"
48+
delete = "45m"
49+
update = "45m"
50+
}
5151
}
5252
// Primary datacenter SCB (GCP.us-west4)
5353
data "astra_secure_connect_bundle_url" "scb1" {
54-
database_id = astra_database.mydb.id
54+
database_id = astra_database.mydb.id
5555
datacenter_id = astra_database.mydb.datacenters["${astra_database.mydb.cloud_provider}.${astra_database.mydb.regions[0]}"] // for the primary dataceneter, the datacenter ID is not required
5656
}
5757
// Second datacenter SCB (GCP.us-east4)
5858
data "astra_secure_connect_bundle_url" "scb2" {
59-
database_id = astra_database.mydb.id
59+
database_id = astra_database.mydb.id
6060
datacenter_id = astra_database.mydb.datacenters["${astra_database.mydb.cloud_provider}.${astra_database.mydb.regions[1]}"]
6161
}
6262
// Third datacenter SCB (GCP.us-central1)
6363
data "astra_secure_connect_bundle_url" "scb3" {
64-
database_id = astra_database.mydb.id
64+
database_id = astra_database.mydb.id
6565
datacenter_id = astra_database.mydb.datacenters["${astra_database.mydb.cloud_provider}.${astra_database.mydb.regions[2]}"]
6666
}
6767
```

docs/data-sources/streaming_tenant_tokens.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ data "astra_streaming_tenant_tokens" "tokens" {
2121
2222
// Example referencing astra_streaming_tenant
2323
resource "astra_streaming_tenant" "tenant" {
24-
tenant_name = "mytenant"
25-
topic = "topic1"
26-
region = "us-east4"
27-
cloud_provider = "gcp"
28-
user_email = "[email protected]"
24+
tenant_name = "mytenant"
25+
topic = "topic1"
26+
region = "us-east4"
27+
cloud_provider = "gcp"
28+
user_email = "[email protected]"
2929
}
3030
3131
data "astra_streaming_tenant_tokens" "tokens" {

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Terraform 1.0 and later:
2424
terraform {
2525
required_providers {
2626
astra = {
27-
source = "datastax/astra"
27+
source = "datastax/astra"
2828
version = "2.1.15"
2929
}
3030
}

docs/resources/access_list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: |-
1515
```terraform
1616
resource "astra_access_list" "example" {
1717
database_id = "a6bc9c26-e7ce-424f-84c7-0a00afb12588"
18-
enabled = true
18+
enabled = true
1919
addresses {
2020
address = "0.0.0.1/0"
2121
enabled = true

docs/resources/cdc.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,57 +25,57 @@ resource "random_uuid" "identifier" {}
2525
2626
# Create a new tenant
2727
resource "astra_streaming_tenant" "streaming_tenant" {
28-
tenant_name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 32)
29-
user_email = "[email protected]"
30-
cloud_provider = "gcp"
31-
deletion_protection = true
32-
region = "us-central1"
28+
tenant_name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 32)
29+
user_email = "[email protected]"
30+
cloud_provider = "gcp"
31+
deletion_protection = false
32+
region = "us-central1"
3333
}
3434
3535
# Create a new database
3636
resource "astra_database" "db_database" {
37-
name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 50)
38-
keyspace = "click_data" # 48 characters max
39-
cloud_provider = "gcp" # this must match the cloud_provider of the tenant
40-
regions = ["us-central1"] # this must match the region of the tenant
41-
deletion_protection = false
37+
name = substr("webstore-clicks-${random_uuid.identifier.id}", 0, 50)
38+
keyspace = "click_data" # 48 characters max
39+
cloud_provider = "gcp" # this must match the cloud_provider of the tenant
40+
regions = ["us-central1"] # this must match the region of the tenant
41+
deletion_protection = false
4242
}
4343
4444
# Create a new table in that database
4545
resource "astra_table" "db_table" {
46-
keyspace = astra_database.db_database.keyspace
47-
database_id = astra_database.db_database.id
48-
region = astra_database.db_database.regions[0]
49-
table = "all_product_clicks"
50-
clustering_columns = "visitor_id:click_timestamp"
51-
partition_keys = "visitor_id:click_url"
52-
column_definitions = [
53-
{
54-
Name: "click_timestamp"
55-
Static: false
56-
TypeDefinition: "bigint"
57-
},
58-
{
59-
Name: "visitor_id"
60-
Static: false
61-
TypeDefinition: "uuid"
62-
},
63-
{
64-
Name: "click_url"
65-
Static: false
66-
TypeDefinition: "text"
67-
}
68-
]
46+
keyspace = astra_database.db_database.keyspace
47+
database_id = astra_database.db_database.id
48+
region = astra_database.db_database.regions[0]
49+
table = "all_product_clicks"
50+
clustering_columns = "visitor_id:click_timestamp"
51+
partition_keys = "visitor_id:click_url"
52+
column_definitions = [
53+
{
54+
Name : "click_timestamp"
55+
Static : false
56+
TypeDefinition : "bigint"
57+
},
58+
{
59+
Name : "visitor_id"
60+
Static : false
61+
TypeDefinition : "uuid"
62+
},
63+
{
64+
Name : "click_url"
65+
Static : false
66+
TypeDefinition : "text"
67+
}
68+
]
6969
}
7070
7171
# Create a new CDC connection between tenant topic and db table
7272
resource "astra_cdc" "db_cdc" {
73-
database_id = astra_database.db_database.id
74-
database_name = astra_database.db_database.name
75-
table = astra_table.db_table.table
76-
keyspace = astra_database.db_database.keyspace
77-
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name
78-
topic_partitions = 3
73+
database_id = astra_database.db_database.id
74+
database_name = astra_database.db_database.name
75+
table = astra_table.db_table.table
76+
keyspace = astra_database.db_database.keyspace
77+
tenant_name = astra_streaming_tenant.streaming_tenant.tenant_name
78+
topic_partitions = 3
7979
}
8080
8181
# --Formatted Outputs--

docs/resources/database.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ resource "random_pet" "pet_name" {}
1919
# Create a new database
2020
resource "astra_database" "example_db" {
2121
# Required
22-
name = substr( "my-database-${random_pet.pet_name.id}", 0, 50)
23-
keyspace = "example_keyspace" # 48 characters max
24-
cloud_provider = "gcp"
25-
regions = ["us-central1"]
22+
name = substr("my-database-${random_pet.pet_name.id}", 0, 50)
23+
keyspace = "example_keyspace" # 48 characters max
24+
cloud_provider = "gcp"
25+
regions = ["us-central1"]
2626
2727
# Optional
28-
deletion_protection = false
29-
timeouts {
30-
create = "30m"
31-
update = "30m"
32-
delete = "30m"
33-
}
28+
deletion_protection = false
29+
timeouts {
30+
create = "30m"
31+
update = "30m"
32+
delete = "30m"
33+
}
3434
}
3535
3636
# --Formatted Outputs--
@@ -49,12 +49,12 @@ resource "astra_database" "example_db" {
4949
5050
output "status" {
5151
description = "Database status"
52-
value = astra_database.example_db.status
52+
value = astra_database.example_db.status
5353
}
5454
5555
output "cqlsh_url" {
5656
description = "CQL shell URL"
57-
value = astra_database.example_db.cqlsh_url
57+
value = astra_database.example_db.cqlsh_url
5858
}
5959
```
6060

docs/resources/keyspace.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ resource "random_pet" "pet_name" {}
1919
# Create a new database
2020
resource "astra_database" "example_db" {
2121
# Required
22-
name = substr( "my-database-${random_pet.pet_name.id}", 0, 50)
23-
keyspace = "example_keyspace"
24-
cloud_provider = "gcp"
25-
regions = ["us-central1"]
26-
deletion_protection = false
22+
name = substr("my-database-${random_pet.pet_name.id}", 0, 50)
23+
keyspace = "example_keyspace"
24+
cloud_provider = "gcp"
25+
regions = ["us-central1"]
26+
deletion_protection = false
2727
}
2828
2929
resource "astra_keyspace" "example_keyspace" {

docs/resources/role.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ resource "astra_database" "exampledb" {
4545
4646
# Example application keyspaces
4747
resource "astra_keyspace" "appks1" {
48-
name = "appks1"
48+
name = "appks1"
4949
database_id = astra_database.exampledb.id
5050
}
5151
5252
resource "astra_keyspace" "appks2" {
53-
name = "appks2"
53+
name = "appks2"
5454
database_id = astra_database.exampledb.id
5555
}
5656
5757
resource "astra_keyspace" "appks3" {
58-
name = "appks3"
58+
name = "appks3"
5959
database_id = astra_database.exampledb.id
6060
}
6161

docs/resources/streaming_namespace.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,39 @@ resource "random_pet" "server" {}
1818
1919
# Create a new tenant
2020
resource "astra_streaming_tenant" "streaming_tenant" {
21-
tenant_name = "my-tenant-${random_pet.server.id}"
22-
user_email = "[email protected]"
23-
cloud_provider = "gcp"
24-
deletion_protection = false # let terraform destroy the tenant
25-
region = "us-central1"
21+
tenant_name = "my-tenant-${random_pet.server.id}"
22+
user_email = "[email protected]"
23+
cloud_provider = "gcp"
24+
deletion_protection = false # let terraform destroy the tenant
25+
region = "us-central1"
2626
}
2727
2828
# Create a new namespace
2929
resource "astra_streaming_namespace" "streaming_namespace" {
3030
# Required
31-
cluster = astra_streaming_tenant.streaming_tenant.cluster_name
32-
tenant = astra_streaming_tenant.streaming_tenant.tenant_name
33-
namespace = "my-namespace"
31+
cluster = astra_streaming_tenant.streaming_tenant.cluster_name
32+
tenant = astra_streaming_tenant.streaming_tenant.tenant_name
33+
namespace = "my-namespace"
3434
3535
# Optional
36-
policies = {
37-
auto_topic_creation_override = {
36+
policies = {
37+
auto_topic_creation_override = {
3838
allow_auto_topic_creation = true
39-
default_num_partitions = 1
40-
topic_type = "partitioned" # "partitioned" or "non_partitioned"
39+
default_num_partitions = 1
40+
topic_type = "partitioned" # "partitioned" or "non_partitioned"
4141
}
42-
backlog_quota_map = {
42+
backlog_quota_map = {
4343
"destination_storage" = {
44-
"limit": 500170751,
45-
"limit_size": 500170751,
46-
"limit_time": 0,
47-
"policy": "producer_exception" # "producer_exception" or "producer_request_hold" or "consumer_backlog_eviction"
44+
"limit" : 500170751,
45+
"limit_size" : 500170751,
46+
"limit_time" : 0,
47+
"policy" : "producer_exception" # "producer_exception" or "producer_request_hold" or "consumer_backlog_eviction"
4848
}
4949
}
50-
is_allow_auto_update_schema = true
51-
message_ttl_in_seconds = 0
52-
retention_policies = {
53-
retention_size_in_mb = 0
50+
is_allow_auto_update_schema = true
51+
message_ttl_in_seconds = 0
52+
retention_policies = {
53+
retention_size_in_mb = 0
5454
retention_time_in_minutes = 0
5555
}
5656
schema_auto_update_compatibility_strategy = "Full"

docs/resources/streaming_pulsar_token.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ resource "random_pet" "pet_name" {}
1919
# Create a new tenant
2020
resource "astra_streaming_tenant" "streaming_tenant" {
2121
# Required
22-
tenant_name = substr( "my-tenant-${random_pet.pet_name.id}", 0, 32)
23-
user_email = "[email protected]"
24-
cloud_provider = "gcp"
25-
deletion_protection = false
26-
region = "us-central1"
22+
tenant_name = substr("my-tenant-${random_pet.pet_name.id}", 0, 32)
23+
user_email = "[email protected]"
24+
cloud_provider = "gcp"
25+
deletion_protection = false
26+
region = "us-central1"
2727
}
2828
2929
# Create a new pulsar token for the tenant
3030
resource "astra_streaming_pulsar_token" "streaming_token" {
3131
# Required
32-
cluster = astra_streaming_tenant.streaming_tenant.cluster_name
33-
tenant = astra_streaming_tenant.streaming_tenant.tenant_name
32+
cluster = astra_streaming_tenant.streaming_tenant.cluster_name
33+
tenant = astra_streaming_tenant.streaming_tenant.tenant_name
3434
3535
# Optional
36-
time_to_live = "30d" # Token will be valid for 30 days
36+
time_to_live = "30d" # Token will be valid for 30 days
3737
}
3838
3939
output "streaming_token" {
4040
description = "The streaming token"
41-
value = nonsensitive(astra_streaming_pulsar_token.streaming_token.token)
41+
value = nonsensitive(astra_streaming_pulsar_token.streaming_token.token)
4242
}
4343
4444
# --Formatted Outputs--

0 commit comments

Comments
 (0)