hashicorp / hashicorp/packer-plugin-amazon

AWS SSM: Native support for SSM session similar to Ansible Provisioner

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

Description

_This issue was originally opened by @shanmugakarna in https://github.com/hashicorp/packer/issues/11714 and has been migrated to this repository. The original issue description is below._

---
#### Description

Ansible supports `aws_ssm` connection type natively without a port-forwarding the tunnel and connecting to it via SSH. But, Packer still need WinRM to check initial connectivity before starting provisioners.
The below example talks about WinRM, though this would be true for SSH as well.

```
ansible_connection: aws_ssm
ansible_shell_type: powershell
ansible_aws_ssm_bucket_name: demo-ansible-ssm-bucket
ansible_aws_ssm_region: us-east-1
````

#### Use Case(s)

Though ansible doesn't need WinRM to be enabled when using `ansible_connection: aws_ssm`, we still need to enable `winrm` just because Packer expects to check WinRM connection before triggering provisioners.

#### Potential configuration

If packer itself test the connectivity to the instance via `aws ssm start-session --target "i-**************"`, will completely remove the need to enable WinRM on AWS EC2 AMIs.

#### Potential References
https://docs.aws.amazon.com/cli/latest/reference/ssm/start-session.html
https://docs.ansible.com/ansible/latest/collections/community/aws/aws_ssm_connection.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.