We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff86962 commit 7bfeaaaCopy full SHA for 7bfeaaa
main.tf
@@ -8,6 +8,23 @@ resource "aws_key_pair" "ansible" {
8
}
9
10
11
+module "key-pair" {
12
+ source = "terraform-aws-modules/key-pair/aws"
13
+
14
+ key_name = "ansible-module"
15
+ create_private_key = true
16
+}
17
18
+resource "local_file" "ansible-module-public-key" {
19
+ filename = "public_key"
20
+ content = module.key-pair.public_key_pem
21
22
23
+resource "local_file" "ansible-module-private-key" {
24
+ filename = "private_key"
25
+ content = module.key-pair.private_key_pem
26
27
28
resource "aws_instance" "terraform-gitlab-docker-runner" {
29
ami = "ami-074cc9cf7a6bfbd02"
30
instance_type = "c6g.medium"
0 commit comments