hashicorp / terraform-plugin-codegen-spec

Terraform Provider Code Generation Specification and Go Bindings
Mozilla Public License 2.0
7 stars 4 forks source link

Add CustomType to the Specification Go Bindings #25

Closed bendbennett closed 1 year ago

bendbennett commented 1 year ago

Currently, an Object is a []ObjectAttributeType when obtained from the Specification Go bindings and has the following form:

type ObjectAttributeType struct {
    Name string `json:"name"`

    Bool    *BoolType            `json:"bool,omitempty"`
    Float64 *Float64Type         `json:"float64,omitempty"`
    Int64   *Int64Type           `json:"int64,omitempty"`
    List    *ListType            `json:"list,omitempty"`
    Map     *MapType             `json:"map,omitempty"`
    Number  *NumberType          `json:"number,omitempty"`
    Object  ObjectAttributeTypes `json:"object,omitempty"`
    Set     *SetType             `json:"set,omitempty"`
    String  *StringType          `json:"string,omitempty"`
}

This type needs to be extended to include CustomType *CustomType.

bflad commented 1 year ago

This will require a breaking change, but the specification should certainly allow this customization. 👍 Better now than later.

github-actions[bot] commented 3 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.