Skip to content

Commit

Permalink
Updated deprecated modules and changed attributes (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
JyrkiHei committed Jun 29, 2020
1 parent 3ba6c9a commit 43b8160
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions azure-ts-serverless-url-shortener-global/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ const collection = new azure.cosmosdb.SqlContainer("Urls", {
});

// Traffic Manager as a global HTTP endpoint
const profile = new azure.trafficmanager.Profile("UrlShortEndpoint", {
const profile = new azure.network.TrafficManagerProfile("UrlShortEndpoint", {
resourceGroupName: resourceGroup.name,
trafficRoutingMethod: "Performance",
dnsConfigs: [{
dnsConfig: {
// Subdomain must be globally unique, so we default it with the full resource group name
relativeName: resourceGroup.name,
ttl: 60,
}],
monitorConfigs: [{
},
monitorConfig: {
protocol: "HTTP",
port: 80,
path: "/api/ping",
}],
},
});

// Azure Function to accept new URL shortcodes and save to Cosmos DB
Expand Down Expand Up @@ -114,7 +114,7 @@ for (const location of locations) {
const app = fn.functionApp;

// An endpoint per region for Traffic Manager, link to the corresponding Function App
const endpoint = new azure.trafficmanager.Endpoint(`tme${location}`, {
const endpoint = new azure.network.TrafficManagerEndpoint(`tme${location}`, {
resourceGroupName: resourceGroup.name,
profileName: profile.name,
type: "azureEndpoints",
Expand Down

0 comments on commit 43b8160

Please sign in to comment.