Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Cosmos App example #745

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix
  • Loading branch information
mikhailshilkov committed Jul 13, 2020
commit 6d1b31c9ce3fe3c8ee69b5edb2a3f1f1c81031d3
14 changes: 11 additions & 3 deletions azure-ts-cosmosapp-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ Document 'cosmos' not found

Go to the Azure portal and add a document with the ID "cosmos" to receive a non-empty response.

Unit testing:
## Running Unit Tests

The `unittests.ts` file contains two sample unit tests that can be run with Mocha:

```
mocha -r ts-node/register unittests.ts
```

Policy:
## Running Policy Pack

pulumi up --policy-pack policy
The `policy` folder contains two sample policies that can be applied with the `policy-pack` argument:

```
pulumi up --policy-pack policy
```
8 changes: 4 additions & 4 deletions azure-ts-cosmosapp-component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import * as pulumi from "@pulumi/pulumi";

// Cosmos App with Azure Container Instances
// import { aci } from "./aci";
// export const aciEndpoint = pulumi.interpolate`${aci.endpoint}/cosmos`;
import { aci } from "./aci";
export const aciEndpoint = pulumi.interpolate`${aci.endpoint}/cosmos`;

// Cosmos App with Azure Functions
import { functions } from "./functionApp";
export const functionsEndpoint = pulumi.interpolate`${functions.endpoint}/api/cosmos`;

// Cosmos App with Azure VM Scale Sets
// import { vmss } from "./vms";
// export const vmssEndpoint = pulumi.interpolate`${vmss.endpoint}/cosmos`;
import { vmss } from "./vms";
export const vmssEndpoint = pulumi.interpolate`${vmss.endpoint}/cosmos`;
2 changes: 1 addition & 1 deletion azure-ts-cosmosapp-component/policy/PulumiPolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
description: PaC-based integration tests to validate an AWS EKS cluster.
description: PaC-based integration tests to validate an Azure Cosmos DB deployments.
runtime: nodejs