Milestone: Schema Generation

Brandon Croft,apiterraform

This is part of a series of notes about code generating a Terraform Provider using OpenAPI

The milestone is complete when tfpgen can generate a fully mapped GetSchema function for any OpenAPI spec.

OpenAPI adheres to json data types, with several data formats to give further clues about their intended conversion:

TypeFormatTerraform Plugin Framework Type (opens in a new tab)Go data type
integerint32Numberint
integerint64Int64int64
numberfloatNumberfloat32
numberdoubleFloat64float64
stringStringstring
stringbyteStringstring
stringbinaryStringstring
stringbyteStringstring
stringdateStringstring
stringdate-timeStringstring
stringpasswordString (Sensitive)string
booleanBoolbool
arrayList[]
object(Nested Attributes)(struct)
© Brandon Croft.