Endpoint Cosmosdb Account Args
Manages an IotHub Cosmos DB Account Endpoint
Note: Endpoints can be defined either directly on the
azure.iot.IoTHub
resource, or using theazurerm_iothub_endpoint_*
resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining aazurerm_iothub_endpoint_*
resource and another endpoint of a different type directly on theazure.iot.IoTHub
resource is not supported.
Example Usage
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleIoTHub:
type: azure:iot:IoTHub
name: example
properties:
name: exampleIothub
resourceGroupName: ${example.name}
location: ${example.location}
sku:
name: B1
capacity: '1'
tags:
purpose: example
exampleAccount:
type: azure:cosmosdb:Account
name: example
properties:
name: cosmosdb-account
location: ${example.location}
resourceGroupName: ${example.name}
offerType: Standard
kind: GlobalDocumentDB
consistencyPolicy:
consistencyLevel: Strong
geoLocations:
- location: ${example.location}
failoverPriority: 0
exampleSqlDatabase:
type: azure:cosmosdb:SqlDatabase
name: example
properties:
name: cosmos-sql-db
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
exampleSqlContainer:
type: azure:cosmosdb:SqlContainer
name: example
properties:
name: example-container
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
databaseName: ${exampleSqlDatabase.name}
partitionKeyPath: /definition/id
exampleEndpointCosmosdbAccount:
type: azure:iot:EndpointCosmosdbAccount
name: example
properties:
name: example
resourceGroupName: ${example.name}
iothubId: ${exampleIoTHub.id}
containerName: ${exampleSqlContainer.name}
databaseName: ${exampleSqlDatabase.name}
endpointUri: ${exampleAccount.endpoint}
primaryKey: ${exampleAccount.primaryKey}
secondaryKey: ${exampleAccount.secondaryKey}
Import
IoTHub Cosmos DB Account Endpoint can be imported using the resource id
, e.g.
$ pulumi import azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount endpoint1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/cosmosDBAccountEndpoint1
Constructors
Properties
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased
and identityBased
. Defaults to keyBased
.
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.
The name of the partition key associated with the Cosmos DB Container.
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
The primary key of the Cosmos DB Account.
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
The secondary key of the Cosmos DB Account.