Azure Cosmos DB, an API Connection, and a Logic App
I want to use the Pulumi Azure Native package (azure-native) in my project.
## Provider details
- Package: azure-native
- Version: v3.19.0
- Publisher: Pulumi
- Source: pulumi
- Repository: https://github.com/pulumi/pulumi-azure-native
## Documentation
The Pulumi Cloud Registry API serves canonical, up-to-date docs for this package — including private packages and every published version. Send the "Accept: text/markdown" header for clean readable content, or "application/json" for structured data.
Start at the navigation tree, which cross-links to the readme, installation guide, and per-resource docs URL template:
- https://api.pulumi.com/api/registry/packages/pulumi/pulumi/azure-native/versions/latest/nav
Returns a summary by default. The full tree can be hundreds of kB for large providers, so prefer targeted search: append "?q=<query>&depth=full" to filter by resource/function title or token (for example "?q=bucket&depth=full"). Only request the full nav without a query if you actually need to enumerate every resource.
Other endpoints:
- Overview and getting started: https://api.pulumi.com/api/registry/packages/pulumi/pulumi/azure-native/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/pulumi/azure-native/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/pulumi/azure-native/versions/latest/docs/{token}?lang={lang}
Replace {token} with the percent-encoded token from the nav response (for example aws:s3/bucket:Bucket).
Replace {lang} with typescript, python, go, csharp, java, or yaml.
Fetch the installation endpoint above for the correct setup steps — install instructions vary between native providers, bridged Terraform providers, and component packages.
Help me get started using this provider. Show me a complete Pulumi program that provisions a common resource, including all necessary configuration and imports.
With the native Azure provider we can directly use the Azure resource manager API to define API connections and linking it to a logic app. The resulting experience is much faster in comparison to performing the same operation through ARM templates.
Set the required configuration variables for this program, and log into Azure:
$ pulumi config set azure-native:location westeurope
$ az login
Perform the deployment:
$ pulumi up
Type Name Status
+ pulumi:pulumi:Stack azure-cosmosdb-logicapp-dev created
+ ├─ azure-native:resources:ResourceGroup logicappdemo-rg created
+ ├─ azure-native:storage:StorageAccount logicappdemosa created
+ ├─ azure-native:documentdb:DatabaseAccount logicappdemo-cdb created
+ ├─ azure-native:documentdb:SqlResourceSqlDatabase db created
+ ├─ azure-native:web:Connection cosmosdbConnection created
+ ├─ azure-native:documentdb:SqlResourceSqlContainer container created
+ └─ azure-native:logic:Workflow workflow created
Resources:
+ 8 created
Duration: 3m16s
At this point, you have a Cosmos DB collection and a Logic App listening to HTTP requests. You can trigger the Logic App with a curl command: