hashicorp / hashicorp/packer-plugin-amazon

Support custom Systems Manager Document

Open
#421 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
91
Forks
141
Avg merge
2d 18h
Merged PRs (30d)
3

Description

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](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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`](https://github.com/hashicorp/packer-plugin-amazon/blob/1d01046d561ba8925e8b57b7f2dd204bb02b936b/builder/common/ssm/session.go#L41)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.