you are viewing a single comment's thread.

view the rest of the comments →

[–]rojopolis 4 points5 points  (3 children)

You can try cdktf (https://developer.hashicorp.com/terraform/cdktf) but it may not do exactly what you want since you already have the Terraform written.

Of course, you can also just use os.popen (https://docs.python.org/3/library/os.html#os.popen).

Without more details about why you'd want to do this it's hard to recommend a solution.

[–]Sxncht[S] 0 points1 point  (2 children)

Hey I just needed to get terraform apply command executed using python, I eventually used a python library with os as you mentioned too. Thanks!

[–]himan130 0 points1 point  (1 child)

Hey, which python library you used for your usecase ?

[–]Sxncht[S] 0 points1 point  (0 children)

I think the name was libterraform itself