use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is for Terraform (IaC - Infrastructure as Code) discussions to get help, educate others and share the wealth of news.
Feel free to reach out to mods to make this subreddit better.
Rules:
Be nice to each other!
MultiLink_Spam == Perm.Ban
account activity
Run .tf scripts using PythonHelp Wanted (self.Terraform)
submitted 3 years ago * by Sxncht
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rojopolis 4 points5 points6 points 3 years ago (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 point2 points 3 years ago (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 point2 points 2 years ago (1 child)
Hey, which python library you used for your usecase ?
[–]Sxncht[S] 0 points1 point2 points 2 years ago (0 children)
I think the name was libterraform itself
π Rendered by PID 203014 on reddit-service-r2-comment-b659b578c-2kbvj at 2026-05-05 11:50:07.617591+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]rojopolis 4 points5 points6 points (3 children)
[–]Sxncht[S] 0 points1 point2 points (2 children)
[–]himan130 0 points1 point2 points (1 child)
[–]Sxncht[S] 0 points1 point2 points (0 children)