ryml様、 こんにちは。 ** ** 参照されているQ&Aスレッドにおける「匿名」ユーザーからの回答は古く、根拠も不明瞭です。そのため、導入環境固有の要件に応じて、最も適切かつ不可欠なパラメータを選択することをお勧めします。これらの選択は、ワークロード、パフォーマンス目標、コンプライアンス要件など、環境固有の要因を考慮する必要があります。そのため、直接的な推奨事項を提供することはできません。
japaneast において、Microsoft.DBforMySQL/flexibleServers/databases を含むbicepテンプレートのデプロイが出来ない
お世話になっております。
タイトルに記載の件についてお問い合わせになります。
よろしくお願いいたします。
下記のような「main.bicep」があります。
/*
param
*/
param location string = resourceGroup().location
@description('DBのadminパスワード。')
@secure()
param dbAdministratorLoginPassword string
/*
VNET
*/
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2024-05-01' = {
name: 'myapp-vnet'
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/16'
]
}
}
resource appSubnet 'subnets' = {
name: 'app-subnet'
properties: {
addressPrefix: '10.0.0.0/24'
delegations: [
{
name: 'app-delegation'
properties: {
serviceName: 'Microsoft.Web/serverFarms'
}
}
]
}
}
resource dbSubnet 'subnets' = {
name: 'db-subnet'
properties: {
addressPrefix: '10.0.1.0/24'
delegations: [
{
name: 'mysql-delegation'
properties: {
serviceName: 'Microsoft.DBforMySQL/flexibleServers'
}
}
]
}
}
}
/*
MySQL
*/
resource dbserver 'Microsoft.DBforMySQL/flexibleServers@2021-12-01-preview' = {
location: location
name: 'samplepjname'
sku: {
name: 'Standard_B1ms'
tier: 'Burstable' // Burstable,Generalpurpose,MemoryOptimized
}
properties: {
version: '8.4'
administratorLogin: 'samplepjname'
administratorLoginPassword: dbAdministratorLoginPassword
network: {
delegatedSubnetResourceId: virtualNetwork::dbSubnet.id
}
}
}
resource database 'Microsoft.DBforMySQL/flexibleServers/databases@2021-12-01-preview' = {
parent: dbserver
name: 'myapp-database'
properties: {
charset: 'utf8'
collation: 'utf8_general_ci'
}
}
/*
AppServices
*/
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
name: 'myapp-appserviceplan'
location: location
sku: {
name: 'B1'
}
kind: 'linux'
properties: {
reserved: true
}
}
resource webApp 'Microsoft.Web/sites@2024-11-01' = {
name: uniqueString(resourceGroup().id)
location: location
properties: {
serverFarmId: appServicePlan.id
siteConfig: {
acrUseManagedIdentityCreds: true
linuxFxVersion: 'sitecontainers'
appSettings: [
{
name: 'DB_PASSWORD'
value: dbAdministratorLoginPassword
}
]
ipSecurityRestrictions: [
{
name: 'somewhere'
action: 'Allow'
ipAddress: '123.123.123.123/32'
}
]
}
virtualNetworkSubnetId: virtualNetwork::appSubnet.id
}
identity: {
type: 'SystemAssigned'
}
}
resource webAppSiteContainerMain 'Microsoft.Web/sites/sitecontainers@2024-11-01' = {
parent: webApp
name: 'main'
properties: {
authType: 'SystemIdentity'
image: 'samplepjname.azurecr.io/samplepjname:samplepjname'
isMain: true
targetPort: '8888'
}
}
/*
ACR
*/
resource acrResource 'Microsoft.ContainerRegistry/registries@2023-06-01-preview' existing = {
name: 'samplepjname'
}
resource acrPullRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = {
scope: acrResource
name: '7f951dda-4ed3-4680-a7ca-43fe172d538d' // 秘匿値ではない。https://learn.microsoft.com/ja-jp/azure/role-based-access-control/built-in-roles#containers
}
var webAppPrincipalId = webApp.identity.principalId
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(acrResource.id, webApp.id, acrPullRoleDefinition.id)
scope: acrResource
properties: {
principalId: webAppPrincipalId
roleDefinitionId: acrPullRoleDefinition.id
principalType: 'ServicePrincipal'
}
}
これを「Japan East」にデプロイするため、以下コマンドを試みました。
az group create --name sampleresourcegroup --location "japaneast"
az deployment group create \
--resource-group sampleresourcegroup \
--template-file main.bicep
結果、以下のエラーとなりました。
{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/xxx-xxx-xxx-xxx-xxx/resourceGroups/samplepjname/providers/Microsoft.Resources/deployments/main","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"ResourceDeploymentFailure","target":"/subscriptions/xxx-xxx-xxx-xxx-xxx/resourceGroups/samplepjname/providers/Microsoft.DBforMySQL/flexibleServers/samplepjname","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"ProvisionNotSupportedForRegion","message":"Provisioning in requested region is not supported. Your subscription might not have access to create a server in the selected region. (https://aka.ms/mysqlcapacity)"}]}]}}
エラーに記載されておりますドキュメントより、以下に行きつきました。
Enable region Error message(s):
- Provisioning in the requested region isn't supported. Your subscription might not have access to create a server in the selected region. Resolution: File a support request to gain access to the selected region.
サポート問い合わせで解決できるとのことで、本問い合わせに至ります。
以上、どうぞよろしくお願いいたします。
Azure Database for MySQL
-
VRISHABHANATH PATIL 2,540 評価のポイント Microsoft 外部スタッフ モデレーター
2025-11-17T08:43:06.03+00:00 -
VRISHABHANATH PATIL 2,540 評価のポイント Microsoft 外部スタッフ モデレーター
2025-11-12T05:16:06.1633333+00:00 こんにちは
Microsoft Q&A にご連絡いただきありがとうございます。
説明した動作は、東日本リージョンの容量またはオファーの制限に関連している可能性が最も高いです。特定のリソースの種類では、特定のリージョンで一時的なプロビジョニング制約やクォータ制限が発生することがあります。
サブスクリプションが東日本リージョンでの Azure Database for MySQL フレキシブル サーバーの作成をサポートしていることを確認します。
容量制限により、特定のリージョンでリソースを使用できない場合があります。[Azure の状態] ページで現在の状態を確認するか、使用可能なコンピューティング レベルとストレージ サイズに関するドキュメントを確認します。 https://status.azure.com/ | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-compute-storage
Bicep テンプレートが、「ARM テンプレートを使用して Azure Database for MySQL フレキシブル サーバーを管理する」ガイドで説明されている要件 (特にパラメーターとリソース構成) を満たしていることを確認します。 クイック スタート: Azure Resource Manager を使用してフレキシブル サーバーを作成する - Azure Database for MySQL |Microsoft Learn
クォータ制限により、リソースの作成がブロックされる可能性があります。Azure Database for MySQL のサブスクリプションの制限を確認して、許可範囲内にあることを確認します。 Azure Database for MySQL の要求クォータの増加 - Azure Database for MySQL |Microsoft Learn
-
ryml 0 評価のポイント
2025-11-13T05:59:53.1033333+00:00 ご返答ありがとうございます。
(1)
説明した動作は、東日本リージョンの容量またはオファーの制限に関連している可能性が最も高いです。特定のリソースの種類では、特定のリージョンで一時的なプロビジョニング制約やクォータ制限が発生することがあります。
理解しました。
(2)
容量制限により、特定のリージョンでリソースを使用できない場合があります。[Azure の状態] ページで現在の状態を確認するか、使用可能なコンピューティング レベルとストレージ サイズに関するドキュメントを確認します。 https://status.azure.com/ | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-compute-storage
いずれも問題ないように思えます。
(3)
Bicep テンプレートが、「ARM テンプレートを使用して Azure Database for MySQL フレキシブル サーバーを管理する」ガイドで説明されている要件 (特にパラメーターとリソース構成) を満たしていることを確認します。 クイック スタート: Azure Resource Manager を使用してフレキシブル サーバーを作成する - Azure Database for MySQL |Microsoft Learn
Azureポータル画面上で「Azure Database for MySQL フレキシブル サーバー > 簡易作成」を行なった際にも本件と同じエラーが出ています。
したがって、今回のBicepテンプレートに不備があったとしても無関係と考えます。(4)
クォータ制限により、リソースの作成がブロックされる可能性があります。Azure Database for MySQL のサブスクリプションの制限を確認して、許可範囲内にあることを確認します。 Azure Database for MySQL の要求クォータの増加 - Azure Database for MySQL |Microsoft Learn
以下の画面までは辿り着けました。
今回の場合、「クォータの種類」には何を選択したらよろしいでしょうか。また、選択後に現れる項目(※)に入力すべき値についても、ご教示いただけますと幸いです。
(※)たとえば「リージョン アクセス」を選択すると 「要求された場所」 「予想従量課金(仮想コアの数を入力します。)」 という項目が表れます。
(5)
問題がアクセス許可に関連している場合は、ドキュメントの手順に従って、サブスクリプションのリージョンを有効にします。 https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/region-access
「404 - Page not found」でしたので、判断つきませんでした。
以上
よろしくお願いいたします。