Hi all, I am experiencing an odd issue while attem...
# python
b
Hi all, I am experiencing an odd issue while attempting to create a new AWS EKS NodeGroup. In my code there is a single call to the NodeGroup method I've got in my deployment code. Where ever I run it and no matter how\what I set the tags of the NodeGroup to I'm getting the error "_creating EKS Node Group (EKS-playground:test): operation error EKS: CreateNodegroup, https response error StatusCode: 400, RequestID: 6cb8d8ed-0b40-463e-8a4f-342ef25648fd, InvalidRequestException: Tag value exceeds the maximum length of 256 characters_" Do you see anything wrong in my code? Am I missing anything here? Thanks in advance! Below is the code related to this resource.
Copy code
from pulumi_aws.eks import NodeGroup, NodeGroupLaunchTemplateArgs
        return NodeGroup(
            resource_name=name.replace("-","_").lower(),
            cluster_name=eks_cluster_name,
            launch_template=NodeGroupLaunchTemplateArgs(
                id=launch_template.id,
                version=launch_template.latest_version,
            ),
            node_group_name=name,
            node_role_arn=self.nodegroup_iam_role_resource.arn,
            scaling_config={
                "desiredSize": desired_nodes,
                "maxSize": max_nodes,
                "minSize": min_nodes,
            },
            subnet_ids=available_subnets,
            tags = {
                "key1": "Value1",
                "key2": "Value2",
            },
            update_config={
                "maxUnavailable": unavailable_nodes,
            },
            
            opts=ResourceOptions(depends_on=[launch_template]),
        )
For doc. purpose: OK, I might still be a Pulumi newbie, but I've just found the issue in my code 😲. It seems that the
LaunchTemplate
resource in my deployment was mis-configured. I've set this resource
tag_specifications=[LaunchTemplateTagSpecificationArgs(tags....
in a bad way where I've tried to set a tag value using my EKS cluster resource
.name
method and append it (this is an Output object actually which cannot be manipulated as a
str
But Pulumi instead of providing its common exception about
Output
object mis-usage this time did not... and also it pointed the issue to the
NodeGroup
resource instead of the
LaunchTemplate
one.... Once I've sort that resource name as string - everything working as it was supposed to.