Completes following:
- Creates SQL Server.
- Creates databases.
-
Configures firewall (for postgres mariaDB mysql) - Enable log analytics (Optional)
This command forms part of the PaaS Building Block.
Parameters
-SettingsFile
Required. (String) File path for the settings file to be converted into a settings object.
-SettingsObject
Required. (Object) Object containing the configuration values required to run this cmdlet.
-TagSettingsFile
Required. (String) File path for the tag settings file to be converted into a tag settings object.
-WhatIf
(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.
-Confirm
(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.
Usage
Example 1
1
New-CmAzPaasSql -SettingsFile ./sql.yml
Example 2
1
New-CmAzPaasSql -SettingsObject $settings
Settings
Beta documentation
The following schema documentation is automatically generated as part of a recent roadmap task. There may be inaccuracies or incomplete information while we flush out bugs; please refer to the packed project settings examples where necessary.Settings Root.
- Component
-
Value to determine what cmdlet should be dynamically loaded for these settings.
- Location
-
Deployment location for all resources.
- Service
-
Contains dependency and publish details for service location.
- Dependencies
-
Contains dependency details for service location.
- ResourceGroup
-
Dependency value to fetch existing resource type.
- Workpace
-
Dependency value to fetch existing resource type.
- Keyvault
-
Global overriding dependency value to fetch existing resource type.
- Publish
-
Global default value to publish on deployed resource type.
- Server
-
Global default value to publish on deployed resource type.
- Database
-
Global default value to publish on deployed resource type.
- ElasticPool
-
Global default value to publish on deployed resource type.
- LogRetentionPeriodInDays
-
Retention in days for SQLSecurityAuditEvents in an existing workspace.
Default:
30
- SqlConfig
-
Container of details required to deploy servers, databases and/or other associated resources.
- Family
-
The database product to use.
Valid values:
"azureSql" , "postgressql" , "mariaDb" , "mySql"
- Type
-
The type of db instance to use.
Default:
Valid values:
"single" , "elasticPool" , "managed" , "" , ""
- ServerName
-
Becomes part of the generated server's name, if no db is defined, one db is created with this value as part of the db's generated name.
- ElasticPoolName
-
Becomes part of the generated elastic pool's name
- Service
-
Contains dependency and publish details for service location.
- Publish
-
Contains publish details for service location.
- Server
-
Local overriding value to publish on deployed existing resource type.
- ElasticPool
-
Local overriding value to publish on deployed existing resource type.
- Dependencies
-
Contains dependency details for service location.
- Keyvault
-
Local overriding dependency value to fetch existing resource type.
- Version
-
An explanation about purpose of this instance.
- Databases
-
List of details required to deploy all databases.
- AdministratorLogin
-
Administrator username.
- PasswordSecretName
-
Name of secret in an existing key vault which represents the administrator password.
- Sku
-
Sku details container.
- Name
-
The sku name.
- Capacity
-
The sku capacity.
- FirewallRules
-
List of ip ranges required to deploy all firewall rules.
- StartIpAddress
-
Minimum ip address value in range. Must follow ipv4 format.
Default:
0.0.0.0
- EndIpAddress
-
Maximum ip address value in range. Must follow ipv4 format.
Default:
255.255.255.255
Examples
The following example files are automatically generated from the settings file schema definition to show how the specification can be used in practise. Cloudmarque can accept both JSON and YAML parameter files.
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
{
"component": "string",
"location": "string",
"service": {
"dependencies": {
"resourceGroup": "string",
"workpace": "string",
"keyvault": "string"
},
"publish": {
"server": "string",
"database": "string",
"elasticPool": "string"
}
},
"logRetentionPeriodInDays": "30",
"sqlConfig": [
{
"family": "azureSql",
"type": "single",
"serverName": "string",
"elasticPoolName": "string",
"service": {
"publish": {
"server": "string",
"elasticPool": "string"
},
"dependencies": {
"keyvault": "string"
}
},
"version": "string",
"databases": [
],
"administratorLogin": "string",
"passwordsecretName": "string",
"sku": {
"name": "string",
"capacity": 0
},
"firewallRules": [
{
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
}
]
}
]
}
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
component: "string" # Optional
location: "string" # Mandatory
service: # Mandatory
dependencies: # Mandatory
resourceGroup: "string" # Mandatory
workpace: "string" # Optional
keyvault: "string" # Optional
publish: # Optional
server: "string" # Optional
database: "string" # Optional
elasticPool: "string" # Optional
logRetentionPeriodInDays: "30" # Optional
sqlConfig: # Mandatory
- family: "azureSql" # Mandatory
type: "single" # Optional
serverName: "string" # Mandatory
elasticPoolName: "string" # Optional
service: # Optional
publish: # Optional
server: "string" # Optional
elasticPool: "string" # Optional
dependencies: # Optional
keyvault: "string" # Optional
version: "string" # Optional
databases: # Optional
- administratorLogin: "string" # Mandatory
passwordsecretName: "string" # Mandatory
sku: # Mandatory
name: "string" # Mandatory
capacity: 0 # Mandatory
firewallRules: # Optional
- startIpAddress: "0.0.0.0" # Mandatory
endIpAddress: "255.255.255.255" # Mandatory