Is the example of `aws-go-eks` working fine? Iā€™m t...
# general
j
Is the example of
aws-go-eks
working fine? Iā€™m trying to create cluster and Iā€™m getting some errors:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (aws-go-eks-dev):
    error: an unhandled error occurred: program exited with non-zero exit code: 2

    # aws-go-eks
    ./main.go:144:15: eksCluster.CertificateAuthority undefined (type *eks.Cluster has no field or method CertificateAuthority)
    ./main.go:148:16: eksCluster.CertificateAuthority undefined (type *eks.Cluster has no field or method CertificateAuthority)
Shall it be:
pulumi.StringOutput(eksCluster.CertificateAuthorities)
instead?
Copy code
diff --git a/aws-go-eks/main.go b/aws-go-eks/main.go
index 96c880f..ed15fc0 100644
--- a/aws-go-eks/main.go
+++ b/aws-go-eks/main.go
@@ -140,12 +140,11 @@ func main() {
                        return err
                }

-               ctx.Export("kubeconfig", generateKubeconfig(eksCluster.Endpoint,
-                       eksCluster.CertificateAuthority.Data().Elem(), eksCluster.Name))
+               ctx.Export("kubeconfig", generateKubeconfig(eksCluster.Endpoint, pulumi.StringOutput(eksCluster.CertificateAuthorities), eksCluster.Name))

                k8sProvider, err := providers.NewProvider(ctx, "k8sprovider", &providers.ProviderArgs{
                        Kubeconfig: generateKubeconfig(eksCluster.Endpoint,
-                               eksCluster.CertificateAuthority.Data().Elem(), eksCluster.Name),
+                               pulumi.StringOutput(eksCluster.CertificateAuthorities), eksCluster.Name),
                }, pulumi.DependsOn([]pulumi.Resource{nodeGroup}))
                if err != nil {
                        return err
Ok - now it works šŸ™‚ Shall I create a PR?
b
yes please!
šŸ‘ 1
j
And my first PR for pulumi: https://github.com/pulumi/examples/pull/1208 šŸ˜‰