Search

KeyPair

## Keypair resource "tls_private_key" "rsa" { algorithm = "RSA" rsa_bits = 4096 } resource "aws_key_pair" "keypair" { key_name = "<env>" public_key = tls_private_key.rsa.public_key_openssh } resource "local_file" "keypair" { content = tls_private_key.rsa.private_key_pem filename = "../<env>.pem" } output "keypair" { value = local_file.keypair.id }
JSON
복사