Skip to content

Commit

Permalink
Merge pull request #99 from cisagov/improvement/add-input-var-for-dis…
Browse files Browse the repository at this point in the history
…k-size

Add a variable to set the size of the OpenVPN instance's root disk
  • Loading branch information
jsf9k authored Feb 15, 2024
2 parents eedac2e + e9eff00 commit 1b76568
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ module "example" {
| private\_reverse\_zone\_id | The DNS Zone ID in which to create private reverse lookup records. | `string` | n/a | yes |
| private\_zone\_id | The DNS Zone ID in which to create private lookup records. | `string` | n/a | yes |
| public\_zone\_id | The DNS Zone ID in which to create public lookup records. | `string` | n/a | yes |
| root\_disk\_size | The size of the OpenVPN instance's root disk in GiB. | `number` | `8` | no |
| security\_groups | Additional security group ids the server will join. | `list(string)` | `[]` | no |
| ssm\_dh4096\_pem | The SSM key that contains the Diffie Hellman pem. | `string` | `"/openvpn/server/dh4096.pem"` | no |
| ssm\_read\_role\_accounts\_allowed | A list of accounts allowed to access the role that can read SSM keys. | `list(string)` | `[]` | no |
Expand Down
4 changes: 4 additions & 0 deletions ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ resource "aws_instance" "openvpn" {
# Require IMDS tokens AKA require the use of IMDSv2
http_tokens = "required"
}
root_block_device {
volume_size = var.root_disk_size
volume_type = "gp3"
}
iam_instance_profile = aws_iam_instance_profile.instance_profile.name
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ variable "security_groups" {
default = []
}

variable "root_disk_size" {
type = number
description = "The size of the OpenVPN instance's root disk in GiB."
default = 8
}

variable "ssm_dh4096_pem" {
type = string
description = "The SSM key that contains the Diffie Hellman pem."
Expand Down

0 comments on commit 1b76568

Please sign in to comment.