Skip to content

change default aws linux instance type to t3.micro, reduce default template TTL #2776

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

Merged
merged 5 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
remove prefixes from instance types
  • Loading branch information
johnstcn committed Jul 12, 2022
commit f4c0d93fa6a5590eed8d18d9d191c5f0ecae373d
16 changes: 8 additions & 8 deletions examples/templates/aws-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ variable "region" {

variable "instance_type" {
description = "What instance type should your workspace use?"
default = "2C/1G: t3.micro"
default = "t3.micro"
validation {
condition = contains([
"2C/1G: t3.micro",
"2C/2G: t3.small",
"2C/4G: t3.medium",
"2C/8G: t3.large",
"4C/16G: t3.xlarge",
"8C/32G: t3.2xlarge",
"t3.micro",
"t3.small",
"t3.medium",
"t3.large",
"t3.xlarge",
"t3.2xlarge",
], var.instance_type)
error_message = "Invalid instance type!"
}
Expand Down Expand Up @@ -146,7 +146,7 @@ EOT
resource "aws_instance" "dev" {
ami = data.aws_ami.ubuntu.id
availability_zone = "${var.region}a"
instance_type = split(": ", "${var.instance_type}")[1]
instance_type = "${var.instance_type}"

user_data = data.coder_workspace.me.transition == "start" ? local.user_data_start : local.user_data_end
tags = {
Expand Down
16 changes: 8 additions & 8 deletions examples/templates/aws-windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ variable "region" {

variable "instance_type" {
description = "What instance type should your workspace use?"
default = "2C/1G: t3.micro"
default = "t3.micro"
validation {
condition = contains([
"2C/1G: t3.micro",
"2C/2G: t3.small",
"2C/4G: t3.medium",
"2C/8G: t3.large",
"4C/16G: t3.xlarge",
"8C/32G: t3.2xlarge",
"t3.micro",
"t3.small",
"t3.medium",
"t3.large",
"t3.xlarge",
"t3.2xlarge",
], var.instance_type)
error_message = "Invalid instance type!"
}
Expand Down Expand Up @@ -99,7 +99,7 @@ EOT
resource "aws_instance" "dev" {
ami = data.aws_ami.windows.id
availability_zone = "${var.region}a"
instance_type = split(": ", "${var.instance_type}")[1]
instance_type = "${var.instance_type}"
count = 1

user_data = data.coder_workspace.me.transition == "start" ? local.user_data_start : local.user_data_end
Expand Down