Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Sem conexão via SSH

Após fazer todos os procedimentos não consegui acessar a maquina via ssh. rafael@rafael-VirtualBox:~/LABS/terraform$ ssh -i ~/.ssh/terraform-aws ubuntu@172.31.25.237 ssh: connect to host 172.31.25.237 port 22: Connection timed out

aws_instance.dev[1]:

resource "aws_instance" "dev" { ami = "ami-03a0c45ebc70f98ea" arn = "arn:aws:ec2:us-east-2:089276542541:instance/i-06b7776083750f132" associate_public_ip_address = true availability_zone = "us-east-2b" cpu_core_count = 1 cpu_threads_per_core = 1 disable_api_termination = false ebs_optimized = false get_password_data = false hibernation = false id = "i-06b7776083750f132" instance_initiated_shutdown_behavior = "stop" instance_state = "running" instance_type = "t2.micro" ipv6_address_count = 0 ipv6_addresses = [] key_name = "aws-terraform" monitoring = false primary_network_interface_id = "eni-00f8d7785bef5d3ee" private_dns = "ip-172-31-25-237.us-east-2.compute.internal" private_ip = "172.31.25.237" public_dns = "ec2-3-144-160-230.us-east-2.compute.amazonaws.com" public_ip = "3.144.160.230" secondary_private_ips = [] security_groups = [ "acesso-ssh", ] source_dest_check = true subnet_id = "subnet-780dc105" tags = { "name" = "dev1" } tags_all = { "name" = "dev1" } tenancy = "default" vpc_security_group_ids = [ "sg-00d8f36de7c873fa5", ]

capacity_reservation_specification {
    capacity_reservation_preference = "open"
}

credit_specification {
    cpu_credits = "standard"
}

enclave_options {
    enabled = false
}

metadata_options {
    http_endpoint               = "enabled"
    http_put_response_hop_limit = 1
    http_tokens                 = "optional"
    instance_metadata_tags      = "disabled"
}

root_block_device {
    delete_on_termination = true
    device_name           = "/dev/sda1"
    encrypted             = false
    iops                  = 100
    tags                  = {}
    throughput            = 0
    volume_id             = "vol-01cb6812bf2466f7b"
    volume_size           = 8
    volume_type           = "gp2"
}

}

aws_security_group.acesso-ssh:

resource "aws_security_group" "acesso-ssh" { arn = "arn:aws:ec2:us-east-2:089276542541:security-group/sg-00d8f36de7c873fa5" description = "acesso-ssh" egress = [] id = "sg-00d8f36de7c873fa5" ingress = [ { cidr_blocks = [ "189.13.66.3/32", ] description = "SSH" from_port = 22 ipv6_cidr_blocks = [] prefix_list_ids = [] protocol = "tcp" security_groups = [] self = false to_port = 22 }, ] name = "acesso-ssh" owner_id = "089276542541" revoke_rules_on_delete = false tags = { "Name" = "SSH" } tags_all = { "Name" = "SSH" } vpc_id = "vpc-59197732" }

1 resposta
solução!

Problema resolvido.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software