-
Notifications
You must be signed in to change notification settings - Fork 87
Allow pulumi.Output in EKS Addon configurationValues
#1632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
PR is now waiting for a maintainer to run the acceptance tests. |
|
PR is now waiting for a maintainer to run the acceptance tests. |
|
PR is now waiting for a maintainer to run the acceptance tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR and helping clean up our codebase! Overall the PR looks like a great addition. I'll test this change on the side and merge when possible.
| extends Omit<aws.eks.AddonArgs, "resolveConflicts" | "clusterName" | "configurationValues"> { | ||
| cluster: Cluster; | ||
| configurationValues?: object; | ||
| configurationValues?: pulumi.Input<object>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This should be a safe change as the API is currently modeled as an Input already (ref) so this isn't a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! The types were telling me that an Input should be fine but then it put Calling [toJSON] on an [Output<T>] is not supported in my JSON blob
| ...args, | ||
| clusterName: cluster.core.cluster.name, | ||
| configurationValues: JSON.stringify(args.configurationValues), | ||
| configurationValues: stringifyAddonConfiguration(args.configurationValues), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need to be more careful here. stringifyAddonConfiguration changes the ordering, and may cause replacements for existing users. We'll need to test this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to avoid changing the order for users who are already utilising this, would it be safer to just use pulumi.jsonStringify(args.configurationValues) ?
I think it would be safe to assume that if the user required a deterministic order, they would have ran into this issue already and either worked around the wrapper component or implemented their own ordering solution, so it's a bit too late to add now.
|
I was just doing some refactoring of my component that handles EKS addons and ran into this issue again. I don't think it's been fixed elsewhere. @rquitales could we have a look at this again? |
Proposed changes
Someone went through the effort of creating a stringify function and forgot to use it 😁