- Notifications
You must be signed in to change notification settings - Fork928
chore: update templates to use rich parameters#6397
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
36 commits Select commitHold shift + click to select a range
986423a
update templates to use rich parameters
matifaliaed5f6c
more icons
matifaliabec445
fix do-linux
matifali2f17c1d
fix: docker-image-builds
matifali31824c3
fix kubernetes
matifalid0ab600
add friendly names to do-linux
matifali9b5d632
Merge branch 'coder:main' into rich-params-examples
matifalieab5ff8
Merge branch 'coder:main' into rich-params-examples
matifali78d5eb4
Merge branch 'coder:main' into rich-params-examples
matifali5d3bdf7
Merge branch 'coder:main' into rich-params-examples
matifali59b18d1
use managed variables for do-linux
matifalia84db0b
update docker examples
matifali4caa9ea
update gcp
matifali3c3c0ef
update kubernetes
matifaliad0f454
update azure-vm
matifali071f9ac
update aws
matifali33e234c
update requested changes
matifalidb081e0
update regions with city names
matifalie5f35f9
fix type
matifali152d9fa
remove regions with no support for availability zones
matifalie3edbed
add Switzerland
matifali4bc2178
revert + refactor do-linux
matifali311b20c
fix docker migration
matifaliad2002e
update azure-vm
matifalia702587
fix: docker-with-dotfiles
matifaliaaa7800
add icons
matifalieab122d
update docker_image icon
matifali525bb3e
fix: flag emojis in do-linux
matifali994256a
fix icons and default project google
matifali1bc57d1
remove default and hardcoded cpu and memory
matifali9610e62
set Instance type to be immutable
matifalidcb34e2
set zone to be immutable
matifalib4c46e0
fix typo to fix icons
matifalid9b63cf
suggestions
matifali527854c
update code-server to version `4.10.1`
matifalibdbe709
Revert "update code-server to version `4.10.1`"
matifaliFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
41 changes: 26 additions & 15 deletionsexamples/templates/aws-ecs-container/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2,7 +2,7 @@ terraform { | ||
required_providers { | ||
coder = { | ||
source = "coder/coder" | ||
version = "~> 0.6.17" | ||
} | ||
aws = { | ||
source = "hashicorp/aws" | ||
@@ -11,16 +11,28 @@ terraform { | ||
} | ||
} | ||
provider "coder" { | ||
feature_use_managed_variables = true | ||
} | ||
variable "ecs-cluster" { | ||
description = "Input the ECS cluster ARN to host the workspace" | ||
} | ||
data "coder_parameter" "cpu" { | ||
name = "cpu" | ||
description = "The number of CPU units to reserve for the container" | ||
matifali marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
type = "number" | ||
default = "1024" | ||
mutable = true | ||
} | ||
data "coder_parameter" "memory" { | ||
name = "memory" | ||
description = "The amount of memory (in MiB) to allow the container to use" | ||
type = "number" | ||
default = "2048" | ||
matifali marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
mutable = true | ||
} | ||
# configure AWS provider with creds present on Coder server host | ||
@@ -34,14 +46,14 @@ resource "aws_ecs_task_definition" "workspace" { | ||
family = "coder" | ||
requires_compatibilities = ["EC2"] | ||
cpu =data.coder_parameter.cpu.value | ||
memory =data.coder_parameter.memory.value | ||
container_definitions = jsonencode([ | ||
{ | ||
name = "coder-workspace-${data.coder_workspace.me.id}" | ||
image = "codercom/enterprise-base:ubuntu" | ||
matifali marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
cpu =tonumber(data.coder_parameter.cpu.value) | ||
memory =tonumber(data.coder_parameter.memory.value) | ||
essential = true | ||
user = "coder" | ||
command = ["sh", "-c", coder_agent.coder.init_script] | ||
@@ -92,11 +104,10 @@ resource "aws_ecs_service" "workspace" { | ||
data "coder_workspace" "me" {} | ||
resource "coder_agent" "coder" { | ||
arch = "amd64" | ||
auth = "token" | ||
os = "linux" | ||
dir = "/home/coder" | ||
login_before_ready = false | ||
startup_script_timeout = 180 | ||
startup_script = <<-EOT | ||
167 changes: 123 additions & 44 deletionsexamples/templates/aws-linux/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.