Hello :unicorn_face: I am creating a pulumi_eks.Cl...
# general
b
Hello 🦄 I am creating a pulumi_eks.Cluster Resource and for some reason I have an error with the node_ami_id parameter At first I thought it was because of a TYPO, but I was testing and only when I use said parameter do I receive an
AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
searching the Cluster class we find that
node_ami_id: Optional[pulumi.Input[str]] = None
therefore in my ClusterArgs class I have
node_ami_id: Optional[str] = None
which I use in the following way:
Copy code
class ClusterBuild(ComponentResource):
        def __init__(self,
                     nameResource: str,
                     args: ClusterArgs,
                     opts: ResourceOptions = None
                     ) -> None:
                super().__init__('custom:resource:CLUSTER', nameResource, {}, opts)

                if args.name is None:
                    args.name = f"cluster-{args.index+1}-{args.project_name}-{args.environment}-{args.vpc_cidr_tag}"
                
                
                self.cluster = Cluster(
                        args.name,
                        cluster_security_group=args.cluster_security_group,
                        cluster_security_group_tags=args.cluster_security_group_tags,
                        cluster_tags=args.cluster_tags,
                        create_oidc_provider=args.create_oidc_provider,
                        creation_role_provider=args.creation_role_provider,
                        default_addons_to_remove=args.default_addons_to_remove,
                        desired_capacity=args.desired_capacity,
                        enabled_cluster_log_types=args.enabled_cluster_log_types,
                        encrypt_root_block_device=args.encrypt_root_block_device,
                        encryption_config_key_arn=args.encryption_config_key_arn,
                        endpoint_private_access=args.endpoint_private_access,
                        endpoint_public_access=args.endpoint_public_access,
                        fargate=args.fargate,
                        gpu=args.gpu,
                        instance_profile_name=args.instance_profile_name,
                        instance_role=args.instance_role,
                        instance_roles=args.instance_roles,
                        instance_type=args.instance_type,
                        kubernetes_service_ip_address_range=args.kubernetes_service_ip_address_range,
                        max_size=args.max_size,
                        min_size=args.min_size,
                        name=args.name,
                        node_ami_id=args.node_ami_id,
                        # node_associate_public_ip_address=args.node_associate_public_ip_address,
                        # node_group_options=args.node_group_options,
                        # node_public_key=args.node_public_key,
                        # node_root_volume_size=args.node_root_volume_size,
                        # node_security_group_tags=args.node_security_group_tags,
                        # node_subnet_ids=args.node_subnet_ids,
                        # node_user_data=args.node_user_data,
                        # private_subnet_ids=args.private_subnet_ids,
                        # provider_credential_opts=args.provider_credential_opts,
                        # proxy=args.proxy,
                        # public_access_cidrs=args.public_access_cidrs,
                        # public_subnet_ids=args.public_subnet_ids,
                        # role_mappings=args.role_mappings,
                        # service_role=args.service_role,
                        # skip_default_node_group=args.skip_default_node_group,
                        # storage_classes=args.storage_classes,
                        # subnet_ids=args.subnet_ids,
                        tags=args.tags,
                        # use_default_vpc_cni=args.use_default_vpc_cni,
                        # user_mappings=args.user_mappings,
                        # version=args.version,
                        # vpc_cni_options=args.vpc_cni_options,
                        # vpc_id=args.vpc_id,
                        opts=ResourceOptions(parent=self)
                    )

                self.register_outputs({})
It should be noted that I get the same error if the parameter has a null value but if I use pulumi_eks.Cluster directly I do not have any errors.