Can we connect aws ec2 windows instance using terraform

Can we connect aws ec2 windows instance using terraform

My scenario is i need to connect aws ec2 windows instance, need to add certificates and enabling winrm by adding winrm https listener for port 5986

Can anyone please suggest me script, If it is possible