Hi! I’m following this go inline example: <https:/...
# getting-started
f
Hi! I’m following this go inline example: https://github.com/pulumi/automation-api-examples/blob/main/go/inline_program/main.go (changed some values for stackName + replaced fmt with log and trying with k8s and not aws). When running
go run main.go
I get the following output
Copy code
2021/11/26 16:28:42 Created/Selected stack "org/proj/stack"
2021/11/26 16:28:42 Installing the Kubernetes Plugin
2021/11/26 16:28:42 Successfully installed kubernetes v3.10.1
2021/11/26 16:28:44 Successfully set config
2021/11/26 16:28:44 Starting refresh
2021/11/26 16:28:45 Failed to refresh stack: failed to refresh stack: exit status 255
code: 255
stdout: 
stderr: error: no stack named 'org/proj/stack' found


exit status 1
Any hints what I’m missing might miss?
b
are you setting an actual
/org/project/stack
?
f
Sorry, fairly new. I assume with that you mean this:
Copy code
orgName := "org"
	projectName := "proj"
	stackName := auto.FullyQualifiedStackName(orgName, projectName, "stack")

	// create or select a stack matching the specified name and project.
	// this will set up a workspace with everything necessary to run our inline program (deployFunc)
	s, err := auto.UpsertStackInlineSource(ctx, stackName, projectName, deployFunc)
	if err != nil {
		log.Printf("Failed to create Stack: %v\n", err)
	}
I would assume that auto.UpsertStackInlineSource is doing what needs to be done to set it
b
yeah, you'd need access to the org called
org
for that to work, do you have a pulumi login?
f
I do, I just tested it as I assumed you will come with that
But I do not have any access to any Org. So I removed it and it works like a charm
Ty
b
what's your login name? replace
orgName := "org"
with
orgName := "my-pulumi-login-name"
🙏 1
👍 1