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

Changes root volume default-type to gp3 #72

Closed
wants to merge 9 commits into from

Conversation

mbijon
Copy link

@mbijon mbijon commented May 11, 2021

This is a minor change that could offer a very small cost-savings for bastion hosts. We would like to see it reflected upstream if possible.

If the change to a gp3 default is concerning due to a large volume of TF updates, could the support for specifying volume_type still be added so we can manually specify gp3?

what

  • Changes the root volume of the bastion instances from gp2 to the newer gp3 type
  • Still allows support for gp2 or standard magnetic volumes to be specified

why

  • The gp3 type now being set as default is both less expensive per-GB and more-performant for small volumes
    • Since bastion servers have small boot volumes they should never need the larger-sizes where gp2 is needed
    • This is mainly a cost-savings for bastion disk-patterns
  • Allowing volume-type to be specified allows gp2 or standard volume-types if required

references

@mbijon mbijon requested review from a team as code owners May 11, 2021 20:08
mbijon and others added 3 commits May 26, 2021 13:22
…-iam

Prevents module from blocking on 2nd+ region by including AWS region_name in IAM role names
Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbijon please see comments -- Thanks!

iam.tf Outdated
@@ -6,7 +6,7 @@ resource "aws_iam_instance_profile" "default" {

resource "aws_iam_role" "default" {
count = (module.this.enabled && local.instance_profile_count == 0) ? 0 : 1
name = module.this.id
name = "${module.this.id}-${data.aws_region}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we'd accept this change as 1) I don't believe this would be a valid reference (i.e. it would fail) and 2) the develop can add the region (or region identifier) to their name via the context variables that make up module.this.id.

Can you please remove this and the rename from default => current before we potentially move this PR forward?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't mean for this to be included. This PR was based on our master & not the volume-type specific branch.

I've based a PR on that branch & "started over" here: #77

variable "root_block_device_volume_type" {
type = string
default = "gp3"
description = "The volume type."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please list the valid values here? Or if this module requires 0.13+ then please include a validation block to ensure the user is only passing in accepted values.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done in PR #77.

Closing this PR because it included incomplete edits from a different feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants