如何解决为 AAD PostgreSQL 设置管理员
二头肌版本
Bicep CLI 版本 0.3.255 (589f037)
描述错误
我正在尝试通过 Bicep 为 PostgreSQL 服务器设置 Active Directory 管理员。我能够创建 PostgreSQL 服务器,但没有关于类型的文档,例如 resource postgresqlActiveDirectoryAdmin 'Microsoft.DBforPostgreSQL/servers/administrators@2017-12-01'
。
所以我决定导出一个手动设置了admin的资源的ARM模板,反编译成二头肌模板。
抛出的错误是一个错误请求:
{
"status": "Failed","error": {
"code": "InvalidResourceIdSegment","message": "The 'parameters.properties' segment in the url is invalid.","details": [
{
"code": "InvalidResourceIdSegment","target": "parameters.properties","message": ""
}
]
}
}
复制 只需在 Bicep 中创建 PostgreSQL 服务器并尝试添加管理员,例如:
resource postgreSQL 'Microsoft.DBforPostgreSQL/servers@2017-12-01' = {
name: serverName
identity: {
type: 'SystemAssigned'
}
sku: {
name: 'B_Gen5_1'
tier: 'Basic'
capacity: 1
family: 'Gen5'
}
properties: {
version: '11'
sslEnforcement: 'Enabled'
minimalTlsVersion: 'TLSEnforcementDisabled'
infrastructureEncryption: 'Disabled'
publicNetworkAccess: 'Enabled'
storageProfile: {
backupRetentionDays: 7
geoRedundantBackup: 'Disabled'
storageMB: 5120
storageAutogrow: 'Disabled'
}
createMode: 'Default'
administratorLogin: 'adminName'
administratorLoginPassword: 's3cur3p455w0rd!'
}
location: 'uksouth'
tags: {}
//resources: []
}
resource postgresqlActiveDirectoryAdmin 'Microsoft.DBforPostgreSQL/servers/administrators@2017-12-01' = {
parent: postgreSQL
name: 'activeDirectory'
properties: {
administratorType: 'ActiveDirectory'
login: 'PostgresAdmin' //This is a Group in the Azure Directory
sid: 'xxxxxxx' //grab SID(object id) of the group
tenantId: 'xxxx' //tenant id
}
}
文档中没有真正提到,所以只是依靠一些关于目前是否可行的知识?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。