Fixing up the azure-ts-appservice-* examples to not set location in resourceGroup
MODIFY
azure-ts-appservice-docker/README.md
azure-ts-appservice-docker/README.md
@@ -29,6 +29,12 @@ The example shows two scenarios:
$ npm install
```
+1. Set the azure location in which to run the test:
+
+ ```
+ $ pulumi config set azure:location westus2
+ ```
+
1. Run `pulumi up` to preview and deploy changes:
```

MODIFY
azure-ts-appservice/README.md
azure-ts-appservice/README.md
@@ -27,6 +27,12 @@ with App Service.
$ npm install
```
+1. Set the azure location in which to run the test:
+
+ ```
+ $ pulumi config set azure:location westus2
+ ```
+
1. Define SQL Server password (make it complex enough to satisfy Azure policy):
```

MODIFY
azure-ts-appservice/index.ts
azure-ts-appservice/index.ts
@@ -6,9 +6,7 @@ import * as pulumi from "@pulumi/pulumi";
// use first 10 characters of the stackname as prefix for resource names
const prefix = pulumi.getStack().substring(0, 9);
-const resourceGroup = new azure.core.ResourceGroup(`${prefix}-rg`, {
- location: azure.Locations.WestUS2,
- });
+const resourceGroup = new azure.core.ResourceGroup(`${prefix}-rg`);
const resourceGroupArgs = {
resourceGroupName: resourceGroup.name,

MODIFY
azure-ts-arm-template/README.md
azure-ts-arm-template/README.md
@@ -37,6 +37,7 @@ npm install
```bash
$ pulumi config set azure:environment public
+ $ pulumi config set azure:location westus2
$ az login
```

MODIFY
azure-ts-arm-template/index.ts
azure-ts-arm-template/index.ts
@@ -4,7 +4,7 @@ import * as azure from "@pulumi/azure";
import * as pulumi from "@pulumi/pulumi";
// Create a resource group to deploy all ARM template resources into.
-const resourceGroup = new azure.core.ResourceGroup("test", { location: azure.Locations.WestUS });
+const resourceGroup = new azure.core.ResourceGroup("test");
// Create an ARM template deployment using an ordinary JSON ARM template. This could be read from disk, of course.
const armDeployment = new azure.core.TemplateDeployment("test-dep", {

MODIFY
misc/test/examples_test.go
misc/test/examples_test.go
@@ -443,6 +443,7 @@ func TestExamples(t *testing.T) {
Dir: path.Join(cwd, "..", "..", "azure-ts-appservice"),
Config: map[string]string{
"azure:environment": azureEnviron,
+ "azure:location": azureLocation,
"sqlPassword": "2@Password@2",
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
@@ -458,6 +459,7 @@ func TestExamples(t *testing.T) {
Dir: path.Join(cwd, "..", "..", "azure-ts-appservice-docker"),
Config: map[string]string{
"azure:environment": azureEnviron,
+ "azure:location": azureLocation,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, stack.Outputs["getStartedEndpoint"], nil, func(body string) bool {
@@ -469,6 +471,7 @@ func TestExamples(t *testing.T) {
Dir: path.Join(cwd, "..", "..", "azure-ts-arm-template"),
Config: map[string]string{
"azure:environment": azureEnviron,
+ "azure:location": azureLocation,
},
}),
//base.With(integration.ProgramTestOptions{

Fixing up the azure-ts-appservice-* examples to not set location in resourceGroup