-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quality updates to PostgreSQL docs (#2808)
- Loading branch information
1 parent
6a23145
commit 74d0cf8
Showing
7 changed files
with
386 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
// Bicep documentation examples | ||
|
||
@sys.description('The name of the resource.') | ||
param name string | ||
|
||
@sys.description('The location resources will be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
@sys.description('The login for an administrator.') | ||
param localAdministrator string | ||
|
||
@secure() | ||
@description('A default administrator password.') | ||
param localAdministratorPassword string | ||
|
||
@sys.description('The object GUID for an administrator account.') | ||
param loginObjectId string | ||
|
||
// An example PostgreSQL server. | ||
resource single 'Microsoft.DBforPostgreSQL/servers@2017-12-01' = { | ||
name: name | ||
location: location | ||
properties: { | ||
createMode: 'Default' | ||
administratorLogin: localAdministrator | ||
administratorLoginPassword: localAdministratorPassword | ||
minimalTlsVersion: 'TLS1_2' | ||
sslEnforcement: 'Enabled' | ||
publicNetworkAccess: 'Disabled' | ||
version: '11' | ||
} | ||
} | ||
|
||
// Configure administrators for single server. | ||
resource single_admin 'Microsoft.DBforPostgreSQL/servers/administrators@2017-12-01' = { | ||
parent: single | ||
name: 'activeDirectory' | ||
properties: { | ||
administratorType: 'ActiveDirectory' | ||
login: localAdministrator | ||
sid: loginObjectId | ||
tenantId: tenant().tenantId | ||
} | ||
} | ||
|
||
// An example PostgreSQL using the flexible server model. | ||
resource flexible 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' = { | ||
name: name | ||
location: location | ||
sku: { | ||
name: 'Standard_D2ds_v4' | ||
tier: 'GeneralPurpose' | ||
} | ||
properties: { | ||
createMode: 'Default' | ||
authConfig: { | ||
activeDirectoryAuth: 'Enabled' | ||
passwordAuth: 'Disabled' | ||
tenantId: tenant().tenantId | ||
} | ||
version: '14' | ||
storage: { | ||
storageSizeGB: 32 | ||
} | ||
backup: { | ||
backupRetentionDays: 7 | ||
geoRedundantBackup: 'Enabled' | ||
} | ||
highAvailability: { | ||
mode: 'ZoneRedundant' | ||
} | ||
} | ||
} | ||
|
||
// Configure administrators for a flexible server. | ||
resource flexible_admin 'Microsoft.DBforPostgreSQL/flexibleServers/administrators@2022-12-01' = { | ||
parent: flexible | ||
name: loginObjectId | ||
properties: { | ||
principalType: 'ServicePrincipal' | ||
principalName: localAdministrator | ||
tenantId: tenant().tenantId | ||
} | ||
} |
Oops, something went wrong.