examples
examples copied to clipboard
aws java eks example fails
What happened?
pulumi:pulumi:Stack (eks-dev): warning: aws:ec2/getSubnetIds:getSubnetIds verification warning: The aws_subnet_ids data source has been deprecated and will be removed in a future version. Use the aws_subnets data source instead. error: update failed error: Running program PID: 14548 failed with an unhandled exception: io.grpc.StatusRuntimeException: UNAVAILABLE: error reading from server: read tcp 127.0.0.1:50869->127.0.0.1:50868: use of closed network connection at io.grpc.Status.asRuntimeException(Status.java:535) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:68) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:739) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:718) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)
aws:eks:Cluster (my-cluster-eksCluster): error: 1 error occurred: * error creating EKS Cluster (my-cluster-eksCluster-a70c5ba): InvalidParameterException: Subnets specified must be in at least two different AZs { RespMetadata: { StatusCode: 400, RequestID: "f884d926-564b-4cb2-ab80-0f7ffb4e1b6a" }, ClusterName: "my-cluster-eksCluster-a70c5ba", Message_: "Subnets specified must be in at least two different AZs" }
Resources: + 15 created
Duration: 34s
Steps to reproduce
run this example https://github.com/pulumi/examples/tree/master/aws-java-eks-minimal with pulumi update
Expected Behavior
It should create aws cluster
Actual Behavior
Gives errors
Output of pulumi about
G:\DWork\osource\cloudc\devops\pulumi\java\aws\eks>pulumi about CLI Version 3.39.3 Go Version go1.19.1 Go Compiler gc
Plugins NAME VERSION aws 5.11.0 eks 0.37.1 java unknown kubernetes 3.20.5
Host OS Microsoft Windows 10 Pro Version 10.0.19045 Build 19045 Arch x86_64
This project is written in java: executable='d:\Apps\Dev\langs\java\jdk\17.x\bin\java.exe' version='java 17.0.2 2022-01-18 LTS Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86) Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)' java='d:\Apps\Dev\langs\java\jdk\17.x\bin\java.exe' javac='17.0.2'
Current Stack: dev
TYPE URN pulumi:providers:aws urn:pulumi:dev::eks::pulumi:providers:aws::default_5_11_0 pulumi:pulumi:Stack urn:pulumi:dev::eks::pulumi:pulumi:Stack::eks-dev pulumi:providers:eks urn:pulumi:dev::eks::pulumi:providers:eks::default_0_37_1 eks:index:Cluster urn:pulumi:dev::eks::eks:index:Cluster::my-cluster pulumi:providers:aws urn:pulumi:dev::eks::pulumi:providers:aws::default_4_38_1 eks:index:ServiceRole urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole::my-cluster-instanceRole eks:index:ServiceRole urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole::my-cluster-eksRole pulumi:providers:eks urn:pulumi:dev::eks::pulumi:providers:eks::default eks:index:RandomSuffix urn:pulumi:dev::eks::eks:index:Cluster$eks:index:RandomSuffix::my-cluster-cfnStackName aws:ec2/securityGroup:SecurityGroup urn:pulumi:dev::eks::eks:index:Cluster$aws:ec2/securityGroup:SecurityGroup::my-cluster-eksClusterSecurityGroup aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:dev::eks::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::my-cluster-eksClusterInternetEgressRule aws:iam/role:Role urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/role:Role::my-cluster-instanceRole-role aws:iam/role:Role urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/role:Role::my-cluster-eksRole-role aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::my-cluster-instanceRole-e1b295bd aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::my-cluster-instanceRole-3eb088f2 aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::my-cluster-instanceRole-03516f97 aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::my-cluster-eksRole-90eb1c99 aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:dev::eks::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::my-cluster-eksRole-4b490823 aws:iam/instanceProfile:InstanceProfile urn:pulumi:dev::eks::eks:index:Cluster$aws:iam/instanceProfile:InstanceProfile::my-cluster-instanceProfile
Found no pending operations associated with dev
Backend Name pulumi.com URL https://app.pulumi.com/nagkumar User nagkumar Organizations nagkumar, tejasoft
No dependencies found
Pulumi locates its logs in C:\Users\RAJANA~1\AppData\Local\Temp by default
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).
Thank you for reporting the failure of this example! I've dug a little deeper and there are a few underlying issues in Pulumi that our team started addressing.
-
com.pulumi:pulumi 0.6.0 was just released and should shortly arrive at Maven Central (https://search.maven.org/artifact/com.pulumi/pulumi) though as of the writing of this it has not propagated yet; it contains an important bugfix to make the example pass preview
-
There is a warning due to the example using a deprecated API. I got past the warning in https://github.com/pulumi/examples/pull/1281
warning: aws:ec2/getSubnetIds:getSubnetIds verification warning: The aws_subnet_ids data source has been deprecated and will be removed in a future version. Use the aws_subnets data source instead.
-
There is a problem with the example assuming 2+ subnets in default VPC in different AZs. I've tried to work around this but a bit further work is needed to make sure the example provisions its own subnets instead of trying to find them in the user environment
-
Even with the workaround I currently get blocked on https://github.com/pulumi/pulumi-eks/issues/778 - it looks like a new release of com.pulumi:eks is needed at least at version 0.4.0 to be compatible with recent kubectl and aws cli versions
I'd like to return to fixing this example once it is unblocked via https://github.com/pulumi/pulumi-eks/issues/778