Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
box-genius committed Jul 4, 2024
1 parent 3554acf commit 66a5fb1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
20 changes: 0 additions & 20 deletions Terraform_IaC/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ resource "aws_instance" "web" {
count = 10
ami = var.ami_id
instance_type = var.instance_type
key_name = var.key_name

tags = {
Name = "Minsait_${count.index}"
Expand All @@ -21,22 +20,3 @@ resource "aws_instance" "web" {
sudo systemctl start docker
EOF
}

resource "null_resource" "check_docker" {
count = 10

provisioner "remote-exec" {
connection {
type = "ssh"
user = "ubuntu"
private_key = file(var.private_key_path)
host = aws_instance.web[count.index].public_ip
}

inline = [
"docker --version"
]
}

depends_on = [aws_instance.web]
}
10 changes: 0 additions & 10 deletions Terraform_IaC/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,4 @@ variable "instance_type" {
description = "Tipo da instância"
type = string
default = "t2.micro"
}

variable "key_name" {
description = "The name of the SSH key pair to use"
default = ""
}

variable "private_key_path" {
description = "The path to the private key file"
default = ""
}

0 comments on commit 66a5fb1

Please sign in to comment.