-
Notifications
You must be signed in to change notification settings - Fork 543
/
cosmosdb_gremlin_database_test.tf
120 lines (102 loc) · 3.38 KB
/
cosmosdb_gremlin_database_test.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
provider "azurerm" {
skip_provider_registration = true
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "eastus"
}
resource "azurerm_cosmosdb_account" "example" {
name = "tfex-cosmosdb-account"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
offer_type = "Standard"
analytical_storage_enabled = true
consistency_policy {
consistency_level = "Strong"
}
geo_location {
location = "westus"
failover_priority = 0
}
backup {
type = "Periodic"
interval_in_minutes = 240
retention_in_hours = 16
}
}
resource "azurerm_cosmosdb_account" "continuous_backup" {
name = "tfex-cosmosdb-account"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
offer_type = "Standard"
consistency_policy {
consistency_level = "Strong"
}
geo_location {
location = "westus"
failover_priority = 0
}
geo_location {
location = "centralus"
failover_priority = 1
zone_redundant = true
}
backup {
type = "Continuous"
}
}
resource "azurerm_cosmosdb_account" "multi-master_backup2copies" {
name = "tfex-cosmosdb-account"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
offer_type = "Standard"
enable_multiple_write_locations = true
consistency_policy {
consistency_level = "Strong"
}
geo_location {
location = "westus"
failover_priority = 0
}
geo_location {
location = "centralus"
failover_priority = 1
}
backup {
type = "Periodic"
}
}
resource "azurerm_cosmosdb_gremlin_database" "non-usage_autoscale" {
name = "tfex-cosmos-cassandra-keyspace"
resource_group_name = azurerm_cosmosdb_account.example.resource_group_name
account_name = azurerm_cosmosdb_account.example.name
autoscale_settings {
max_throughput = 4000
}
}
resource "azurerm_cosmosdb_gremlin_database" "autoscale" {
name = "tfex-cosmos-cassandra-keyspace"
resource_group_name = azurerm_cosmosdb_account.example.resource_group_name
account_name = azurerm_cosmosdb_account.continuous_backup.name
autoscale_settings {
max_throughput = 6000
}
}
resource "azurerm_cosmosdb_gremlin_database" "provisioned" {
name = "tfex-cosmos-cassandra-keyspace"
resource_group_name = azurerm_cosmosdb_account.example.resource_group_name
account_name = azurerm_cosmosdb_account.continuous_backup.name
throughput = 500
}
resource "azurerm_cosmosdb_gremlin_database" "mutli-master_backup2copies" {
name = "tfex-cosmos-cassandra-keyspace"
resource_group_name = azurerm_cosmosdb_account.example.resource_group_name
account_name = azurerm_cosmosdb_account.multi-master_backup2copies.name
throughput = 1000
}
resource "azurerm_cosmosdb_gremlin_database" "serverless" {
name = "tfex-cosmos-cassandra-keyspace"
resource_group_name = azurerm_cosmosdb_account.example.resource_group_name
account_name = azurerm_cosmosdb_account.example.name
}