pulumi-eks icon indicating copy to clipboard operation
pulumi-eks copied to clipboard

pulumi-eks: referencing cluster.id does not return a value

Open MitchellGerdisch opened this issue 3 years ago • 4 comments

I have a cluster declaration in python as follows:

cluster = Cluster(
    f"{proj_name}-eks",
    fargate=FargateProfileArgs(selectors=[
        FargateProfileSelectorArgs(namespace=app_namespace_name),
        FargateProfileSelectorArgs(namespace=sys_namespace_name),
        FargateProfileSelectorArgs(namespace=alb_controller_namespace_name),
    ]),
    vpc_id=vpc_id,
    private_subnet_ids = priv_subnet_ids,
    create_oidc_provider=True,
    version="1.19",
)

If I try to reference cluster.id it does not return any value. Using cluster.id.apply() throws an error that cluster.id does not support apply().

cluster.core.clsuter.id does return the expected value.

Expected behavior

cluster.id should return a value as per the documentation. Or the documentation should be updated to remove the "id" output property.

Current behavior

See above.

Steps to reproduce

  1. Create an eks cluster use the eks extension package.
  2. Try to access "cluster.id"

Context (Environment)

Either the documentation is wrong or the the provider should return cluster.id The fact that cluster.core.cluster.id works means this is not a critical issue.

Affected feature

MitchellGerdisch avatar Mar 08 '21 19:03 MitchellGerdisch

If I try to reference cluster.id it does not return any value.

That's right - there is no id property on eks.Cluster (or in general, on any ComponentResource).

Either the documentation is wrong or the the provider should return cluster.id

Which documentation suggested this? It does sound like that documentation is wrong.

lukehoban avatar Mar 08 '21 19:03 lukehoban

I am going to close this out - I can't find any instance where there are cluster.id references in our registry. If you can point to a specific place then we can try and fix that up to

stack72 avatar Jul 27 '22 13:07 stack72

Sorry - I should have added the docs reference originally. The pulumi-eks package docs show an id Output: https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#outputs

MitchellGerdisch avatar Jul 27 '22 13:07 MitchellGerdisch

Thanks @MitchellGerdisch - I will file this as a bug

stack72 avatar Jul 27 '22 21:07 stack72

This is a documentation generation issue. I've filed this as a separate bug on that side.

Closing as a duplicate of https://github.com/pulumi/pulumi/issues/11462

danielrbradley avatar Nov 23 '22 20:11 danielrbradley