Skip to content

Commit

Permalink
Updating the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Jun 20, 2017
1 parent d4c1d92 commit 1822ed2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
8 changes: 4 additions & 4 deletions website/azurerm.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
</ul>
</li>

<li<%= sidebar_current("docs-azurerm-resource-container") %>>
<a href="#">CosmosDB Resources</a>
<li<%= sidebar_current("docs-azurerm-resource-cosmosdb") %>>
<a href="#">CosmosDB (DocumentDB) Resources</a>
<ul class="nav nav-visible">

<li<%= sidebar_current("docs-azurerm-resource-cosmos-db") %>>
<a href="/docs/providers/azurerm/r/cosmos_db.html">azurerm_cosmos_db</a>
<li<%= sidebar_current("docs-azurerm-resource-cosmosdb-account") %>>
<a href="/docs/providers/azurerm/r/cosmosdb_account.html">azurerm_cosmosdb_account</a>
</li>

</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
layout: "azurerm"
page_title: "Azure Resource Manager: azurerm_cosmos_db"
sidebar_current: "docs-azurerm-resource-cosmos_db"
page_title: "Azure Resource Manager: azurerm_cosmosdb_account"
sidebar_current: "docs-azurerm-resource-cosmosdb-account"
description: |-
Creates a new CosmosDB (DocumentDB) Account.
Creates a new CosmosDB (formally DocumentDB) Account.
---

# azurerm\_cosmos_db

Creates a new CosmosDB (DocumentDB) Account.
Creates a new CosmosDB (formally DocumentDB) Account.

## Example Usage

Expand All @@ -18,15 +18,13 @@ resource "azurerm_resource_group" "test" {
location = "West Europe"
}
resource "azurerm_cosmos_db" "test" {
name = "documentDBAccount1"
resource "azurerm_cosmosdb_account" "test" {
name = "cosmosDBAccount1"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
offer_type = "Standard"
consistency_policy {
consistency_level = "BoundedStaleness"
max_interval_in_seconds = 10
max_staleness = 200
consistency_level = "BoundedStaleness"
}
failover_policy {
Expand All @@ -49,9 +47,9 @@ resource "azurerm_cosmos_db" "test" {

The following arguments are supported:

* `name` - (Required) Specifies the name of the DocumentDB account. Changing this forces a new resource to be created.
* `name` - (Required) Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.

* `resource_group_name` - (Required) The name of the resource group in which the DocumentDB Account is created. Changing this forces a new resource to be created.
* `resource_group_name` - (Required) The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.

* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Expand All @@ -61,15 +59,15 @@ The following arguments are supported:

* `failover_policy` - (Required) Specifies a `failover_policy` resource, used to define where data should be replicated.

* `ip_range_filter` - (Optional) DocumentDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
* `ip_range_filter` - (Optional) DocumentDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IP's for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.

* `tags` - (Optional) A mapping of tags to assign to the resource.

`consistency_policy` supports the following:

* `consistency_level` - (Required) The Consistency Level to use for this DocumentDB Account - can be either `BoundedStaleness`, `Eventual`, `Session` or `Strong`.
* `max_interval_in_seconds` - (Optional) When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100. Required when `consistency_level` is set to `BoundedStaleness`.
* `max_staleness` - (Optional) When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when `consistency_level` is set to `BoundedStaleness`.
* `consistency_level` - (Required) The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session` or `Strong`.
* `max_interval_in_seconds` - (Optional) When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100. Defaults to `5`. Required when `consistency_level` is set to `BoundedStaleness`.
* `max_staleness` - (Optional) When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Defaults to `100`. Required when `consistency_level` is set to `BoundedStaleness`.

`failover_policy` supports the following:

Expand All @@ -80,21 +78,21 @@ The following arguments are supported:

The following attributes are exported:

* `id` - The DocumentDB Account ID.
* `id` - The CosmosDB Account ID.

* `primary_master_key` - The Primary master key for the DocumentDB account.
* `primary_master_key` - The Primary master key for the CosmosDB Account.

* `secondary_master_key` - The Secondary master key for the DocumentDB account.
* `secondary_master_key` - The Secondary master key for the CosmosDB Account.

* `primary_readonly_master_key` - The Primary read-only master Key for the DocumentDB account.
* `primary_readonly_master_key` - The Primary read-only master Key for the CosmosDB Account.

* `secondary_readonly_master_key` - The Secondary read-only master key for the DocumentDB account.
* `secondary_readonly_master_key` - The Secondary read-only master key for the CosmosDB Account.


## Import

CosmosDB accounts can be imported using the `resource id`, e.g.
CosmosDB Accounts can be imported using the `resource id`, e.g.

```
terraform import azurerm_cosmos_db.account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1
terraform import azurerm_cosmosdb_account.account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1
```

0 comments on commit 1822ed2

Please sign in to comment.