The below example script handles most of the annoying parts of implementing
the protocol between Python and Terraform when using the external
resource
type. In order to prevent required dependencies, this script only uses
built-in Python modules for argument parsing and result serialization. It
will current do the following:
- Automatically parse and validate input arguments based on defined
dataclass
as defined by the Terraform protocol specification. - Automatically serialize output results based on defined
dataclass