EndpointCosmosdbAccount

class EndpointCosmosdbAccount : KotlinCustomResource

Manages an IotHub Cosmos DB Account Endpoint

Note: Endpoints can be defined either directly on the azure.iot.IoTHub resource, or using the azurerm_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 a azurerm_iothub_endpoint_* resource and another endpoint of a different type directly on the azure.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

Properties

Link copied to clipboard

The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.

Link copied to clipboard
val containerName: Output<String>

The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.

Link copied to clipboard
val databaseName: Output<String>

The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.

Link copied to clipboard
val endpointUri: Output<String>

The URI of the Cosmos DB Account. Changing this forces a new resource to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val identityId: Output<String>?

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

Link copied to clipboard
val iothubId: Output<String>

The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.

Link copied to clipboard
val partitionKeyName: Output<String>?

The name of the partition key associated with the Cosmos DB Container.

Link copied to clipboard

The template for generating a synthetic partition key value for use within the Cosmos DB Container.

Link copied to clipboard
val primaryKey: Output<String>?

The primary key of the Cosmos DB Account.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.

Link copied to clipboard
val secondaryKey: Output<String>?

The secondary key of the Cosmos DB Account.

Link copied to clipboard
val urn: Output<String>