如何在 Terraform 输出中获取 cosmos db gremlin 端点
How to get cosmos db gremlin endpoint in Terraform output
我们正在使用 Terraform 生成端点并设置为我们的服务,我们可以获得文档数据库连接字符串:
AccountEndpoint=https://mygraphaccount.documents.azure.com:443/
我的问题是如何获取 Gremlin Endpoint:
GremlinEndpoint: wss://mygraphaccount.gremlin.cosmos.azure.com:443/,
在terraform的文档中:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cosmosdb_account
id - The CosmosDB Account ID.
endpoint - The endpoint used to connect to the CosmosDB account.
read_endpoints - A list of read endpoints available for this CosmosDB account.
write_endpoints - A list of write endpoints available for this CosmosDB account.
primary_key - The Primary key for the CosmosDB Account.
secondary_key - The Secondary key for the CosmosDB Account.
primary_readonly_key - The Primary read-only Key for the CosmosDB Account.
secondary_readonly_key - The Secondary read-only key for the CosmosDB Account.
connection_strings - A list of connection strings available for this CosmosDB account.
None 其中看起来像 GreminEndpoint。
我遇到了与 MongoDB 类似的问题,并通过自定义字符串插值解决了它(如问题评论中所述)。
output "gremlin_url" {
value = "wss://${azurerm_cosmosdb_account.example.name}.gremlin.cosmos.azure.com:443/"
}
我们正在使用 Terraform 生成端点并设置为我们的服务,我们可以获得文档数据库连接字符串: AccountEndpoint=https://mygraphaccount.documents.azure.com:443/
我的问题是如何获取 Gremlin Endpoint: GremlinEndpoint: wss://mygraphaccount.gremlin.cosmos.azure.com:443/,
在terraform的文档中: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cosmosdb_account
id - The CosmosDB Account ID.
endpoint - The endpoint used to connect to the CosmosDB account.
read_endpoints - A list of read endpoints available for this CosmosDB account.
write_endpoints - A list of write endpoints available for this CosmosDB account.
primary_key - The Primary key for the CosmosDB Account.
secondary_key - The Secondary key for the CosmosDB Account.
primary_readonly_key - The Primary read-only Key for the CosmosDB Account.
secondary_readonly_key - The Secondary read-only key for the CosmosDB Account.
connection_strings - A list of connection strings available for this CosmosDB account.
None 其中看起来像 GreminEndpoint。
我遇到了与 MongoDB 类似的问题,并通过自定义字符串插值解决了它(如问题评论中所述)。
output "gremlin_url" {
value = "wss://${azurerm_cosmosdb_account.example.name}.gremlin.cosmos.azure.com:443/"
}