Closed marcoandredinis closed 1 year ago
When there's an embed proto field (extension (gogoproto.embed) = true) we need to embed the message's fields into the current message.
(gogoproto.embed) = true
So this:
message DeviceV1 { ResourceHeader Header = 1 [(gogoproto.embed) = true]; string other = 2; } message ResourceHeader { string Kind = 1; }
Should become the following tfschema:
kind: string other: string
However, we were creating the following schema:
header: kind: string other: string
This PR changes this to support embedding those fields. I did a manual test for the DeviceTrust resource which we are about to add support for in Teleport's Terraform provider.
TODO
@nklaassen Tagging you as reviewer since you are also reviewing https://github.com/gravitational/teleport-plugins/pull/801
Friendly ping for code owner review please @r0mant
Thanks everyone for review.
When there's an embed proto field (extension
(gogoproto.embed) = true
) we need to embed the message's fields into the current message.So this:
Should become the following tfschema:
However, we were creating the following schema:
This PR changes this to support embedding those fields. I did a manual test for the DeviceTrust resource which we are about to add support for in Teleport's Terraform provider.
TODO