有沒有辦法在 Azure 訂閱中定義一個策略,該策略將阻止創建任何成本高于一定金額的虛擬機?我曾嘗試定義將單個 SKU 列入白名單或黑名單的策略,但至少可以說,維護起來很乏味。
uj5u.com熱心網友回復:
Is there a way to define a policy in an Azure subscription that will block the creation of any virtual machine with a cost above a certain amount?
在 Azure Policy 中,有幾個默認可用的內置策略。例如:
- 允許的存盤帳戶 SKU
- 允許的資源型別
- 允許的位置
- 允許的虛擬機 SKU
- 為資源添加標簽
- 不允許的資源型別
以下是針對 VM 的推薦策略:

您可以創建自定義策略定義,允許定義自己的 Azure 使用規則,如下所示:
Example:
Each storage account must be enabled for HTTPS
Each storage account must be disabled for HTTP.
有關創建自定義策略的更多資訊,請參閱此鏈接。
但是沒有辦法在 Azure 訂閱中定義一個策略來阻止創建任何成本超過一定金額的虛擬機。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/452533.html
