amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

ec2_ami: Add support for sharing AMIs on Organizations level or to OUs

Open mfann-or opened this issue 1 year ago • 2 comments

Summary

It would be very beneficial to have the ability to share an AMI across an Organization or OUs since AWS has added that ability.

A similar issue was introduced to Packer's Amazon Plugin.

org_arns and ou_arns could be added to the launch_permissions paramater.

Issue Type

Feature Idea

Component Name

ec2_ami

Additional Information

Possible examples if org_arns and ou_arns are added to the launch_permissions parameter.

- name: Allow AMI to be launched across an organization
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    state: present
    launch_permissions:
      org_arns: ['arn:aws:organizations::123456789012:organization/o-ab12c3ef4']
- name: Allow AMI to be launched across an OU
  amazon.aws.ec2_ami:
    image_id: "{{ instance.image_id }}"
    state: present
    launch_permissions:
      ou_arns: ['some_ou_arn_here']

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

mfann-or avatar Aug 16 '22 20:08 mfann-or

Files identified in the description:

  • [plugins/modules/ec2_ami.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/ec2_ami.py)

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Aug 16 '22 20:08 ansibullbot

cc @Constantin07 @gunzy83 @jillr @s-hertel @scicoin-project @tremble @wilvk click here for bot help

ansibullbot avatar Aug 16 '22 20:08 ansibullbot