We recommend using Azure Native.
azure.cosmosdb.Account
Explore with Pulumi AI
Manages a CosmosDB (formally DocumentDB) Account.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var rg = new Azure.Core.ResourceGroup("rg", new()
{
Location = "westus",
});
var ri = new Random.RandomInteger("ri", new()
{
Min = 10000,
Max = 99999,
});
var db = new Azure.CosmosDB.Account("db", new()
{
Location = azurerm_resource_group.Example.Location,
ResourceGroupName = azurerm_resource_group.Example.Name,
OfferType = "Standard",
Kind = "MongoDB",
EnableAutomaticFailover = true,
Capabilities = new[]
{
new Azure.CosmosDB.Inputs.AccountCapabilityArgs
{
Name = "EnableAggregationPipeline",
},
new Azure.CosmosDB.Inputs.AccountCapabilityArgs
{
Name = "mongoEnableDocLevelTTL",
},
new Azure.CosmosDB.Inputs.AccountCapabilityArgs
{
Name = "MongoDBv3.4",
},
new Azure.CosmosDB.Inputs.AccountCapabilityArgs
{
Name = "EnableMongo",
},
},
ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
{
ConsistencyLevel = "BoundedStaleness",
MaxIntervalInSeconds = 300,
MaxStalenessPrefix = 100000,
},
GeoLocations = new[]
{
new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
{
Location = "eastus",
FailoverPriority = 1,
},
new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
{
Location = "westus",
FailoverPriority = 0,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
Location: pulumi.String("westus"),
})
if err != nil {
return err
}
_, err = random.NewRandomInteger(ctx, "ri", &random.RandomIntegerArgs{
Min: pulumi.Int(10000),
Max: pulumi.Int(99999),
})
if err != nil {
return err
}
_, err = cosmosdb.NewAccount(ctx, "db", &cosmosdb.AccountArgs{
Location: pulumi.Any(azurerm_resource_group.Example.Location),
ResourceGroupName: pulumi.Any(azurerm_resource_group.Example.Name),
OfferType: pulumi.String("Standard"),
Kind: pulumi.String("MongoDB"),
EnableAutomaticFailover: pulumi.Bool(true),
Capabilities: cosmosdb.AccountCapabilityArray{
&cosmosdb.AccountCapabilityArgs{
Name: pulumi.String("EnableAggregationPipeline"),
},
&cosmosdb.AccountCapabilityArgs{
Name: pulumi.String("mongoEnableDocLevelTTL"),
},
&cosmosdb.AccountCapabilityArgs{
Name: pulumi.String("MongoDBv3.4"),
},
&cosmosdb.AccountCapabilityArgs{
Name: pulumi.String("EnableMongo"),
},
},
ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
ConsistencyLevel: pulumi.String("BoundedStaleness"),
MaxIntervalInSeconds: pulumi.Int(300),
MaxStalenessPrefix: pulumi.Int(100000),
},
GeoLocations: cosmosdb.AccountGeoLocationArray{
&cosmosdb.AccountGeoLocationArgs{
Location: pulumi.String("eastus"),
FailoverPriority: pulumi.Int(1),
},
&cosmosdb.AccountGeoLocationArgs{
Location: pulumi.String("westus"),
FailoverPriority: pulumi.Int(0),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.azure.cosmosdb.Account;
import com.pulumi.azure.cosmosdb.AccountArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountCapabilityArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var rg = new ResourceGroup("rg", ResourceGroupArgs.builder()
.location("westus")
.build());
var ri = new RandomInteger("ri", RandomIntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var db = new Account("db", AccountArgs.builder()
.location(azurerm_resource_group.example().location())
.resourceGroupName(azurerm_resource_group.example().name())
.offerType("Standard")
.kind("MongoDB")
.enableAutomaticFailover(true)
.capabilities(
AccountCapabilityArgs.builder()
.name("EnableAggregationPipeline")
.build(),
AccountCapabilityArgs.builder()
.name("mongoEnableDocLevelTTL")
.build(),
AccountCapabilityArgs.builder()
.name("MongoDBv3.4")
.build(),
AccountCapabilityArgs.builder()
.name("EnableMongo")
.build())
.consistencyPolicy(AccountConsistencyPolicyArgs.builder()
.consistencyLevel("BoundedStaleness")
.maxIntervalInSeconds(300)
.maxStalenessPrefix(100000)
.build())
.geoLocations(
AccountGeoLocationArgs.builder()
.location("eastus")
.failoverPriority(1)
.build(),
AccountGeoLocationArgs.builder()
.location("westus")
.failoverPriority(0)
.build())
.build());
}
}
import pulumi
import pulumi_azure as azure
import pulumi_random as random
rg = azure.core.ResourceGroup("rg", location="westus")
ri = random.RandomInteger("ri",
min=10000,
max=99999)
db = azure.cosmosdb.Account("db",
location=azurerm_resource_group["example"]["location"],
resource_group_name=azurerm_resource_group["example"]["name"],
offer_type="Standard",
kind="MongoDB",
enable_automatic_failover=True,
capabilities=[
azure.cosmosdb.AccountCapabilityArgs(
name="EnableAggregationPipeline",
),
azure.cosmosdb.AccountCapabilityArgs(
name="mongoEnableDocLevelTTL",
),
azure.cosmosdb.AccountCapabilityArgs(
name="MongoDBv3.4",
),
azure.cosmosdb.AccountCapabilityArgs(
name="EnableMongo",
),
],
consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
consistency_level="BoundedStaleness",
max_interval_in_seconds=300,
max_staleness_prefix=100000,
),
geo_locations=[
azure.cosmosdb.AccountGeoLocationArgs(
location="eastus",
failover_priority=1,
),
azure.cosmosdb.AccountGeoLocationArgs(
location="westus",
failover_priority=0,
),
])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";
const rg = new azure.core.ResourceGroup("rg", {location: "westus"});
const ri = new random.RandomInteger("ri", {
min: 10000,
max: 99999,
});
const db = new azure.cosmosdb.Account("db", {
location: azurerm_resource_group.example.location,
resourceGroupName: azurerm_resource_group.example.name,
offerType: "Standard",
kind: "MongoDB",
enableAutomaticFailover: true,
capabilities: [
{
name: "EnableAggregationPipeline",
},
{
name: "mongoEnableDocLevelTTL",
},
{
name: "MongoDBv3.4",
},
{
name: "EnableMongo",
},
],
consistencyPolicy: {
consistencyLevel: "BoundedStaleness",
maxIntervalInSeconds: 300,
maxStalenessPrefix: 100000,
},
geoLocations: [
{
location: "eastus",
failoverPriority: 1,
},
{
location: "westus",
failoverPriority: 0,
},
],
});
resources:
rg:
type: azure:core:ResourceGroup
properties:
location: westus
ri:
type: random:RandomInteger
properties:
min: 10000
max: 99999
db:
type: azure:cosmosdb:Account
properties:
location: ${azurerm_resource_group.example.location}
resourceGroupName: ${azurerm_resource_group.example.name}
offerType: Standard
kind: MongoDB
enableAutomaticFailover: true
capabilities:
- name: EnableAggregationPipeline
- name: mongoEnableDocLevelTTL
- name: MongoDBv3.4
- name: EnableMongo
consistencyPolicy:
consistencyLevel: BoundedStaleness
maxIntervalInSeconds: 300
maxStalenessPrefix: 100000
geoLocations:
- location: eastus
failoverPriority: 1
- location: westus
failoverPriority: 0
Create Account Resource
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_key_metadata_writes_enabled: Optional[bool] = None,
analytical_storage: Optional[AccountAnalyticalStorageArgs] = None,
analytical_storage_enabled: Optional[bool] = None,
backup: Optional[AccountBackupArgs] = None,
capabilities: Optional[Sequence[AccountCapabilityArgs]] = None,
capacity: Optional[AccountCapacityArgs] = None,
consistency_policy: Optional[AccountConsistencyPolicyArgs] = None,
cors_rule: Optional[AccountCorsRuleArgs] = None,
create_mode: Optional[str] = None,
default_identity_type: Optional[str] = None,
enable_automatic_failover: Optional[bool] = None,
enable_free_tier: Optional[bool] = None,
enable_multiple_write_locations: Optional[bool] = None,
geo_locations: Optional[Sequence[AccountGeoLocationArgs]] = None,
identity: Optional[AccountIdentityArgs] = None,
ip_range_filter: Optional[str] = None,
is_virtual_network_filter_enabled: Optional[bool] = None,
key_vault_key_id: Optional[str] = None,
kind: Optional[str] = None,
local_authentication_disabled: Optional[bool] = None,
location: Optional[str] = None,
mongo_server_version: Optional[str] = None,
name: Optional[str] = None,
network_acl_bypass_for_azure_services: Optional[bool] = None,
network_acl_bypass_ids: Optional[Sequence[str]] = None,
offer_type: Optional[str] = None,
public_network_access_enabled: Optional[bool] = None,
resource_group_name: Optional[str] = None,
restore: Optional[AccountRestoreArgs] = None,
tags: Optional[Mapping[str, str]] = None,
virtual_network_rules: Optional[Sequence[AccountVirtualNetworkRuleArgs]] = None)
@overload
def Account(resource_name: str,
args: AccountArgs,
opts: Optional[ResourceOptions] = None)
func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: azure:cosmosdb:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Account Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Account resource accepts the following input properties:
- Consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- Geo
Locations List<AccountGeo Location> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- Offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- Resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Access
Key boolMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- Analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- Analytical
Storage boolEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- Backup
Account
Backup A
backup
block as defined below.- Capabilities
List<Account
Capability> The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- Capacity
Account
Capacity A
capacity
block as defined below.- Cors
Rule AccountCors Rule A
cors_rule
block as defined below.- Create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- Default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- Enable
Automatic boolFailover Enable automatic failover for this Cosmos DB account.
- Enable
Free boolTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- Enable
Multiple boolWrite Locations Enable multiple write locations for this Cosmos DB account.
- Identity
Account
Identity An
identity
block as defined below.- Ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- Is
Virtual boolNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- Key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- Kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- Local
Authentication boolDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Network
Acl boolBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- Network
Acl List<string>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- Public
Network boolAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- Restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Virtual
Network List<AccountRules Virtual Network Rule> Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
- Consistency
Policy AccountConsistency Policy Args Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- Geo
Locations []AccountGeo Location Args Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- Offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- Resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Access
Key boolMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- Analytical
Storage AccountAnalytical Storage Args An
analytical_storage
block as defined below.- Analytical
Storage boolEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- Backup
Account
Backup Args A
backup
block as defined below.- Capabilities
[]Account
Capability Args The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- Capacity
Account
Capacity Args A
capacity
block as defined below.- Cors
Rule AccountCors Rule Args A
cors_rule
block as defined below.- Create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- Default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- Enable
Automatic boolFailover Enable automatic failover for this Cosmos DB account.
- Enable
Free boolTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- Enable
Multiple boolWrite Locations Enable multiple write locations for this Cosmos DB account.
- Identity
Account
Identity Args An
identity
block as defined below.- Ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- Is
Virtual boolNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- Key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- Kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- Local
Authentication boolDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Network
Acl boolBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- Network
Acl []stringBypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- Public
Network boolAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- Restore
Account
Restore Args A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- map[string]string
A mapping of tags to assign to the resource.
- Virtual
Network []AccountRules Virtual Network Rule Args Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
- consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- geo
Locations List<AccountGeo Location> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- offer
Type String Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- resource
Group StringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- access
Key BooleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- analytical
Storage BooleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup A
backup
block as defined below.- capabilities
List<Account
Capability> The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity A
capacity
block as defined below.- cors
Rule AccountCors Rule A
cors_rule
block as defined below.- create
Mode String The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity StringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic BooleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free BooleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple BooleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- identity
Account
Identity An
identity
block as defined below.- ip
Range StringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual BooleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault StringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind String
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication BooleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server StringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl BooleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl List<String>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- public
Network BooleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Map<String,String>
A mapping of tags to assign to the resource.
- virtual
Network List<AccountRules Virtual Network Rule> Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
- consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- geo
Locations AccountGeo Location[] Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- access
Key booleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- analytical
Storage booleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup A
backup
block as defined below.- capabilities
Account
Capability[] The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity A
capacity
block as defined below.- cors
Rule AccountCors Rule A
cors_rule
block as defined below.- create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic booleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free booleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple booleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- identity
Account
Identity An
identity
block as defined below.- ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual booleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication booleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl booleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl string[]Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- public
Network booleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- {[key: string]: string}
A mapping of tags to assign to the resource.
- virtual
Network AccountRules Virtual Network Rule[] Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
- consistency_
policy AccountConsistency Policy Args Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- geo_
locations Sequence[AccountGeo Location Args] Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- offer_
type str Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- resource_
group_ strname The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- access_
key_ boolmetadata_ writes_ enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical_
storage AccountAnalytical Storage Args An
analytical_storage
block as defined below.- analytical_
storage_ boolenabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup Args A
backup
block as defined below.- capabilities
Sequence[Account
Capability Args] The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity Args A
capacity
block as defined below.- cors_
rule AccountCors Rule Args A
cors_rule
block as defined below.- create_
mode str The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default_
identity_ strtype The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable_
automatic_ boolfailover Enable automatic failover for this Cosmos DB account.
- enable_
free_ booltier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable_
multiple_ boolwrite_ locations Enable multiple write locations for this Cosmos DB account.
- identity
Account
Identity Args An
identity
block as defined below.- ip_
range_ strfilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is_
virtual_ boolnetwork_ filter_ enabled Enables virtual network filtering for this Cosmos DB account.
- key_
vault_ strkey_ id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind str
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local_
authentication_ booldisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo_
server_ strversion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name str
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network_
acl_ boolbypass_ for_ azure_ services If Azure services can bypass ACLs. Defaults to
false
.- network_
acl_ Sequence[str]bypass_ ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- public_
network_ boolaccess_ enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- restore
Account
Restore Args A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Mapping[str, str]
A mapping of tags to assign to the resource.
- virtual_
network_ Sequence[Accountrules Virtual Network Rule Args] Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
- consistency
Policy Property Map Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- geo
Locations List<Property Map> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- offer
Type String Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- resource
Group StringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- access
Key BooleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage Property Map An
analytical_storage
block as defined below.- analytical
Storage BooleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup Property Map
A
backup
block as defined below.- capabilities List<Property Map>
The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity Property Map
A
capacity
block as defined below.- cors
Rule Property Map A
cors_rule
block as defined below.- create
Mode String The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity StringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic BooleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free BooleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple BooleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- identity Property Map
An
identity
block as defined below.- ip
Range StringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual BooleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault StringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind String
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication BooleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server StringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl BooleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl List<String>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- public
Network BooleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- restore Property Map
A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Map<String>
A mapping of tags to assign to the resource.
- virtual
Network List<Property Map>Rules Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Connection
Strings List<string> A list of connection strings available for this CosmosDB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Id string
The provider-assigned unique ID for this managed resource.
- Primary
Key string The Primary key for the CosmosDB Account.
- Primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- Primary
Readonly stringSql Connection String - Primary
Sql stringConnection String - Read
Endpoints List<string> A list of read endpoints available for this CosmosDB account.
- Secondary
Key string The Secondary key for the CosmosDB Account.
- Secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- Secondary
Readonly stringSql Connection String - Secondary
Sql stringConnection String - Write
Endpoints List<string> A list of write endpoints available for this CosmosDB account.
- Connection
Strings []string A list of connection strings available for this CosmosDB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Id string
The provider-assigned unique ID for this managed resource.
- Primary
Key string The Primary key for the CosmosDB Account.
- Primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- Primary
Readonly stringSql Connection String - Primary
Sql stringConnection String - Read
Endpoints []string A list of read endpoints available for this CosmosDB account.
- Secondary
Key string The Secondary key for the CosmosDB Account.
- Secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- Secondary
Readonly stringSql Connection String - Secondary
Sql stringConnection String - Write
Endpoints []string A list of write endpoints available for this CosmosDB account.
- connection
Strings List<String> A list of connection strings available for this CosmosDB account.
- endpoint String
The endpoint used to connect to the CosmosDB account.
- id String
The provider-assigned unique ID for this managed resource.
- primary
Key String The Primary key for the CosmosDB Account.
- primary
Readonly StringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly StringSql Connection String - primary
Sql StringConnection String - read
Endpoints List<String> A list of read endpoints available for this CosmosDB account.
- secondary
Key String The Secondary key for the CosmosDB Account.
- secondary
Readonly StringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly StringSql Connection String - secondary
Sql StringConnection String - write
Endpoints List<String> A list of write endpoints available for this CosmosDB account.
- connection
Strings string[] A list of connection strings available for this CosmosDB account.
- endpoint string
The endpoint used to connect to the CosmosDB account.
- id string
The provider-assigned unique ID for this managed resource.
- primary
Key string The Primary key for the CosmosDB Account.
- primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly stringSql Connection String - primary
Sql stringConnection String - read
Endpoints string[] A list of read endpoints available for this CosmosDB account.
- secondary
Key string The Secondary key for the CosmosDB Account.
- secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly stringSql Connection String - secondary
Sql stringConnection String - write
Endpoints string[] A list of write endpoints available for this CosmosDB account.
- connection_
strings Sequence[str] A list of connection strings available for this CosmosDB account.
- endpoint str
The endpoint used to connect to the CosmosDB account.
- id str
The provider-assigned unique ID for this managed resource.
- primary_
key str The Primary key for the CosmosDB Account.
- primary_
readonly_ strkey The Primary read-only Key for the CosmosDB Account.
- primary_
readonly_ strsql_ connection_ string - primary_
sql_ strconnection_ string - read_
endpoints Sequence[str] A list of read endpoints available for this CosmosDB account.
- secondary_
key str The Secondary key for the CosmosDB Account.
- secondary_
readonly_ strkey The Secondary read-only key for the CosmosDB Account.
- secondary_
readonly_ strsql_ connection_ string - secondary_
sql_ strconnection_ string - write_
endpoints Sequence[str] A list of write endpoints available for this CosmosDB account.
- connection
Strings List<String> A list of connection strings available for this CosmosDB account.
- endpoint String
The endpoint used to connect to the CosmosDB account.
- id String
The provider-assigned unique ID for this managed resource.
- primary
Key String The Primary key for the CosmosDB Account.
- primary
Readonly StringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly StringSql Connection String - primary
Sql StringConnection String - read
Endpoints List<String> A list of read endpoints available for this CosmosDB account.
- secondary
Key String The Secondary key for the CosmosDB Account.
- secondary
Readonly StringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly StringSql Connection String - secondary
Sql StringConnection String - write
Endpoints List<String> A list of write endpoints available for this CosmosDB account.
Look up Existing Account Resource
Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Account
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key_metadata_writes_enabled: Optional[bool] = None,
analytical_storage: Optional[AccountAnalyticalStorageArgs] = None,
analytical_storage_enabled: Optional[bool] = None,
backup: Optional[AccountBackupArgs] = None,
capabilities: Optional[Sequence[AccountCapabilityArgs]] = None,
capacity: Optional[AccountCapacityArgs] = None,
connection_strings: Optional[Sequence[str]] = None,
consistency_policy: Optional[AccountConsistencyPolicyArgs] = None,
cors_rule: Optional[AccountCorsRuleArgs] = None,
create_mode: Optional[str] = None,
default_identity_type: Optional[str] = None,
enable_automatic_failover: Optional[bool] = None,
enable_free_tier: Optional[bool] = None,
enable_multiple_write_locations: Optional[bool] = None,
endpoint: Optional[str] = None,
geo_locations: Optional[Sequence[AccountGeoLocationArgs]] = None,
identity: Optional[AccountIdentityArgs] = None,
ip_range_filter: Optional[str] = None,
is_virtual_network_filter_enabled: Optional[bool] = None,
key_vault_key_id: Optional[str] = None,
kind: Optional[str] = None,
local_authentication_disabled: Optional[bool] = None,
location: Optional[str] = None,
mongo_server_version: Optional[str] = None,
name: Optional[str] = None,
network_acl_bypass_for_azure_services: Optional[bool] = None,
network_acl_bypass_ids: Optional[Sequence[str]] = None,
offer_type: Optional[str] = None,
primary_key: Optional[str] = None,
primary_readonly_key: Optional[str] = None,
primary_readonly_sql_connection_string: Optional[str] = None,
primary_sql_connection_string: Optional[str] = None,
public_network_access_enabled: Optional[bool] = None,
read_endpoints: Optional[Sequence[str]] = None,
resource_group_name: Optional[str] = None,
restore: Optional[AccountRestoreArgs] = None,
secondary_key: Optional[str] = None,
secondary_readonly_key: Optional[str] = None,
secondary_readonly_sql_connection_string: Optional[str] = None,
secondary_sql_connection_string: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
virtual_network_rules: Optional[Sequence[AccountVirtualNetworkRuleArgs]] = None,
write_endpoints: Optional[Sequence[str]] = None) -> Account
func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Key boolMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- Analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- Analytical
Storage boolEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- Backup
Account
Backup A
backup
block as defined below.- Capabilities
List<Account
Capability> The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- Capacity
Account
Capacity A
capacity
block as defined below.- Connection
Strings List<string> A list of connection strings available for this CosmosDB account.
- Consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- Cors
Rule AccountCors Rule A
cors_rule
block as defined below.- Create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- Default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- Enable
Automatic boolFailover Enable automatic failover for this Cosmos DB account.
- Enable
Free boolTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- Enable
Multiple boolWrite Locations Enable multiple write locations for this Cosmos DB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Geo
Locations List<AccountGeo Location> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- Identity
Account
Identity An
identity
block as defined below.- Ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- Is
Virtual boolNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- Key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- Kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- Local
Authentication boolDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Network
Acl boolBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- Network
Acl List<string>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- Offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- Primary
Key string The Primary key for the CosmosDB Account.
- Primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- Primary
Readonly stringSql Connection String - Primary
Sql stringConnection String - Public
Network boolAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- Read
Endpoints List<string> A list of read endpoints available for this CosmosDB account.
- Resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Secondary
Key string The Secondary key for the CosmosDB Account.
- Secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- Secondary
Readonly stringSql Connection String - Secondary
Sql stringConnection String - Dictionary<string, string>
A mapping of tags to assign to the resource.
- Virtual
Network List<AccountRules Virtual Network Rule> Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- Write
Endpoints List<string> A list of write endpoints available for this CosmosDB account.
- Access
Key boolMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- Analytical
Storage AccountAnalytical Storage Args An
analytical_storage
block as defined below.- Analytical
Storage boolEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- Backup
Account
Backup Args A
backup
block as defined below.- Capabilities
[]Account
Capability Args The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- Capacity
Account
Capacity Args A
capacity
block as defined below.- Connection
Strings []string A list of connection strings available for this CosmosDB account.
- Consistency
Policy AccountConsistency Policy Args Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- Cors
Rule AccountCors Rule Args A
cors_rule
block as defined below.- Create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- Default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- Enable
Automatic boolFailover Enable automatic failover for this Cosmos DB account.
- Enable
Free boolTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- Enable
Multiple boolWrite Locations Enable multiple write locations for this Cosmos DB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Geo
Locations []AccountGeo Location Args Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- Identity
Account
Identity Args An
identity
block as defined below.- Ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- Is
Virtual boolNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- Key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- Kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- Local
Authentication boolDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Network
Acl boolBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- Network
Acl []stringBypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- Offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- Primary
Key string The Primary key for the CosmosDB Account.
- Primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- Primary
Readonly stringSql Connection String - Primary
Sql stringConnection String - Public
Network boolAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- Read
Endpoints []string A list of read endpoints available for this CosmosDB account.
- Resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Restore
Account
Restore Args A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- Secondary
Key string The Secondary key for the CosmosDB Account.
- Secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- Secondary
Readonly stringSql Connection String - Secondary
Sql stringConnection String - map[string]string
A mapping of tags to assign to the resource.
- Virtual
Network []AccountRules Virtual Network Rule Args Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- Write
Endpoints []string A list of write endpoints available for this CosmosDB account.
- access
Key BooleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- analytical
Storage BooleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup A
backup
block as defined below.- capabilities
List<Account
Capability> The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity A
capacity
block as defined below.- connection
Strings List<String> A list of connection strings available for this CosmosDB account.
- consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- cors
Rule AccountCors Rule A
cors_rule
block as defined below.- create
Mode String The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity StringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic BooleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free BooleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple BooleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- endpoint String
The endpoint used to connect to the CosmosDB account.
- geo
Locations List<AccountGeo Location> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- identity
Account
Identity An
identity
block as defined below.- ip
Range StringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual BooleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault StringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind String
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication BooleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server StringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl BooleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl List<String>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- offer
Type String Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- primary
Key String The Primary key for the CosmosDB Account.
- primary
Readonly StringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly StringSql Connection String - primary
Sql StringConnection String - public
Network BooleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- read
Endpoints List<String> A list of read endpoints available for this CosmosDB account.
- resource
Group StringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- secondary
Key String The Secondary key for the CosmosDB Account.
- secondary
Readonly StringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly StringSql Connection String - secondary
Sql StringConnection String - Map<String,String>
A mapping of tags to assign to the resource.
- virtual
Network List<AccountRules Virtual Network Rule> Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- write
Endpoints List<String> A list of write endpoints available for this CosmosDB account.
- access
Key booleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage AccountAnalytical Storage An
analytical_storage
block as defined below.- analytical
Storage booleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup A
backup
block as defined below.- capabilities
Account
Capability[] The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity A
capacity
block as defined below.- connection
Strings string[] A list of connection strings available for this CosmosDB account.
- consistency
Policy AccountConsistency Policy Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- cors
Rule AccountCors Rule A
cors_rule
block as defined below.- create
Mode string The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity stringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic booleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free booleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple booleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- endpoint string
The endpoint used to connect to the CosmosDB account.
- geo
Locations AccountGeo Location[] Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- identity
Account
Identity An
identity
block as defined below.- ip
Range stringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual booleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault stringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind string
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication booleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server stringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl booleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl string[]Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- offer
Type string Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- primary
Key string The Primary key for the CosmosDB Account.
- primary
Readonly stringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly stringSql Connection String - primary
Sql stringConnection String - public
Network booleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- read
Endpoints string[] A list of read endpoints available for this CosmosDB account.
- resource
Group stringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
Account
Restore A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- secondary
Key string The Secondary key for the CosmosDB Account.
- secondary
Readonly stringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly stringSql Connection String - secondary
Sql stringConnection String - {[key: string]: string}
A mapping of tags to assign to the resource.
- virtual
Network AccountRules Virtual Network Rule[] Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- write
Endpoints string[] A list of write endpoints available for this CosmosDB account.
- access_
key_ boolmetadata_ writes_ enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical_
storage AccountAnalytical Storage Args An
analytical_storage
block as defined below.- analytical_
storage_ boolenabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup
Account
Backup Args A
backup
block as defined below.- capabilities
Sequence[Account
Capability Args] The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity
Account
Capacity Args A
capacity
block as defined below.- connection_
strings Sequence[str] A list of connection strings available for this CosmosDB account.
- consistency_
policy AccountConsistency Policy Args Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- cors_
rule AccountCors Rule Args A
cors_rule
block as defined below.- create_
mode str The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default_
identity_ strtype The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable_
automatic_ boolfailover Enable automatic failover for this Cosmos DB account.
- enable_
free_ booltier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable_
multiple_ boolwrite_ locations Enable multiple write locations for this Cosmos DB account.
- endpoint str
The endpoint used to connect to the CosmosDB account.
- geo_
locations Sequence[AccountGeo Location Args] Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- identity
Account
Identity Args An
identity
block as defined below.- ip_
range_ strfilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is_
virtual_ boolnetwork_ filter_ enabled Enables virtual network filtering for this Cosmos DB account.
- key_
vault_ strkey_ id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind str
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local_
authentication_ booldisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo_
server_ strversion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name str
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network_
acl_ boolbypass_ for_ azure_ services If Azure services can bypass ACLs. Defaults to
false
.- network_
acl_ Sequence[str]bypass_ ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- offer_
type str Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- primary_
key str The Primary key for the CosmosDB Account.
- primary_
readonly_ strkey The Primary read-only Key for the CosmosDB Account.
- primary_
readonly_ strsql_ connection_ string - primary_
sql_ strconnection_ string - public_
network_ boolaccess_ enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- read_
endpoints Sequence[str] A list of read endpoints available for this CosmosDB account.
- resource_
group_ strname The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
Account
Restore Args A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- secondary_
key str The Secondary key for the CosmosDB Account.
- secondary_
readonly_ strkey The Secondary read-only key for the CosmosDB Account.
- secondary_
readonly_ strsql_ connection_ string - secondary_
sql_ strconnection_ string - Mapping[str, str]
A mapping of tags to assign to the resource.
- virtual_
network_ Sequence[Accountrules Virtual Network Rule Args] Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- write_
endpoints Sequence[str] A list of write endpoints available for this CosmosDB account.
- access
Key BooleanMetadata Writes Enabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to
true
.- analytical
Storage Property Map An
analytical_storage
block as defined below.- analytical
Storage BooleanEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to
false
. Enabling and then disabling analytical storage forces a new resource to be created.- backup Property Map
A
backup
block as defined below.- capabilities List<Property Map>
The capabilities which should be enabled for this Cosmos DB account. Value is a
capabilities
block as defined below.- capacity Property Map
A
capacity
block as defined below.- connection
Strings List<String> A list of connection strings available for this CosmosDB account.
- consistency
Policy Property Map Specifies a
consistency_policy
resource, used to define the consistency policy for this CosmosDB account.- cors
Rule Property Map A
cors_rule
block as defined below.- create
Mode String The creation mode for the CosmosDB Account. Possible values are
Default
andRestore
. Changing this forces a new resource to be created.NOTE:
create_mode
only works whenbackup.type
isContinuous
.- default
Identity StringType The default identity for accessing Key Vault. Possible values are
FirstPartyIdentity
,SystemAssignedIdentity
orUserAssignedIdentity
. Defaults toFirstPartyIdentity
.- enable
Automatic BooleanFailover Enable automatic failover for this Cosmos DB account.
- enable
Free BooleanTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to
false
. Changing this forces a new resource to be created.- enable
Multiple BooleanWrite Locations Enable multiple write locations for this Cosmos DB account.
- endpoint String
The endpoint used to connect to the CosmosDB account.
- geo
Locations List<Property Map> Specifies a
geo_location
resource, used to define where data should be replicated with thefailover_priority
0 specifying the primary location. Value is ageo_location
block as defined below.- identity Property Map
An
identity
block as defined below.- ip
Range StringFilter CosmosDB 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.
NOTE: To enable the "Allow access from the Azure portal" behavior, you should add the IP addresses provided by the documentation to this list.
NOTE: To enable the "Accept connections from within public Azure datacenters" behavior, you should add
0.0.0.0
to the list, see the documentation for more details.- is
Virtual BooleanNetwork Filter Enabled Enables virtual network filtering for this Cosmos DB account.
- key
Vault StringKey Id A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
NOTE: When referencing an
azure.keyvault.Key
resource, useversionless_id
instead ofid
NOTE: In order to use a
Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation- kind String
Specifies the Kind of CosmosDB to create - possible values are
GlobalDocumentDB
,MongoDB
andParse
. Defaults toGlobalDocumentDB
. Changing this forces a new resource to be created.- local
Authentication BooleanDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to
false
. Can be set only when using the SQL API.- location String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- mongo
Server StringVersion The Server Version of a MongoDB account. Possible values are
4.2
,4.0
,3.6
, and3.2
.- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network
Acl BooleanBypass For Azure Services If Azure services can bypass ACLs. Defaults to
false
.- network
Acl List<String>Bypass Ids The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
- offer
Type String Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to
Standard
.- primary
Key String The Primary key for the CosmosDB Account.
- primary
Readonly StringKey The Primary read-only Key for the CosmosDB Account.
- primary
Readonly StringSql Connection String - primary
Sql StringConnection String - public
Network BooleanAccess Enabled Whether or not public network access is allowed for this CosmosDB account. Defaults to
true
.- read
Endpoints List<String> A list of read endpoints available for this CosmosDB account.
- resource
Group StringName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore Property Map
A
restore
block as defined below.NOTE:
restore
should be set whencreate_mode
isRestore
.- secondary
Key String The Secondary key for the CosmosDB Account.
- secondary
Readonly StringKey The Secondary read-only key for the CosmosDB Account.
- secondary
Readonly StringSql Connection String - secondary
Sql StringConnection String - Map<String>
A mapping of tags to assign to the resource.
- virtual
Network List<Property Map>Rules Specifies a
virtual_network_rules
resource, used to define which subnets are allowed to access this CosmosDB account.- write
Endpoints List<String> A list of write endpoints available for this CosmosDB account.
Supporting Types
AccountAnalyticalStorage, AccountAnalyticalStorageArgs
- Schema
Type string The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
- Schema
Type string The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
- schema
Type String The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
- schema
Type string The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
- schema_
type str The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
- schema
Type String The schema type of the Analytical Storage for this Cosmos DB account. Possible values are
FullFidelity
andWellDefined
.
AccountBackup, AccountBackupArgs
- Type string
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- Interval
In intMinutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- Retention
In intHours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- Storage
Redundancy string The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
- Type string
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- Interval
In intMinutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- Retention
In intHours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- Storage
Redundancy string The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
- type String
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- interval
In IntegerMinutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- retention
In IntegerHours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- storage
Redundancy String The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
- type string
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- interval
In numberMinutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- retention
In numberHours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- storage
Redundancy string The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
- type str
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- interval_
in_ intminutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- retention_
in_ inthours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- storage_
redundancy str The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
- type String
The type of the
backup
. Possible values areContinuous
andPeriodic
. Migration ofPeriodic
toContinuous
is one-way, changingContinuous
toPeriodic
forces a new resource to be created.- interval
In NumberMinutes The interval in minutes between two backups. This is configurable only when
type
isPeriodic
. Possible values are between 60 and 1440.- retention
In NumberHours The time in hours that each backup is retained. This is configurable only when
type
isPeriodic
. Possible values are between 8 and 720.- storage
Redundancy String The storage redundancy is used to indicate the type of backup residency. This is configurable only when
type
isPeriodic
. Possible values areGeo
,Local
andZone
.
AccountCapability, AccountCapabilityArgs
- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name string
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name str
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name String
Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
AccountCapacity, AccountCapacityArgs
- Total
Throughput intLimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
- Total
Throughput intLimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
- total
Throughput IntegerLimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
- total
Throughput numberLimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
- total_
throughput_ intlimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
- total
Throughput NumberLimit The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least
-1
.-1
means no limit.
AccountConsistencyPolicy, AccountConsistencyPolicyArgs
- Consistency
Level string The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- Max
Interval intIn Seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- Max
Staleness intPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
- Consistency
Level string The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- Max
Interval intIn Seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- Max
Staleness intPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
- consistency
Level String The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- max
Interval IntegerIn Seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- max
Staleness IntegerPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
- consistency
Level string The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- max
Interval numberIn Seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- max
Staleness numberPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
- consistency_
level str The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- max_
interval_ intin_ seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- max_
staleness_ intprefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
- consistency
Level String The Consistency Level to use for this CosmosDB Account - can be either
BoundedStaleness
,Eventual
,Session
,Strong
orConsistentPrefix
.- max
Interval NumberIn Seconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is
5
-86400
(1 day). Defaults to5
. Required whenconsistency_level
is set toBoundedStaleness
.- max
Staleness NumberPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is
10
–2147483647
. Defaults to100
. Required whenconsistency_level
is set toBoundedStaleness
.Note:
max_interval_in_seconds
andmax_staleness_prefix
can only be set to custom values whenconsistency_level
is set toBoundedStaleness
- otherwise they will return the default values shown above.
AccountCorsRule, AccountCorsRuleArgs
- Allowed
Headers List<string> A list of headers that are allowed to be a part of the cross-origin request.
- Allowed
Methods List<string> A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- Allowed
Origins List<string> A list of origin domains that will be allowed by CORS.
- Exposed
Headers List<string> A list of response headers that are exposed to CORS clients.
- Max
Age intIn Seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
- Allowed
Headers []string A list of headers that are allowed to be a part of the cross-origin request.
- Allowed
Methods []string A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- Allowed
Origins []string A list of origin domains that will be allowed by CORS.
- Exposed
Headers []string A list of response headers that are exposed to CORS clients.
- Max
Age intIn Seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
- allowed
Headers List<String> A list of headers that are allowed to be a part of the cross-origin request.
- allowed
Methods List<String> A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- allowed
Origins List<String> A list of origin domains that will be allowed by CORS.
- exposed
Headers List<String> A list of response headers that are exposed to CORS clients.
- max
Age IntegerIn Seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
- allowed
Headers string[] A list of headers that are allowed to be a part of the cross-origin request.
- allowed
Methods string[] A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- allowed
Origins string[] A list of origin domains that will be allowed by CORS.
- exposed
Headers string[] A list of response headers that are exposed to CORS clients.
- max
Age numberIn Seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
- allowed_
headers Sequence[str] A list of headers that are allowed to be a part of the cross-origin request.
- allowed_
methods Sequence[str] A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- allowed_
origins Sequence[str] A list of origin domains that will be allowed by CORS.
- exposed_
headers Sequence[str] A list of response headers that are exposed to CORS clients.
- max_
age_ intin_ seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
- allowed
Headers List<String> A list of headers that are allowed to be a part of the cross-origin request.
- allowed
Methods List<String> A list of HTTP headers that are allowed to be executed by the origin. Valid options are
DELETE
,GET
,HEAD
,MERGE
,POST
,OPTIONS
,PUT
orPATCH
.- allowed
Origins List<String> A list of origin domains that will be allowed by CORS.
- exposed
Headers List<String> A list of response headers that are exposed to CORS clients.
- max
Age NumberIn Seconds The number of seconds the client should cache a preflight response. Possible values are between
1
and2147483647
.
AccountGeoLocation, AccountGeoLocationArgs
- Failover
Priority int The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- Location string
The name of the Azure region to host replicated data.
- Id string
The ID of the virtual network subnet.
- Zone
Redundant bool Should zone redundancy be enabled for this region? Defaults to
false
.
- Failover
Priority int The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- Location string
The name of the Azure region to host replicated data.
- Id string
The ID of the virtual network subnet.
- Zone
Redundant bool Should zone redundancy be enabled for this region? Defaults to
false
.
- failover
Priority Integer The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- location String
The name of the Azure region to host replicated data.
- id String
The ID of the virtual network subnet.
- zone
Redundant Boolean Should zone redundancy be enabled for this region? Defaults to
false
.
- failover
Priority number The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- location string
The name of the Azure region to host replicated data.
- id string
The ID of the virtual network subnet.
- zone
Redundant boolean Should zone redundancy be enabled for this region? Defaults to
false
.
- failover_
priority int The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- location str
The name of the Azure region to host replicated data.
- id str
The ID of the virtual network subnet.
- zone_
redundant bool Should zone redundancy be enabled for this region? Defaults to
false
.
- failover
Priority Number The failover priority of the region. A failover priority of
0
indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0
.- location String
The name of the Azure region to host replicated data.
- id String
The ID of the virtual network subnet.
- zone
Redundant Boolean Should zone redundancy be enabled for this region? Defaults to
false
.
AccountIdentity, AccountIdentityArgs
- Type string
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- Identity
Ids List<string> Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- Principal
Id string The Principal ID associated with this Managed Service Identity.
- Tenant
Id string The Tenant ID associated with this Managed Service Identity.
- Type string
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- Identity
Ids []string Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- Principal
Id string The Principal ID associated with this Managed Service Identity.
- Tenant
Id string The Tenant ID associated with this Managed Service Identity.
- type String
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- identity
Ids List<String> Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principal
Id String The Principal ID associated with this Managed Service Identity.
- tenant
Id String The Tenant ID associated with this Managed Service Identity.
- type string
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- identity
Ids string[] Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principal
Id string The Principal ID associated with this Managed Service Identity.
- tenant
Id string The Tenant ID associated with this Managed Service Identity.
- type str
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- identity_
ids Sequence[str] Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principal_
id str The Principal ID associated with this Managed Service Identity.
- tenant_
id str The Tenant ID associated with this Managed Service Identity.
- type String
The Type of Managed Identity assigned to this Cosmos account. Possible values are
SystemAssigned
,UserAssigned
andSystemAssigned, UserAssigned
.- identity
Ids List<String> Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principal
Id String The Principal ID associated with this Managed Service Identity.
- tenant
Id String The Tenant ID associated with this Managed Service Identity.
AccountRestore, AccountRestoreArgs
- Restore
Timestamp stringIn Utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- Source
Cosmosdb stringAccount Id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- Databases
List<Account
Restore Database> A
database
block as defined below. Changing this forces a new resource to be created.
- Restore
Timestamp stringIn Utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- Source
Cosmosdb stringAccount Id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- Databases
[]Account
Restore Database A
database
block as defined below. Changing this forces a new resource to be created.
- restore
Timestamp StringIn Utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- source
Cosmosdb StringAccount Id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- databases
List<Account
Restore Database> A
database
block as defined below. Changing this forces a new resource to be created.
- restore
Timestamp stringIn Utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- source
Cosmosdb stringAccount Id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- databases
Account
Restore Database[] A
database
block as defined below. Changing this forces a new resource to be created.
- restore_
timestamp_ strin_ utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- source_
cosmosdb_ straccount_ id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- databases
Sequence[Account
Restore Database] A
database
block as defined below. Changing this forces a new resource to be created.
- restore
Timestamp StringIn Utc The creation time of the database or the collection (Datetime Format
RFC 3339
). Changing this forces a new resource to be created.- source
Cosmosdb StringAccount Id The resource ID of the restorable database account from which the restore has to be initiated. The example is
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
. Changing this forces a new resource to be created.NOTE: Any database account with
Continuous
type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved byazure.cosmosdb.getRestorableDatabaseAccounts
.- databases List<Property Map>
A
database
block as defined below. Changing this forces a new resource to be created.
AccountRestoreDatabase, AccountRestoreDatabaseArgs
- Name string
The database name for the restore request. Changing this forces a new resource to be created.
- Collection
Names List<string> A list of the collection names for the restore request. Changing this forces a new resource to be created.
- Name string
The database name for the restore request. Changing this forces a new resource to be created.
- Collection
Names []string A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name String
The database name for the restore request. Changing this forces a new resource to be created.
- collection
Names List<String> A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name string
The database name for the restore request. Changing this forces a new resource to be created.
- collection
Names string[] A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name str
The database name for the restore request. Changing this forces a new resource to be created.
- collection_
names Sequence[str] A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name String
The database name for the restore request. Changing this forces a new resource to be created.
- collection
Names List<String> A list of the collection names for the restore request. Changing this forces a new resource to be created.
AccountVirtualNetworkRule, AccountVirtualNetworkRuleArgs
- Id string
The ID of the virtual network subnet.
- Ignore
Missing boolVnet Service Endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
- Id string
The ID of the virtual network subnet.
- Ignore
Missing boolVnet Service Endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
- id String
The ID of the virtual network subnet.
- ignore
Missing BooleanVnet Service Endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
- id string
The ID of the virtual network subnet.
- ignore
Missing booleanVnet Service Endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
- id str
The ID of the virtual network subnet.
- ignore_
missing_ boolvnet_ service_ endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
- id String
The ID of the virtual network subnet.
- ignore
Missing BooleanVnet Service Endpoint If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to
false
.
Import
CosmosDB Accounts can be imported using the resource id
, e.g.
$ pulumi import azure:cosmosdb/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.