Terraform Code 추가

This commit is contained in:
ByeonJungHun
2024-12-04 14:11:05 +09:00
parent 2edcf77bda
commit 2fc5920235
15 changed files with 1396 additions and 2 deletions

15
tf/ssh_key.tf Normal file
View File

@@ -0,0 +1,15 @@
resource "tls_private_key" "aws_default_key" {
algorithm = "RSA"
rsa_bits = 4096
}
resource "aws_key_pair" "aws_default_key_pair" {
key_name = "junghun-key"
public_key = tls_private_key.aws_default_key.public_key_openssh
}
resource "local_file" "private_key" {
filename = "${path.module}/aws_private_key.pem"
content = tls_private_key.aws_default_key.private_key_pem
file_permission = "0400"
}