This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as azure from "@pulumi/azure"; | |
import * as pulumi from "@pulumi/pulumi"; | |
const resourceGroup = new azure.core.ResourceGroup("rg", { location: "westus2" }); | |
const appServicePlan = new azure.appservice.Plan("asp", { | |
resourceGroupName: resourceGroup.name, | |
kind: "App", | |
sku: { | |
tier: "Basic", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"startTime":"2019/09/25 15:33:00","endTime":"2019/09/25 15:33:35","elapsedSeconds":35.1280141,"stackName":"name-timer-d606c64e","testId":"C:\\Users\\theuser\\AppData\\Local\\Temp\\name-timer-d606c64e-106936391","stepName":"yarn-install","commandLine":"C:\\Program Files (x86)\\Yarn\\bin\\yarn.cmd install","testName":"timer","isError":false,"cloudURL":""}{"startTime":"2019/09/25 15:33:35","endTime":"2019/09/25 15:33:36","elapsedSeconds":1.1130774,"stackName":"name-timer-d606c64e","testId":"C:\\Users\\theuser\\AppData\\Local\\Temp\\name-timer-d606c64e-106936391","stepName":"yarn-link","commandLine":"C:\\Program Files (x86)\\Yarn\\bin\\yarn.cmd link @pulumi/azure","testName":"timer","isError":false,"cloudURL":""}{"startTime":"2019/09/25 15:33:36","endTime":"2019/09/25 15:33:38","elapsedSeconds":1.7090328,"stackName":"name-timer-d606c64e","testId":"C:\\Users\\theuser\\AppData\\Local\\Temp\\name-timer-d606c64e-106936391","stepName":"pulumi-stack-init","commandLine":"C:\\Users\\theuser\\.pulumi\\bin\\pulumi.exe sta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as azure from "@pulumi/azure"; | |
import * as eventhub from "@pulumi/azure/eventhub"; | |
const resourceGroup = new azure.core.ResourceGroup("test"); | |
const config = new pulumi.Config(); | |
const workspaceID = config.require("workspaceID"); | |
const workspaceKey = config.require("workspaceKey"); | |
const workspaceKeySecret = config.require("workspaceKeySecret"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "azurerm" { | |
version = "= 1.32.1" | |
} | |
resource "azurerm_resource_group" "rg" { | |
name = "testResourceGroup" | |
location = "westus" | |
} | |
resource "azurerm_storage_account" "atftest" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open Pulumi | |
open Components | |
open Common | |
open Cosmos | |
open FunctionApp | |
module Program = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as aws from "@pulumi/aws"; | |
var s3 = new aws.sdk.S3(); | |
let bucket = new aws.s3.Bucket("maptiles", {}); | |
function downloadS3 (key: string): Promise<string> { | |
return new Promise<string>((resolve, reject) => { | |
var params = { | |
Bucket: bucket.bucket.get(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as aws from "@pulumi/cloud-aws"; | |
// Create a table `urls`, with `name` as primary key. | |
let urlTable = new aws.Table("urls", "name"); | |
// Create a web server. | |
let endpoint = new aws.API("urlshortener"); | |
// Serve all files in the www directory to the root. | |
endpoint.static("/", "www"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const api = new Endpoint("urlapi", { | |
path: "/{proxy+}", | |
lambda: func.lambda | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface LambdaOptions { | |
readonly path: string; | |
readonly file: string; | |
readonly environment?: pulumi.Input<{ | |
[key: string]: pulumi.Input<string>; | |
}>; | |
} | |
export class Lambda extends pulumi.ComponentResource { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Lambda } from "./lambda"; | |
const func = new Lambda("lambda-get", { | |
path: "./app", | |
file: "read", | |
environment: { | |
"COUNTER_TABLE": counterTable.name | |
}, | |
}); |