Closed dragan1979 closed 6 years ago
I tested it in terraform syntax and it works,but python script have no output, it's just stuck, hen click enter, script exists but instance is not created.
Terraform v0.11.3 Python 3.6.4 CentOS7 uname -a 3.10.0-693.11.6.el7.x86_64
pip install python-terraform
script:
from python_terraform import * tf = Terraform() tf.apply('/home/ja/terraform-course/demo-3', no_color=IsFlagged, refresh=False, var={'AWS_ACCESS_KEY':'access key', 'AWS_SECRET_KEY':'secretkey'})
chmod +x script.py ./script.py
Found it in closed issues :) needed to add print command to see output and auto-confirm
so these lines solved the issue: approve = {"auto-approve": True} print(tf.plan()) print(tf.apply(**approve))'
approve = {"auto-approve": True} print(tf.plan()) print(tf.apply(**approve))'
I tested it in terraform syntax and it works,but python script have no output, it's just stuck, hen click enter, script exists but instance is not created.
Terraform v0.11.3 Python 3.6.4 CentOS7 uname -a 3.10.0-693.11.6.el7.x86_64
pip install python-terraform
script:
!/bin/python
from python_terraform import * tf = Terraform() tf.apply('/home/ja/terraform-course/demo-3', no_color=IsFlagged, refresh=False, var={'AWS_ACCESS_KEY':'access key', 'AWS_SECRET_KEY':'secretkey'})
chmod +x script.py ./script.py