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

Allow passing resource properties by their IDs

Open flostadler opened this issue 1 year ago • 1 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently the components in this provider accept multiple inputs that are pulumi resources. For example an aws.iam.InstanceProfile for NodeGroup & NodeGroupV2.

This complicates passing dependencies across stacks or using constants for known properties and forces users to centralize their configuration or use .get functions for retrieving handles for resources.

The bug https://github.com/pulumi/pulumi/issues/17515 complicates this scenario even further because the results of .get fail to be passed across component boundaries in nodejs.

To simplify the API, we should introduce scalar properties for all resources. E.g. a string input property called instanceProfileName for the instance profile.

Affected area/feature

  • Component Inputs

flostadler avatar Nov 13 '24 16:11 flostadler

#1497 adds instanceProfileName to NodeGroupBaseOptions Remaining component args that need scalar properties added include:

NodeGroupBaseOptions:
- extraNodeSecurityGroups?: aws.ec2.SecurityGroup[];

ClusterOptions
- instanceRole?: pulumi.Input<aws.iam.Role>;
- serviceRole?: pulumi.Input<aws.iam.Role>;

jdavredbeard avatar Nov 25 '24 16:11 jdavredbeard