Skip to content

[v14] AWS OIDC - List EC2: add AWS EC2 Instance ID as label#31437

Merged
marcoandredinis merged 1 commit intobranch/v14from
bot/backport-31415-branch/v14
Sep 6, 2023
Merged

[v14] AWS OIDC - List EC2: add AWS EC2 Instance ID as label#31437
marcoandredinis merged 1 commit intobranch/v14from
bot/backport-31415-branch/v14

Conversation

@marcoandredinis
Copy link
Copy Markdown
Contributor

Backport #31415 to branch/v14

When listing EC2 instances we should be able to tell which ones were
already added.
To do so, we should use the instance-id which is unique.
We can't use the Spec.CloudMetadata.AWS.InstanceID because predicate
can't use fields that are optional.

This PR adds the InstanceID as label.
It uses `teleport.dev/instance-id` label key.

When creating a Node from WebUI, it will send the same set of labels
that was received.
So, WebUI will send this same label.

When listing EC2 instances, WebUI queries the backend for a list of
Nodes of type EC2 EICE and the same `instance-id` and uses the result to
show which ones were already added.
@marcoandredinis marcoandredinis force-pushed the bot/backport-31415-branch/v14 branch from 5410cf8 to ef87d9f Compare September 6, 2023 10:17
@marcoandredinis marcoandredinis added this pull request to the merge queue Sep 6, 2023
Merged via the queue into branch/v14 with commit b18815a Sep 6, 2023
@marcoandredinis marcoandredinis deleted the bot/backport-31415-branch/v14 branch September 6, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants