我正在關注使用 Terraform 在 GCP 中部署 Debian Linux VM 實體的博客,其中它使用metadata_startup_script引導腳本來安裝/配置包。
我在 Azure 而不是 GCP 中關注,并得到:
An argument named "metadata_startup_script" is not expected here.
metadata_startup_script GCP提供程式是特定的嗎?terraform Azure提供程式中的相應機制是什么?例如,執行以下操作,
sudo apt-get update;
sudo apt-get install -y apache2;
sudo systemctl start apache2;
sudo systemctl enable apache2;
引導提供的 Linux VM?
uj5u.com熱心網友回復:
metadata_startup_scriptAzure VM 上不存在該屬性,其相似之處是user_data[1]。
參考資料: https ://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine#user_data
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/492654.html
