Skip to content
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

opentelekomcloud_images_image_access_v2 should be able to share multiple images to multiple projects #2716

Closed
dpakes opened this issue Nov 11, 2024 · 1 comment
Assignees

Comments

@dpakes
Copy link

dpakes commented Nov 11, 2024

Description of the enhancement

Currently, the opentelekomcloud_images_image_access_v2 resource is using Native OpenStack API /v2/images/{image_id}/members which causes that member_id variable in the resource is string and because of that terraform can share one image with one member only. When trying to run it again with a different member_id, it wants to replace the resource with a different member.

There is an API that allows sharing multiple images with multiple projects. This API endpoint requires images and projects to be an array of strings.

This solution is also supported in GUI, where you can provide a list of projects up to 100.
image

Would it be possible to apply such a resource that can share images with multiple projects, or is there another solution for that?

Thank you in advance,
David

@anton-sidelnikov anton-sidelnikov self-assigned this Nov 14, 2024
otc-zuul bot pushed a commit that referenced this issue Nov 25, 2024
[Feat.] New `resource/opentelekomcloud_ims_image_share_v1`

Summary of the Pull Request
New resource accepts multiple values for sharing projects (target_project_ids)
PR Checklist

 Refers to: #2716
 Tests added/passed.
 Documentation updated.
 Schema updated.
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccImsImageShare_basic
=== PAUSE TestAccImsImageShare_basic
=== CONT  TestAccImsImageShare_basic
--- PASS: TestAccImsImageShare_basic (158.02s)
PASS

Process finished with the exit code 0

Reviewed-by: Vladimir Vshivkov
Reviewed-by: Muneeb H. Jan <muneebhafeezjan@gmail.com>
Reviewed-by: Artem Lifshits
Reviewed-by: Aloento
otc-zuul bot pushed a commit that referenced this issue Nov 27, 2024
)

[Feat.] New `resource/opentelekomcloud_ims_image_share_accept_v1`

Summary of the Pull Request
PR Checklist

 Refers to: #2716
 Tests added/passed.
 Documentation updated.
 Schema updated.
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccImsImageShareAccept_basic
=== PAUSE TestAccImsImageShareAccept_basic
=== CONT  TestAccImsImageShareAccept_basic
--- PASS: TestAccImsImageShareAccept_basic (32.87s)
PASS

Process finished with the exit code 0

Reviewed-by: Aloento
Reviewed-by: Artem Lifshits
@anton-sidelnikov
Copy link
Member

Hi @dpakes! New resources available in latest release v1.36.26, which uses other api version:
resource/opentelekomcloud_ims_image_share_v1
resource/opentelekomcloud_ims_image_share_accept_v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants