python

package
v2.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package python implements a Python back-end for tf2pulumi's intermediate representation. It is responsible for translating the Graph IR emit by the frontend into valid Pulumi Python code that is as semantically equivalent to the original Terraform as possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(projectName string, w io.Writer) gen.Generator

New creates a new Python Generator that writes to the given writer and uses the given project name.

func RewriteTrivialApplies

func RewriteTrivialApplies(n il.BoundNode) (il.BoundNode, error)

RewriteTrivialApplies rewrites all applies within the bound node and its children to use "sugared" syntax if the apply itself is trivial. A trivial apply is an apply (a sequence of __apply and __applyArg intrinsics) that consist of simply reading a field off of an output-typed object.

The Python SDK has special syntax sugar for this pattern that alleviates the need to write this apply by hand, so this pass elides them entirely.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL