mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 07:01:56 +03:00
7 lines
253 B
Bash
Executable File
7 lines
253 B
Bash
Executable File
#!/bin/bash
|
|
ARTIFACT=`packer build -machine-readable packer-example.json |awk -F, '$0 ~/artifact,0,id/ {print $6}'`
|
|
AMI_ID=`echo $ARTIFACT | cut -d ':' -f2`
|
|
echo 'variable "AMI_ID" { default = "'${AMI_ID}'" }' > amivar.tf
|
|
terraform init
|
|
terraform apply
|