Reputation
371
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 4
Newest
 Good Answer
Impact
~6k people reached

  • 0 posts edited
  • 1 helpful flag
  • 0 votes cast
Nov
22
comment Does Terraform Deal with “known_hosts” upon changing infrastructure? If so, how?
To more directly answer your question: Terraform does not run the 'ssh' command directly, but rather it uses an SSH library written in Go to open SSH connections. This SSH library does not directly pay attention to OpenSSH options, and will by default just accept any host key unless the calling application provides a checking function. As far as I can tell from Terraform's source code, it does not provide such a function.
Nov
22
comment Does Terraform Deal with “known_hosts” upon changing infrastructure? If so, how?
Terraform will repeatedly try to SSH into the machine until it either succeeds or it times out. Depending on how your image in configured, it may take a while for the SSH server to become available, but the most common cause of this issue is that the instance's security groups are not permitting the connection on port 22. If Terraform is SSHing via the instance's public IP address and you're trying to provision from outside of your VPC you'll need to explicitly allow the incoming connection from your provisioning host on port 22.
Nov
22
comment Why is my AWS instance's private IP outside of the subnet's range?
Since you're not explicitly specifying subnet_id, the instance is presumably launching in your default subnet. Are you sure the default subnet is the subnet you think it is? You can make it explicit by setting subnet_id as an argument on your aws_instance, and then also changing to use "vpc_security_groups" instead of "security_groups", specifying the security group's id rather than its name.
Mar
31
awarded  Good Answer
Mar
18
awarded  Citizen Patrol
Mar
18
awarded  Custodian
Mar
17
awarded  Yearling
Jan
24
awarded  Nice Answer
Jan
23
answered What are best practices for managing SSH keys in a team?
Mar
11
awarded  Teacher
Sep
20
answered Perlbal For Upload Handling