Skip to content
Draft
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
14 changes: 7 additions & 7 deletions registry/coder/modules/aws-ec2-instance-type/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ Each option is labeled with its vCPU, RAM, and architecture so developers can
select the machine that best fits their workspace.

```tf
module "aws_ec2_instance_type" {
module "aws-ec2-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/aws-ec2-instance-type/coder"
version = "1.0.0"
default = "t3.micro"
}

resource "aws_instance" "dev" {
instance_type = module.aws_ec2_instance_type[0].value
instance_type = module.aws-ec2-instance-type[0].value
# ...
}
```
Expand All @@ -36,7 +36,7 @@ By default only the `t3` family is offered. Pass `include` to expose more
families and preselect one:

```tf
module "aws_ec2_instance_type" {
module "aws-ec2-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/aws-ec2-instance-type/coder"
version = "1.0.0"
Expand All @@ -55,7 +55,7 @@ Each option is labeled with its specs and architecture (for example
either per instance type:

```tf
module "aws_ec2_instance_type" {
module "aws-ec2-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/aws-ec2-instance-type/coder"
version = "1.0.0"
Expand All @@ -75,13 +75,13 @@ module "aws_ec2_instance_type" {
The `instances` output maps every instance type ID to its metadata, including architecture fields. Look up the selected value to configure the agent and pick a matching AMI:

```tf
module "aws_ec2_instance_type" {
module "aws-ec2-instance-type" {
source = "registry.coder.com/coder/aws-ec2-instance-type/coder"
version = "1.0.0"
}

locals {
selected = module.aws_ec2_instance_type.instances[module.aws_ec2_instance_type.value]
selected = module.aws-ec2-instance-type.instances[module.aws-ec2-instance-type.value]
}

resource "coder_agent" "dev" {
Expand All @@ -105,7 +105,7 @@ data "aws_ami" "workspace" {
Set `create_parameter = false` to skip the picker (for example when the template pins the size) while still using the `instances` catalog:

```tf
module "aws_ec2_instance_type" {
module "aws-ec2-instance-type" {
source = "registry.coder.com/coder/aws-ec2-instance-type/coder"
version = "1.0.0"
create_parameter = false
Expand Down
Loading