Context
Several CCAPI resources have the primaryIdentifier marked as read only, thus, not allowing to be set up by the user. This brings to several resources without a name, but with only a random generated identifier.
A solution would be setting up a "Name" on resources that don't allow the primary ID to be set. Name is taken as a parameter that gets added as a tag:Name.
However, this doesn't seem to solve our problem because get_resource() widely used in the modules logic will only accept an identifier (e.g., vpc_id, subnet_id) and not a filter based on tag:Name. We won't be able to delete | update | describe a resource using only its name.
As of now, for these kind of modules, we cannot ensure the idempotency since we cannot check if those resources exists (using their name), before creating new ones.
A solution would be to have the possibility to pass filters to the get_resource() function, but this is something that depends on Amazon.
This issue is a research spike to determine if there is a viable path forward without a server side filtering option from Amazon.
Acceptance Criteria
Update this ticket with the outcome of your research. Please state whether or not there is a reasonable client side implementation for this. We can assume that fetching every resource in order to filter locally is not likely to be an acceptable solution.
- is related to
-
ACA-877 Implement tag:Name functionality for resources with read-only identifiers in amazon.cloud
- New