Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Terraobject package to share variables between terrascript components

Project description


Terraobject package to share variables between terrascript components

You can use the Terraobject to parameter to several classes and share resources to be used by other terraform resources.


# Create the reference
from terraobject import Terraobject

# Import the terrascript resources you need
from terrascript import provider
from terrascript.digitalocean.d import digitalocean_volume

# Create the object
o = Terraobject()

# Add the providers, resources, data, as usual
o.terrascript.add(provider("digitalocean", token="tokentoken"))

# Get some info (e.g. data) and share to be used on other commands
persistent_volume = digitalocean_volume("persistent_volume", name="volume-nyc3-01", region="abc")
o.shared['persistent_volume'] = persistent_volume

# And you can use and another place:

# Dump the XML

More information about terrascript:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for terraobject, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size terraobject-0.0.1-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size terraobject-0.0.1.tar.gz (1.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page