0.0.12 • Published 1 year ago

@azbake/ingredient-cosmosdb v0.0.12

Weekly downloads
3
License
MIT
Repository
-
Last release
1 year ago

Changelogs

Overview

The Cosmosdb ingredient is a plugin for bake. When included in a recipe, this will create an Cosmos db account. This only creates the core account. Individual applications are responsible for creating and maintaining Containers / Databases / Collections.

Usage

name: cosmosdatabase
shortName: cosmosdb
version: 1.0.0
ingredients:
   - "@azbake/ingredient-cosmosdb@~0"
   - "@azbake/ingredient-event-hub-namespace@~0"
rgOverride: "larry-poc"
resourceGroup: true
variables:
  dbResourceName: "[cosmosdbutils.create_resource_name()]"
  capabilities: "[JSON.parse('[{\"name\" : \"EnableServerless\" }]')]"
recipe:
  cosmosdb-create:
    properties:
      type: "@azbake/ingredient-cosmosdb"
      condition: "[coreutils.current_region_primary()]" 
      parameters:
        accountName: "[coreutils.variable('dbResourceName')]"
        primaryRegion: "[coreutils.current_region().name]"
        capabilities : "[coreutils.variable('capabilities')]"
propertyrequireddescription
accountNameyesThe name for the Cosmosdb Account
primaryRegionyesSets the region.
secondaryRegionNoSets the region.
capabilitiesnoAllows for Serverless mode, using [JSON.parse('{\"name\" : \"EnableServerless\" }')]". Also used for creating Mongo/Cassandra see https://github.com/Azure/azure-quickstart-templates/blob/master/101-cosmosdb-create-multi-region-account/azuredeploy.json or API Reference

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

cosmosdbutils class

functiondescription
create_resource_name()Returns the name created for the Key Vault when deployed

Function Details

create_resource_name()

Gets the name created for the Key Vault when deployed.

...
parameters:
    name: "[cosmosdbutils.create_resource_name()]"
...
Returns

string

0.0.12

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago