-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Spotinst: Attempt to find a Security Group even without a VPC ID #6030
Conversation
request.GroupIds = []*string{e.ID} | ||
} else { | ||
|
||
} else if fi.StringValue(e.Name) != "" && e.VPC != nil { |
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.
The lines removed above were also validating that e.VPC.ID
is not null. Was this an invalid case, or do you need to extend your if check here?
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.
@KashifSaadat Thanks! Good catch, fixed.
Hey @liranp, thanks for the contribution :) Just one small query I added, otherwise the change looks good. /ok-to-test |
Great, thanks @liranp ! /ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KashifSaadat, liranp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Specifying additional security groups in the InstanceGroup's spec resulted in a spurious change. This happens because of an incorrect value (nil, actually) returns from this function, although there is no reason for it to be done this way since the VPC ID is only used in L115.
This PR eliminates ths spurious change by allowing the find function to be executed even without a VPC ID.
Steps to reproduce