azure::cosmos-db

Creates a cosmos database.

Example

azure::cosmos-db cosmos-db-example
    database-account-kind: "AzureTable"
    consistency-level: "Session"
    ip-range-filter: "10.1.0.0"
    name: "cosmos-db-example"
    read-replication-regions: ["Central US"]
    resource-group: $(azure::resource-group resource-group-cosmos-db-example)
    tags: {
        Name: "network-interface-example"
    }
    virtual-network-rules: [$(azure::network network-example).subnet.0.id]
    write-replication-region: "Canada East"
end

Attributes

Attribute Description
database-account-kind The database account kind. Valid values are AzureTable, Cassandra, Gremlin, MongoDB or Sql. (Required)
consistency-level The consistency policy of the account. Valid values are BoundedStaleness, Eventual, Session or Strong. (Required)
ip-range-filter 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.
max-interval The time amount of staleness (in seconds) tolerated. Required when used with BoundedStaleness consistency policy. Valid values are between 5 to 86400.
max-staleness-prefix This value represents the number of stale requests tolerated. Required when used with BoundedStaleness consistency policy. Valid values are between 10 to 2147483647.
name Name of the account. (Required)
read-replication-regions list Sets the read location regions.
resource-group The resource group where the database is found. (Required)
tags map The tags associated with the account.
virtual-network-rules list The virtual network rules associated with the account. A list of Subnet ID is required.
write-replication-region Sets the write location. Required when used with BoundedStaleness, Eventual, and Session consistency levels.

Outputs

Attribute Description
id The ID of the database.