packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Support custom Systems Manager Document

Open malshash opened this issue 2 years ago • 0 comments

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

Can you please support the ability to use a specified Systems Manager document when provisioning with ssm on AWS. Currently, the functionality is hard coded to the AWS managed document named AWS-StartPortForwardingSession

This initial enhancement would be great if it just handled a custom document but the parameters for the document would be identical to the AWS managed document. I can see further enhancements to supporting custom documents in the future which can be handled by https://github.com/hashicorp/packer-plugin-amazon/issues/417.

Use Case(s)

Some companies strictly control which documents are allowed and when updates should be adopted. An AWS owned document does not let us control those aspects.

Potential configuration

source "amazon-ebs" "image" {
  ...
  communicator = "ssh"

  ssh_interface        = "session_manager"
  ssh_username         = "someuser"
  iam_instance_profile = "SomeInstanceProfileName"
  
  ssm_document = "MyPortForwardingDocument"   # Name of custom document to use
}

Potential References

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

malshash avatar Sep 26 '23 15:09 malshash