+ Names to our two main hosts

This commit is contained in:
shockrah 2021-11-25 00:09:40 -08:00
parent 8b1d576bfb
commit 314e86704f
3 changed files with 21 additions and 6 deletions

View File

@ -1,10 +1,18 @@
plan=out.plan
build:
terraform plan -out out.plan
terraform plan -out $(plan)
test:
terraform validate
clean:
rm -f out.plan
push:
terraform apply $(plan)
.PHONY: test build clean
rip:
terraform destroy
clean:
rm -f $(plan)
.PHONY: test build clean push rip

View File

@ -10,7 +10,7 @@ variable "alpha_ami_id" {}
resource "aws_key_pair" "alpha_ssh" {
key_name = var.alpha_ssh_key_name
public_key = var.alpha_public_key_path
public_key = file(var.alpha_public_key_path)
}
resource "aws_instance" "alpha" {
@ -24,4 +24,7 @@ resource "aws_instance" "alpha" {
aws_security_group.internal_ssh_recv.id
]
subnet_id = aws_subnet.crete_subnet.id
tags = {
Name = "Alpha Host"
}
}

View File

@ -8,7 +8,7 @@ variable "beta_ami_id" {}
resource "aws_key_pair" "beta_ssh" {
key_name = var.beta_public_key_path
public_key = var.beta_public_key_path
public_key = file(var.beta_public_key_path)
}
resource "aws_instance" "beta" {
@ -23,4 +23,8 @@ resource "aws_instance" "beta" {
]
subnet_id = aws_subnet.crete_subnet.id
tags = {
Name = "Beta Host"
}
}