Within the Automation API, in golang, I'm trying t...
# automation-api
g
Within the Automation API, in golang, I'm trying to set the workspace login URL without resorting to running
pulumi login
via exec(). It looks like this is supported by including project configuration when configuring your stack, something like:
Copy code
s, err := auto.NewStackInlineSource(ctx, stackName, projectName, deployFunc, auto.Project( workspace.Project{
		Name: tokens.PackageName( projectName ),
		Runtime: workspace.NewProjectRuntimeInfo( "golang", OPTS ),
		Backend: &workspace.ProjectBackend{
			URL: "<storage URL>",
		},
	} ))
This seems simple in TypeScript (which just takes strings, not complex objects). But in Go,
OPTS
needs to be a map of strings to interfaces. Including an empty map or
nil
results in a nil pointer deref. It seems like it wants at least one specific option in there, but I can't find any documentation that explains what it might be.