Skip to main content

Terraobject package to share variables between terrascript components

Project description

Terraobject

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.

Examples:

# 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.terrascript.add(persistent_volume)
o.shared['persistent_volume'] = persistent_volume

# And you can use and another place:
o.shared['persistent_volume'].name

# Dump the XML
print(o.terrascript.dump())

More information about terrascript:

https://github.com/mjuenema/python-terrascript

Project details


Download files

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

Source Distribution

terraobject-0.0.1.tar.gz (1.2 kB view details)

Uploaded Source

Built Distribution

terraobject-0.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file terraobject-0.0.1.tar.gz.

File metadata

  • Download URL: terraobject-0.0.1.tar.gz
  • Upload date:
  • Size: 1.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

File hashes

Hashes for terraobject-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0dd8ffeb2c17c9ed198e021c074e16ac681a69b8ec9374a08469aa459fe864bc
MD5 64890517ee76f3fee90c222398cb2c73
BLAKE2b-256 6c0953f0d32ecafce153d8a324cc86dab6b42dfe6dfaef1b9065792cffe72a02

See more details on using hashes here.

File details

Details for the file terraobject-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: terraobject-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

File hashes

Hashes for terraobject-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 096e47f81bb564e8a05a4e4af6e59608240ed2219dfdfb0217196293eb428f3b
MD5 9c48207398440c0a2779b91fc9d6db0d
BLAKE2b-256 b8b9c75abd6187649a3c813bb9c2853e9e58de6177a2d32ab8b66af55e1aecd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page