-
Notifications
You must be signed in to change notification settings - Fork 28
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
EC2 describe-instances filter within instance_for_port()
function returning multiple instance IDs rather than one
#43
Comments
I performed additional tests and collected the results to demonstrate the behavior (current filter vs proposed filter): # ScenarioTwo EC2 instances with the following tags:
From # Results using existing filter of
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have seen an issue result of function
instance_for_port()
returning multiple instances while my understanding is that it is expected to return a single instance. So, I observed a condition that will return both nodes instead of one due to the filters being used below:Imagine a two-node cluster, each with the following set of tags respectively:
I believe the intent with the filter above is to collect a single instance ID that meets the condition
${ec2_tag} = ${port}
. However, this is not what is happening in this case because it's returning all instances that has a tag-key${ec2_tag}
regardless of its value AND tag-value${port}
regardless of its tag-key. Hence, the scenario above will return both EC2 instances.This is mentioned in the AWS CLI documentation for
describe-instances
[1] operation.I'm logging this issue suggesting the following filter if the intent above is indeed the expected condition:
Looking forward to seeing your comments.
Pull request:
The text was updated successfully, but these errors were encountered: