Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option for an additional EBS volume #102

Closed
JaseKoonce opened this issue Feb 13, 2024 · 1 comment
Closed

Add the option for an additional EBS volume #102

JaseKoonce opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JaseKoonce
Copy link
Contributor

As a user of this module, having the option to create a EBS volume in addition to the root volume would be very helpful.

This could be done by adding the following resources:

resource "aws_ebs_volume" "bastion_secondary_ebs_volume" {
  count             = var.enable_secondary_ebs_volume ? 1 : 0
  availability_zone = local.vpc_azs[0]
  size              = 1
  encrypted         = true
  tags              = var.tags
}

resource "aws_volume_attachment" "ebs_attachment" {
  count  = var.enable_secondary_ebs_volume ? 1 : 0
  device_name = "/dev/sdb"
  volume_id   = aws_ebs_volume.bastion_secondary_ebs_volume[0].id
  instance_id = module.bastion.instance_id
}

variable "enable_secondary_ebs_volume" {
  description = "Enable the creation of a secondary EBS volume"
  type        = bool
  default     = true
}
@JaseKoonce JaseKoonce added enhancement New feature or request good first issue Good for newcomers labels Feb 13, 2024
@JaseKoonce
Copy link
Contributor Author

Changes Merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant