The Composition Over Inheritance Principle python-patterns.guide - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from python-patterns.guide Daily Mail and Mail on Sunday newspapers.
Save 98% off this Complete 2021 Python Expert Super Bundle neowin.net - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from neowin.net Daily Mail and Mail on Sunday newspapers.
Terrascript supports Python 3.6 and later.
Module layout
Python-Terrascript release 0.8.0 changed the location of modules.
Providers, resources and data sources are now all available through just
three modules.
import terrascript
import terrascript.provider # aws, google, .
import terrascript.resource # aws instance, google compute instance, .
import terrascript.data # aws ami, google compute image, .
The legacy layout is still available but should not be used for new projects.
import terrascript
import terrascript.aws # aws
import terrascript.aws.r # aws instance, .
import terrascript.aws.d # aws ami, .
A first example
The following example has been taken from the official Terraform documentation
for the AWS Provider and then converted into a Python script that generates