This message was deleted.
# general
s
This message was deleted.
b
zone.ID()
s
Have tried that but it results into another issue
Copy code
/main.go:56:16: cannot use zone.ID (value of type func() pulumi.IDOutput) as type pulumi.StringInput in struct literal:
        func() pulumi.IDOutput does not implement pulumi.StringInput (missing ElementType method)
b
This compiles for me
Copy code
zone, err := cloudflare.NewZone(ctx, "<http://zone.io|zone.io>", &cloudflare.ZoneArgs{
			AccountId: pulumi.String("foo"),
			Plan:      pulumi.String("free"),
			Zone:      pulumi.String("<http://leebriggs.io|leebriggs.io>"),
		})
		if err != nil {
			return err
		}

		record, err := cloudflare.NewRecord(ctx, "test_record", &cloudflare.RecordArgs{
			ZoneId:  zone.ID(),
			Name:    pulumi.String("test"),
			Value:   pulumi.String("0.0.0.0"),
			Type:    pulumi.String("A"),
			Ttl:     <http://pulumi.Int|pulumi.Int>(1),
			Proxied: pulumi.Bool(true),
		})
I think you’re missing the func return, so you’re passing
zone.ID
instead of
zone.ID()
s
You right, works now! Thanks for your help, appreciate it
b
if you aren’t using an IDE like vscode, it’ll really help you catch errors like this and fix them automatically
s
Cool, is that a pulumi extension for Vscode¿
b
it’s just the standard Go extension
👍 1