这些环境变量的值都可以从前面创建 Azure service principal 的过程中获得。方便起见,我们把设置这些环境变量的步骤可以写到脚本文件 azureEnv.sh 中:
#!/bin/sh echo "Setting environment variables for Terraform" export ARM_SUBSCRIPTION_ID=your_subscription_id export ARM_CLIENT_ID=your_appId export ARM_CLIENT_SECRET=your_password export ARM_TENANT_ID=your_tenant_id # Not needed for public, required for usgovernment, german, china export ARM_ENVIRONMENT=public