https://pulumi.com logo
Title
f

future-ocean-92178

10/30/2020, 8:42 AM
Hi, may I ask a question here . below code does not work , it says ./main.go:207:19: mixture of field:value and value initializers ./main.go:208:4: cannot use vswitchId (type vpc.Switch) as type pulumi.Resource in slice literal: vpc.Switch does not implement pulumi.Resource (pulumi.addTransformation method has pointer receiver) . what is the correct way to use DependsOn ?
eni1, err := vpc.NewNetworkInterface(ctx, name, &vpc.NetworkInterfaceArgs{
VswitchId: vswitchId.ID(),
SecurityGroups: pulumi.StringArray{
sgid,
},
pulumi.DependsOn([]pulumi.Resource{
vswitchId,
}),