Skip to content

Commit

Permalink
Adding key_pair for ec2
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaffar committed Oct 13, 2022
1 parent c1bb063 commit 731addf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module "example1" {
additional_tags = module.label.tags
cidr_block = "172.16.0.0/18"
enable_dns_hostnames = true
enable_nat_gateway = true
nat_instance_enabled = false
enable_nat_gateway = false
nat_instance_enabled = true
enable_internet_gateway = true
create_public_subnets = true
max_subnet_count = 3
Expand Down
1 change: 1 addition & 0 deletions nat_instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ resource "aws_instance" "nat_instance" {
associate_public_ip_address = true

ebs_optimized = true
key_name = join("-", [local.name, "key"])
}

resource "aws_eip_association" "nat_instance" {
Expand Down

0 comments on commit 731addf

Please sign in to comment.