pulumi icon indicating copy to clipboard operation
pulumi copied to clipboard

pulumi new aws-go: error: project is missing a 'name' attribute

Open nodauf opened this issue 3 years ago • 4 comments

What happened?

I tried to follow the get-started for several different provider. The step :

pulumi new aws-go 

returns

error: project is missing a 'name' attribute

I tried to specify the name with the argument -n but I have the same error. Maybe the issue #9836 is similar.

Steps to reproduce

I tried with multiple version (3.38.0, 3.39.1, 3.39.2).

Run pulumi new aws-go

Expected Behavior

According the documentation, it should run without any error

Actual Behavior

I had the flag -v11 --logtostderr to have more debug outputs:

└─[$] <> ../pulumi/pulumi new aws-go -v11 --logtostderr
W0907 22:16:38.694459 1405091 log.go:59] log level 11 will print sensitive information such as api tokens and request headers
I0907 22:16:38.992962 1405091 sink.go:155] defaultSink::Error(error: project is missing a 'name' attribute
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.(*Project).Validate
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/project.go:126
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.(*projectLoader).load
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/loaders.go:102
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.LoadProject
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/loaders.go:240
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.LoadTemplate
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/templates.go:430
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.TemplateRepository.Templates
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/templates.go:105
main.runNew
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new.go:143
main.newNewCmd.func2
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new.go:471
github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunFunc.func1
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:96
github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunResultFunc.func1
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:112
github.com/spf13/cobra.(*Command).execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:860
github.com/spf13/cobra.(*Command).ExecuteC
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/main.go:48
runtime.main
        /opt/hostedtoolcache/go/1.19.0/x64/src/runtime/proc.go:250
runtime.goexit
        /opt/hostedtoolcache/go/1.19.0/x64/src/runtime/asm_amd64.s:1594
)
error: project is missing a 'name' attribute
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.(*Project).Validate
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/project.go:126
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.(*projectLoader).load
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/loaders.go:102
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.LoadProject
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/loaders.go:240
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.LoadTemplate
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/templates.go:430
github.com/pulumi/pulumi/sdk/v3/go/common/workspace.TemplateRepository.Templates
        /home/runner/work/pulumi/pulumi/sdk/go/common/workspace/templates.go:105
main.runNew
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new.go:143
main.newNewCmd.func2
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new.go:471
github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunFunc.func1
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:96
github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil.RunResultFunc.func1
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:112
github.com/spf13/cobra.(*Command).execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:860
github.com/spf13/cobra.(*Command).ExecuteC
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main
        /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/main.go:48
runtime.main
        /opt/hostedtoolcache/go/1.19.0/x64/src/runtime/proc.go:250
runtime.goexit
        /opt/hostedtoolcache/go/1.19.0/x64/src/runtime/asm_amd64.s:1594

Output of pulumi about

CLI          
Version      3.39.2
Go Version   go1.19
Go Compiler  gc

Host     
OS       arch
Version  
Arch     x86_64

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/nodauf
User           nodauf
Organizations  nodauf

Pulumi locates its logs in /tmp by default
warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /tmp/pulumi-on-vsphere/quickstart). If you have not created a project yet, use `pulumi new` to do so: no project file found
warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /tmp/pulumi-on-vsphere/quickstart). If you have not created a project yet, use `pulumi new` to do so: no project file found

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

nodauf avatar Sep 07 '22 20:09 nodauf

Can't seem to repro on

CLI          
Version      3.39.2
Go Version   go1.19
Go Compiler  gc

Plugins
NAME  VERSION
aws   5.13.0
go    unknown

Host     
OS       darwin
Version  12.5.1
Arch     x86_64

This project is written in go: executable='/Users/anton/.nix-profile/bin/go' version='go version go1.18.2 darwin/amd64'

Current Stack: dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/t0yv0
User           t0yv0
Organizations  t0yv0, pulumi

Dependencies:
NAME                                 VERSION
github.com/pulumi/pulumi-aws/sdk/v5  5.13.0
github.com/pulumi/pulumi/sdk/v3      3.39.1

Pulumi locates its logs in /var/folders/mb/s1jx27m10t3082fqclpgytt80000gn/T/ by default


t0yv0 avatar Sep 07 '22 21:09 t0yv0

I'm also unable to repro. @dixler Can you try to repro this on linux?

iwahbe avatar Sep 08 '22 18:09 iwahbe

@nodauf It looks like Pulumi complains about Pulumi.yaml, could you please copy-paste the contents of that file to the issue?

mikhailshilkov avatar Sep 12 '22 12:09 mikhailshilkov

The folder is empty and this file does not exist. I followed the get-started.

nodauf avatar Sep 12 '22 17:09 nodauf

Closing since we're unable to repro. If you're still hitting this, please open a new issue.

justinvp avatar Jul 27 '23 07:07 justinvp