Infrastructure as a Code (IaC) 工作坊
Ref: https://github.com/cloud-native-taiwan/coscup-2024-workshop
COSCUP 2024: https://coscup.org/2024/zh-TW/
- Install OpenTofu
https://opentofu.org/docs/intro/install/
- Prepare
.tf
- main.tf
- variables.tf
- default.tfvars
-
Download
openrc.sh
from OpenStack UI and execute. The environment variables will be setup. -
Init
tofu init
- Create resources
tofu apply --var-file="default.tfvars"
- Destroy resources
tofu destroy --var-file="default.tfvars"