Files
container.training/prepare-vms/lib/infra/openstack-tf.sh
Jerome Petazzoni 14679999be Big refactor of deployment script
Add support for OVHcloud, Hetzner; refactor Scaleway support
2020-09-09 19:37:15 +02:00

20 lines
333 B
Bash

infra_start() {
COUNT=$1
cp terraform/*.tf tags/$TAG
(
cd tags/$TAG
terraform init
echo prefix = \"$TAG\" >> terraform.tfvars
echo count = \"$COUNT\" >> terraform.tfvars
terraform apply -auto-approve
terraform output ip_addresses > ips.txt
)
}
infra_stop() {
(
cd tags/$TAG
terraform destroy -auto-approve
)
}