-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add support for sharing AMIs on Organizations level or to OUs #156
Comments
@gcardonag thanks for implementing this one! |
Thank you for capturing the issue @nckbnv ! I was excited to be able to contribute to this as soon as I saw the AWS announcement |
Sorry to intrude, quick question! I'm really looking forward to utilizing these new org-sharing vars in my pipeline but its unclear to me when this will actually make it into Packer, is there way to ballpark that based on the release cadence of Packer/plugins? |
Hi there @permanentdaylight you can expect to see a release later this week. We are working on coordinating a few plugin releases alongside a Packer core release. In the future, we will work on having a consistent release cadence for the plugins. Cheers! |
@nywilken sounds good, appreciate the info! |
@nywilken any update on releasing this? i don't see any releases since October. |
I've been watching since Amazon made the announcement, but ended up doing this with a shell-out since I didn't want to wait (we had an exceptionally well-timed use case for it). Sharing for anybody else who might want it. "post-processors": [
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
},
{
"type": "shell-local",
"script": "publish.sh",
}
] ...where for manifest_line in $(jq -r .builds[].artifact_id manifest.json | tr ',' '\n'); do
region=$(echo $manifest_line | cut -d ':' -f 1)
ami=$(echo $manifest_line | cut -d ':' -f 2)
aws ec2 modify-image-attribute --image-id $ami --region $region \
--launch-permission "Add=[{OrganizationArn=(arn goes here)}]"
done |
On packer
With the template saying:
awscli works fine on the same arn:
Notice that as documented, I'm saying For my usecase, it's no big issue to list out account IDs instead, via But looks like a regression. |
This issue was originally opened by @nckbnv in hashicorp/packer#11368 and has been migrated to this repository. The original issue description is below.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
AWS has recently announced support for sharing Amazon Machine Images across AWS Organizations and Organizational Units.
Previously, we were able to share AMIs with specific AWS account IDs. In packer, this is usually defined as a list(string) in
ami_users
in theamazon-ebs
builder.Use Case(s)
As It is now possible to share AMIs on Organizations level, which would be a huge benefit for anyone that is using the Organizations service and wants to have centrally build AMIs shared across.
Potential configuration
I think that adding two additional variables would be sufficient:
ami_organization_id
or it's shorter formami_org_id
ami_organizational_unit_ids
or it's shorter formami_ou_ids
Potential References
The text was updated successfully, but these errors were encountered: