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 volume type var #8

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compute.tf
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ resource "aws_instance" "ec2-instance" {
iam_instance_profile = var.iam_instance_profile

root_block_device {
volume_type = "gp2"
volume_type = var.storage_class
volume_size = var.server_volume_size
delete_on_termination = var.delete_volume_on_instance_termination
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -3,6 +3,11 @@ variable "region" {
default = "eu-west-1" # Ireland
}

variable "storage_class" {
description = "Storage class"
default = "gp2"
}

variable "env" {
description = "The deployment environment this instance belongs to. Possible values: stage, preview, production"
default = "stage"