careful-bird-79707
04/26/2023, 11:15 AMpulumi.Input
, but the related structs defined in the package (e.g. this one) do not implement the interface.
For this reason, the example in the docs just errs.
Is there some simple way to implement pulumi.Input
for a general struct? Should I do this myself? Is this a bug?dbforpostgresql "<http://github.com/pulumi/pulumi-azure-native/sdk/go/azure/dbforpostgresql/v20221201|github.com/pulumi/pulumi-azure-native/sdk/go/azure/dbforpostgresql/v20221201>"
The root-level package seems to have issuessalmon-account-74572
04/26/2023, 5:02 PMcareful-bird-79707
04/26/2023, 5:33 PMAsInput
or similar helper available to sort out the inconsistency.salmon-account-74572
04/26/2023, 5:45 PMcareful-bird-79707
04/26/2023, 6:09 PMpulumi.Input
interface for the .Properties
fieldpackage main
import (
dbforpostgresql "<http://github.com/pulumi/pulumi-azure-native/sdk/go/azure/dbforpostgresql|github.com/pulumi/pulumi-azure-native/sdk/go/azure/dbforpostgresql>"
"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbforpostgresql.NewServer(ctx, "server", &dbforpostgresql.ServerArgs{
Properties: dbforpostgresql.ServerPropertiesForDefaultCreate{},
})
return nil
})
}
./main.go:11:16: cannot use dbforpostgresql.ServerPropertiesForDefaultCreate{} (value of type dbforpostgresql.ServerPropertiesForDefaultCreate) as pulumi.Input value in struct literal: dbforpostgresql.ServerPropertiesForDefaultCreate does not implement pulumi.Input (missing method ElementType)
salmon-account-74572
04/26/2023, 6:30 PM