better-rainbow-14549
06/17/2020, 11:29 AMexport type CommonProperties<A, B> = { [K in keyof A & keyof B]: A[K] extends B[K] ? K : never };
export type AzureSubnetResult = CommonProperties<azure.network.GetSubnetResult, azure.network.Subnet>;
but it does mean I have to specify it either long-form as a type in the function, or create a new type from it for each resource. Is this something that could be added to the generated TF code somehow? Any reasons why it's bad practice or not?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by