pulumi-eks icon indicating copy to clipboard operation
pulumi-eks copied to clipboard

Give more detail on error messages

Open kevinawoo opened this issue 4 years ago • 5 comments

An example error:

  aws:eks:Cluster (aws-go-eks-helloworld-1-eksCluster):
    error: aws:eks/cluster:Cluster resource 'aws-go-eks-helloworld-1-eksCluster' has a problem: List shorter than MinItems: Attribute supports 1 item minimum, config has 0 declared

It would be nice if the error message told me what fields I'd need to correct with single qoutes around the field name. In the above example, is List the problem field?

Also, I'm not sure what MinItems or List is. It's not in the ClusterArgs struct.

Affected feature

  • area/error_messages
  • area/ux

kevinawoo avatar Mar 04 '21 18:03 kevinawoo

In this case the error was because the subnet Ids not being specified while a vpcid was. Regardless, the error message is highly cryptic and completely inactionable.

viveklak avatar Mar 04 '21 18:03 viveklak

Here's another one when running

ec2.NewSubnet(...)

* invalid value for required argument 'VpcId'

since so many resources require VPC IDs, it's ambiguous which line/resource that corresponds to

kevinawoo avatar Mar 04 '21 19:03 kevinawoo

Is this an instance of https://github.com/pulumi/pulumi-terraform-bridge/issues/311?

joeduffy avatar Mar 04 '21 19:03 joeduffy

from what I understand on how pulumi is architected, the subnet error maybe similar to pulumi/pulumi-terraform-bridge#311, but the first error is in the eks plugin (I could be very wrong tho lol)

kevinawoo avatar Mar 04 '21 19:03 kevinawoo

Is this an instance of pulumi/pulumi-terraform-bridge#311?

Its certainly related but I think even a more useful error message from the underlying provider (pulumi-aws) in this case won't be useful to our endusers who expect to be told what to fix in the pulumi-eks level (e.g. VPCConfig's sunetIds list is empty is not useful to the user of pulumi-eks). We need to employ some degree of defensive programming on the component provider to provide useful context.

viveklak avatar Mar 09 '21 00:03 viveklak