github_repo_scraped
/
repos
/Azure-azure-sdk-for-python-c89899b
/sdk
/confidentialledger
/test-resources.bicep
param ledgerName string = 'pysdkci-${uniqueString(resourceGroup().id)}' | |
// resourceGroup().name is too long | |
// uniqueString is 13 characters long | |
// https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-string#uniquestring | |
// Prepend a string to easy identification + ledger name must start with a letter. | |
param testApplicationOid string | |
param location string = 'eastus' | |
// Explicitly set a region due to regional restrictions e.g. ACL is not currently available in westus | |
var azureConfidentialLedgerUrl = 'https://${ledgerName}.confidential-ledger.azure.com' | |
resource ledgerName_resource 'Microsoft.ConfidentialLedger/ledgers@2022-05-13' = { | |
name: ledgerName | |
location: location | |
properties: { | |
ledgerType: 'Public' | |
aadBasedSecurityPrincipals: [ | |
{ | |
principalId: testApplicationOid | |
ledgerRoleName: 'Administrator' | |
} | |
] | |
} | |
} | |
output CONFIDENTIALLEDGER_ENDPOINT string = azureConfidentialLedgerUrl | |
output CONFIDENTIALLEDGER_ID string = ledgerName | |