Closed nicon89 closed 2 years ago
This question is not related to this module but to AWS, AMI, or OS.
Please ask it on https://repost.aws or StackOverflow.
Closing this one here.
Are you sure, though? After all I wasn't able to replicate this issue by using same AMI, same instance type, same region and so on when I created instance manually from the console.
I am sure it is not related to the module because there are no differences in the code related to the region.
Something has to be different. Maybe in the way the new region behaves or the way AMI was built or copied.
I checked this code also in eu-central-1 and I have exactly same behavior.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
Newly created EC2 instance is adding SSH key to a wrong location (~root/.ssh/authorized_keys instead of ~ubuntu/.ssh/authorized_keys).
Versions
Module version [Required]:
Terraform version:
Terraform v1.2.8 on linux_amd64
provider registry.terraform.io/hashicorp/aws v4.28.0
provider registry.terraform.io/hashicorp/local v2.0.0
Your version of Terraform is out of date! The latest version is 1.2.9. You can update by downloading from https://www.terraform.io/downloads.html
Terraform v1.2.8 on linux_amd64
Your version of Terraform is out of date! The latest version is 1.2.9. You can update by downloading from https://www.terraform.io/downloads.html
Reproduction Code [Required]
Steps to reproduce the behavior:
I tried to reproduce this issue by manually creating an EC2 machine with this AMI and SSH key - I couldn't reproduce this issue, but I was able to mount volume from module created EC2 instance and find what is causing the issue.
Expected behavior
SSH key should be in correct location.
Actual behavior
SSH key is added to the incorrect location.
Terminal Output Screenshot(s)
Additional context
I'm not sure if there's same problem in other regions - maybe it's region-specific, as me-central-1 is quite new.