-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ps1
109 lines (107 loc) · 6.24 KB
/
config.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
param (
[string]$environment
)
$dev = @{
SQLTier = "Basic";
};
$prod = @{
SQLTier = "Basic";
};
$envParams = if ($environment -eq "dev") { $dev } else { $prod };
return @{
Name = "TestDeployment";
NameFormat = "deploy{name}asdf";
Items = @(
@{ Type = "ResourceGroup"; Name = "test"; Location = "East US"; Resources = @(
@{ Type = "ApiManagement"; Name = "api"; Sku = "Developer"; Organization = "marks test"; AdminEmail = "[email protected]"; EnableCors = $true;
Products = @(@{ ProductName = "Unlimited"; });
Users = @( @{ Email = "[email protected]"; Subscriptions = @("Unlimited"); };
@{ Email = "[email protected]"; Password = "abcXYZ123!@#"; FirstName = "Mark"; LastName = "Candelora"; Subscriptions = @("Unlimited"); }; ); };
@{ Type = "ServiceBus"; Name = "blahsb"; Sku = "standard"; Authrules = @{ abc = "send;listen"; def = "listen" };
Items = @( @{ Type = "servicebustopic"; Name = "topica"; Authrules = @{ topicaccess = "listen"; }; };
@{ Type = "servicebusqueue"; Name = "queuea"; Authrules = @{ queueaccess = "send" }; };
); };
@{ Type = "IotHub"; Name = "iothub"; Sku = "F1"; Units = 1; EnableFallback = $true;
Endpoints = @(
@{ EndPointType = 'Queue'
ConnectionString = '[$this.Resolve("ResourceGroup-test/ServiceBus-blahsb/ServiceBusQueue-queuea").Access["queueaccess"].PrimaryConnectionString]';
Name = 'sbq';
ResourceGroup = '[$this.Resolve("ResourceGroup-test").Name]';
SubscriptionId = '[(Get-AzureRmContext).Subscription.Id]'; };
);
Routes = @(
@{ Condition = '$body.route = "sbq"';
EndpointNames = @('sbq');
IsEnabled = $true;
Name = 'queue-route';
Source = 'DeviceMessages'; };
); };
# @{ Type = "KeyVault"; Name = "vault"; Sku = "Standard"; Secrets = @{ abc = "9n87sdf8b97io" }; };
# @{ Type = "AppServicePlan"; Name = "svcplan2";
# Tier = "Free"; Location = "East US"; AppServices = @(
# @{ Type = "AppService"; Name = "blahA";
# Code = @{
# BuildType = "MSBuild";
# ProjectPath = ".\testingCode\BlahA\BlahA.csproj";
# };
# WebJobs = @(
# @{ Name = "aaa"; JobType = "triggered"; BuildType = "MSBuild"; ProjectPath = ".\testingCode\BlahB\BlahB.csproj"; }
# );
# AppSettings = @{
# "bbb" = '[$this.resolve("ResourceGroup-test/StorageAccount-store/BlobContainer-test").CreateSasToken(999)]';
# };
# ApiManagement = '[$this.AddApiMgmtApi("api", "blaha", "blaha", "/swagger/blaha/swagger.json")]';
# };
# @{ Type = "AppService"; Name = "blahB";
# AppSettings = @{
# "abc" = '[$this.GetKeyVaultSecret("abc").SecretValueText]';
# "random" = '[$this.RandomString()]';
# };
# ConnectionStrings = @{
# #"connStr" = "[$this.resolve('ResourceGroup-test/Custom-sample1').Result]";
# }
# };
# @{ Type = "FunctionApp"; Name = "blahC"
# Code = @{
# BuildType = "MSBuild";
# ProjectPath = ".\testingCode\BlahC\BlahC.csproj";
# };
# StorageAccount = '[$this.Resolve("ResourceGroup-test/StorageAccount-store").GetConnectionString()]'
# AppSettings = @{
# "bbb" = '[$this.resolve("ResourceGroup-test/StorageAccount-store/BlobContainer-test").Url.ToString()]';
# };
# ConnectionStrings = @{
# "store" = @{ Value = '[$this.Resolve("ResourceGroup-test/StorageAccount-store").GetConnectionString()]'; Type = "Custom" };
# }
# }
# )
# };
# @{ Type = "StorageAccount"; Name = "store"; SkuName = "Standard_LRS"; Kind = "Storage";
# BlobContainers = @(
# @{ Type = "BlobContainer"; Name = "test";
# Blobs = @(
# @{ Type = "Blob"; Name = "config.ps1"; BlobPath = ".\modules" }
# )
# };
# @{ Type = "BlobContainer"; Name = "telemetry"; };
# @{ Type = "BlobContainer"; Name = "referencedata"; };
# )
# };
# @{ Type = "StreamAnalytics"; Name = "stream"; Sku = "Standard";
# ProjectPath = ".\testingCode\BlahD\BlahD.asaproj";
# Depends = @(
# '[$this.resolve("ResourceGroup-test/StorageAccount-store/BlobContainer-telemetry")]';
# '[$this.resolve("ResourceGroup-test/StorageAccount-store/BlobContainer-referencedata")]';
# '[$this.resolve("ResourceGroup-test/IotHub-iothub")]';
# ); };
# @{ Type = "SqlServer"; Name = "blah"; AdminUserName = "sqlAdmin"; AdminPassword = "[$this.resolve("ResourceGroup-test/KeyVault-vault").AddSecret("blah-admin-pwd", $this.RandomString())]";
# Databases = @(
# @{ Type = "SqlDatabase"; Name = "blaha"; Tier = $envParams.SQLTier; MaxGigs = 2;
# Code = @{ ProjectPath = ".\testingCode\BlahE\BlahE.sqlproj";
# BlockOnPossibleDataLoss = $false;
# DropObjectsNotInSource = $true;
# }; };
# ); };
)};
);
};