Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-532

How manage resources that do not allow to set an identifier

XMLWordPrintable

    • Icon: Spike Spike
    • Resolution: Done
    • Icon: Major Major
    • 2.4, Testing
    • None
    • None
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False

      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.

            mbuzachi Alina Buzachis
            mbuzachi Alina Buzachis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: