question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unknown resource type NodeGroupV2

See original GitHub issue

What happened?

Using Pulumi EKS 0.42.1 in Go to provision a NodeGroup using NodeGroupV2, it encounter this error:

Diagnostics:
  pulumi:pulumi:Stack (eks-vboulineau-eks-test):
    Error: unknown resource type eks:index:NodeGroupV2: Error: unknown resource type eks:index:NodeGroupV2
        at unknownResourceRejectedPromise (/Users/vincent.boulineau/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/cmd/provider/index.ts:145:27)
        at Provider.construct (/Users/vincent.boulineau/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/cmd/provider/index.ts:124:15)
        at Server.<anonymous> (/Users/vincent.boulineau/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/provider/server.ts:326:48)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/vincent.boulineau/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/pulumi/provider/server.js:18:58)
        at processTicksAndRejections (node:internal/process/task_queues:95:5)

    error: an unhandled error occurred: program failed:
    waiting for RPCs: rpc error: code = Unknown desc = unknown resource type eks:index:NodeGroupV2

Steps to reproduce

Create a cluster with a NodeGroupV2. Sample Go code:

	return eks.NewNodeGroupV2(e.Ctx, "test-cluster", &eks.NodeGroupV2Args{
		Cluster:              cluster.Core,
		DesiredCapacity:      pulumi.Int(1),
		KeyName:                      pulumi.StringPtr(e.DefaultKeyPairName()),
		AmiId:                        ami,
		InstanceType:                 instanceType,
		NodeRootVolumeSize:           pulumi.Int(80),
		NodeAssociatePublicIpAddress: pulumi.BoolPtr(false),
		InstanceProfile:              instanceProfile,
	})

The imports:

	awsEks "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks"
	awsIam "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ssm"
	"github.com/pulumi/pulumi-eks/sdk/go/eks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

Expected Behavior

NodeGroup is provisioned

Actual Behavior

Error is returned

Output of pulumi about

❯ pulumi about
CLI
Version      3.40.2
Go Version   go1.19.1
Go Compiler  gc

Plugins
NAME        VERSION
aws         5.7.2
awsx        1.0.0-beta.11
docker      3.2.0
eks         0.42.1
go          unknown
kubernetes  3.21.4

Host
OS       darwin
Version  12.6
Arch     x86_64

This project is written in go: executable='/usr/local/bin/go' version='go version go1.19.1 darwin/amd64'

Backend
Name           laptop
URL            gs://vboulineau-pulumi-test
User           vincent.boulineau
Organizations

Dependencies:
NAME                                 VERSION
github.com/pulumi/pulumi-aws/sdk/v5  5.7.2
github.com/pulumi/pulumi-awsx/sdk    1.0.0-beta.11
github.com/pulumi/pulumi-eks/sdk     0.42.1
github.com/pulumi/pulumi/sdk/v3      3.40.1

Pulumi locates its logs in /var/folders/h4/xp6zgrvd5_32n33jl3v53wt00000gn/T/ by default
warning: Failed to get information about the current stack: No current stack

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).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
danielrbradleycommented, Oct 12, 2022

A fix for this is in the process of being released - with the version 0.42.2 - hopefully complete within the hour.

1reaction
defyjoycommented, Oct 12, 2022

I am facing the same thing but with python - I am sure I have imported the correct version and the code sample is taken from pulumi-eks repo example

cluster = eks.Cluster(
        f'{cluster_name}-eks-cluster',
        name=f'{cluster_name}-eks-cluster',
        vpc_id=vpc.id,
        skip_default_node_group=True,
        private_subnet_ids=private_subnet_ids,
        public_subnet_ids=public_subnet_ids,
        kubernetes_service_ip_address_range="172.16.0.0/16",
        instance_roles=[role1, role2, role3],
        opts=pulumi.ResourceOptions(depends_on=[*private_subnets])
    )

`

instance_profile = aws.iam.InstanceProfile(
    resource_name="node-instance-profile",
    args=aws.iam.InstanceProfileArgs(
        role=role1.name
    )
)

eks_node_group = eks.NodeGroupV2(
    "example-ng2-simple-ondemand",
    cluster=cluster,
    instance_type="t3.small",
    desired_capacity=1,
    min_size=1,
    max_size=2,
    labels={"ondemand": "true"},
    instance_profile=instance_profile
)`

The error I faced is -

Diagnostics:
  pulumi:pulumi:Stack (pulumi-eks-dev):
    Error: unknown resource type eks:index:NodeGroupV2: Error: unknown resource type eks:index:NodeGroupV2
        at unknownResourceRejectedPromise (/Users/joydeep/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/cmd/provider/index.ts:145:27)
        at Provider.construct (/Users/joydeep/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/cmd/provider/index.ts:124:15)
        at Server.<anonymous> (/Users/joydeep/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/provider/server.ts:326:48)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/joydeep/.pulumi/plugins/resource-eks-v0.42.1/node_modules/@pulumi/pulumi/provider/server.js:18:58)
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
 
    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/pulumi/runtime/resource.py", line 602, in do_rpc_call
        return monitor.RegisterResource(req)
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__
        return _end_unary_response_blocking(state, call, False, None)
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    	status = StatusCode.UNKNOWN
    	details = "unknown resource type eks:index:NodeGroupV2"
    	debug_error_string = "{"created":"@1665541167.930677000","description":"Error received from peer ipv4:127.0.0.1:60992","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"unknown resource type eks:index:NodeGroupV2","grpc_status":2}"
    >
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/homebrew/bin/pulumi-language-python-exec", line 179, in <module>
        loop.run_until_complete(coro)
      File "/Users/joydeep/micromamba/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
        return future.result()
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 126, in run_in_stack
        await run_pulumi_func(lambda: Stack(func))
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
        await wait_for_rpcs()
      File "/Users/joydeep/Documents/Workhub/Personal/AWS/Pulumi/pulumi-eks/venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 73, in wait_for_rpcs
        await RPC_MANAGER.rpcs.pop()
    Exception: unknown resource type eks:index:NodeGroupV2

Is there no first class python support at the moment for NodegroupV2 ? Or is this is bug ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better error reporting when resource is not known · Issue #1642
When an unknown resource type is passed to an eksctl command the error is misleading. For example: $ eksctl get yaddayadda --region ap-northeast ......
Read more >
Puppet Evaluation Error. Error while evaluating a Resource ...
The module that provides the referred Unknown resource type is not available where your Puppet code is compiled. Find the module you need...
Read more >
Puppet standalone error - Unknown resource type
Solution A: Call testme_service::install a different way in profile. profile/manifests/init.pp. class profile::testme_service { class ...
Read more >
Problems with the use of custom types - Google Groups
I add the module to a client and start a puppetrun there. I see the custom type being synced, but after that I...
Read more >
[Puppet Users] Unknown resource type after Upgrade
Hey folks, I am currently upgrading to 6.x on a test setup using my live puppet code; trying to get it to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found