Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kolosovpetro/azure-windows-vm-terraform
Automation of azure VM initial state via custom script extensions and Terraform
https://github.com/kolosovpetro/azure-windows-vm-terraform
azure azure-vm custom-script-extension terraform
Last synced: 26 days ago
JSON representation
Automation of azure VM initial state via custom script extensions and Terraform
- Host: GitHub
- URL: https://github.com/kolosovpetro/azure-windows-vm-terraform
- Owner: kolosovpetro
- License: gpl-3.0
- Created: 2023-03-22T09:31:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-28T19:04:35.000Z (about 1 year ago)
- Last Synced: 2023-09-28T22:31:24.893Z (about 1 year ago)
- Topics: azure, azure-vm, custom-script-extension, terraform
- Language: HCL
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.INFO.md
- License: LICENSE
Awesome Lists containing this project
README
## Terraform commands
- Init examples:
- `terraform init -backend-config="azure.sas.conf"`
- `terraform init -backend-config="azure.sas.conf" -reconfigure`
- Plan examples
- `terraform plan -var "prefix=${prefix}" -out "main.tfplan"`
- `terraform plan -var "prefix=${prefix}" -var "sql_admin_password=$env:MANGO_TF_SQL_PASS" -out "main.tfplan"`
- `terraform plan -var "prefix=${prefix}" -var "os_profile_admin_password=1wSWB2Mbl8918kFvtwac" -out "main.tfplan"`
- `terraform plan -var-file='terraform.dev.tfvars' -var sql_admin_username='razumovsky_r' -var sql_admin_password='Zd2yqLgyV4uHVC0eTPiH' -out 'main.tfplan'`
- `terraform plan -var-file='terraform.dev.tfvars' -out 'dev.tfplan'`
- Apply examples:
- `terraform apply main.tfplan`
- `terraform fmt --check`
- Import examples
- /subscriptions/42f3171c-7f76-4241-8b33-17e610e83143/resourceGroups/rg-vm-linux-l03
- az group show --name rg-vm-linux-l03 --query id --output tsv
- terraform import -var "prefix=${prefix}" azurerm_resource_group.public
/subscriptions/42f3171c-7f76-4241-8b33-17e610e83143/resourceGroups/rg-vm-linux-l03
- Destroy examples:
- `terraform plan -var "sql_admin_password=$env:MANGO_TF_SQL_PASS" -var "prefix=${prefix}" -destroy -out "main.destroy.tfplan"`
- `terraform plan -var "prefix=${prefix}" -destroy -out "main.destroy.tfplan"`
- `terraform apply -destroy -auto-approve "main.destroy.tfplan"`
- Workspace examples:
- `terraform workspace new d01`
- `terraform workspace select d01`## Terraform docs
- `terraform-docs markdown table ./ --output-file README.md`