hello all. I’m having trouble getting exports to w...
# golang
hello all. I’m having trouble getting exports to work. I removed all my resource to the simplest example I could try and it isn’t working. Can someone explain why this code sample is broken please?
Copy code
package main

import (

func main() {

	pulumi.Run(func(ctx *pulumi.Context) error {
		ctx.Export("x", "hello")
		return nil

Apologies for the delay in response.
I just gave this a whirl and it seems to work as expected on the latest version:
Copy code
$ pulumi up
Previewing update (go-hw-dev):

     Type                 Name             Plan
 +   pulumi:pulumi:Stack  go-hw-go-hw-dev  create

    + 1 to create

Do you want to perform this update? yes
Updating (go-hw-dev):

     Type                 Name             Status
 +   pulumi:pulumi:Stack  go-hw-go-hw-dev  created

    x: "hello"

    + 1 created

Duration: 1s

Permalink: <https://app.pulumi.com/joeduffy/go-hw-dev/updates/1>
$ pulumi stack output
Current stack outputs (1):
    x       hello
Can you double check that you re-built the binary, and if it still occurs, let me know what version you're using? (
pulumi version
I cleared out my dependencies and reloaded them and now it works. I’m not entirely sure which version I was running previously
👍 1