hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
75 stars 112 forks source link

System Manager Document Provisioner #417

Open jlosito opened 1 year ago

jlosito commented 1 year ago

Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.

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

I would like the ability to provision an image using System Manager Documents.

Use Case(s)

I am strictly building images in AWS and already manage my EC2 instances using SSM. It would be useful if I could leverage the SSM documents I've already created in order to build an image rather than using another provisioner such as the shell provisioner.

Potential configuration

{
  ...,
  "provisioners": [
    {
      "type": "ssm",
      "docs": [
        {
            "name": "myfancyssmdoc",
            "parameters": {
               "input1": "foo",
               "input2": "bar"
            }
        },
        {
           "name": "anothercooldoc"
         }
      ]
    }
  ]
}

Potential References

https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html